35 lines
777 B
C#
35 lines
777 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.Events;
|
|
namespace BITKit
|
|
{
|
|
public class AutoInvoke : MonoBehaviour
|
|
{
|
|
public UnityEvent onAwake = new();
|
|
public UnityEvent onStart = new();
|
|
public UnityEvent onEnabled = new();
|
|
public UnityEvent onDisabled = new();
|
|
public UnityEvent onDestory = new();
|
|
void Awake()
|
|
{
|
|
onAwake.Invoke();
|
|
}
|
|
void Start()
|
|
{
|
|
onStart.Invoke();
|
|
}
|
|
void OnEnabled()
|
|
{
|
|
onEnabled.Invoke();
|
|
}
|
|
void OnDisable()
|
|
{
|
|
onDisabled.Invoke();
|
|
}
|
|
void OnDestroy()
|
|
{
|
|
onDestory.Invoke();
|
|
}
|
|
}
|
|
} |