rise-and-swine/Assets/Scripts/Assembly-CSharp/GameObjectEvents.cs
2023-02-25 23:04:03 -05:00

41 lines
551 B
C#

using System;
using UnityEngine;
public class GameObjectEvents : MonoBehaviour
{
private void OnEnable()
{
if (this.OnEnabled != null)
{
this.OnEnabled(true);
}
}
private void OnDisable()
{
if (this.OnEnabled != null)
{
this.OnEnabled(false);
}
}
private void OnBecameVisible()
{
if (this.OnVisible != null)
{
this.OnVisible(true);
}
}
private void OnBecameInvisible()
{
if (this.OnVisible != null)
{
this.OnVisible(false);
}
}
public Action<bool> OnVisible;
public Action<bool> OnEnabled;
}