bad-piggies-0.1.3-porting/Assets/Scripts/Assembly-CSharp/Widget.cs
2024-02-24 22:40:44 -05:00

42 lines
734 B
C#

using UnityEngine;
public class Widget : MonoBehaviour
{
public virtual void SetListener(WidgetListener listener)
{
}
public void SendInput(InputEvent input)
{
if ((bool)base.transform.parent && (bool)base.transform.parent.GetComponent<Widget>())
{
base.transform.parent.GetComponent<Widget>().SendInput(input);
}
OnInput(input);
}
public void Activate()
{
if ((bool)base.transform.parent && (bool)base.transform.parent.GetComponent<Widget>())
{
base.transform.parent.GetComponent<Widget>().Activate();
}
OnActivate();
}
public virtual void Select()
{
}
public virtual void Deselect()
{
}
protected virtual void OnInput(InputEvent input)
{
}
protected virtual void OnActivate()
{
}
}