30 lines
595 B
C#
30 lines
595 B
C#
using UnityEngine;
|
|
|
|
public class ScreenShotHelper : MonoBehaviour
|
|
{
|
|
public FishingPlayer player;
|
|
|
|
public GameObject[] objectsToHide;
|
|
|
|
private void OnEnable()
|
|
{
|
|
player.transform.parent = base.transform;
|
|
player.transform.position = base.transform.position + Vector3.up * 2f;
|
|
GameObject[] array = objectsToHide;
|
|
foreach (GameObject gameObject in array)
|
|
{
|
|
gameObject.SetActive(false);
|
|
}
|
|
}
|
|
|
|
private void OnDisnable()
|
|
{
|
|
player.transform.parent = null;
|
|
GameObject[] array = objectsToHide;
|
|
foreach (GameObject gameObject in array)
|
|
{
|
|
gameObject.SetActive(true);
|
|
}
|
|
}
|
|
}
|