This commit is contained in:
CortexCore
2023-06-05 19:57:17 +08:00
parent f05e28ec58
commit 7f2fea821c
6195 changed files with 489001 additions and 636 deletions

View File

@@ -0,0 +1,40 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
namespace BITKit
{
public class MonoEvents : Mono
{
public UnityEvent OnAwake = new();
public UnityEvent OnStart = new();
public UnityEvent<float> OnUpdate = new();
public UnityEvent<float> OnFixexUpdate = new();
public UnityEvent<float> OnLateUpdate = new();
public UnityEvent OnDestroyComponent = new();
protected override void Awake()
{
OnAwake.Invoke();
}
protected override void Start()
{
OnStart.Invoke();
}
protected override void Update()
{
OnUpdate.Invoke(Time.deltaTime);
}
protected override void FixedUpdate()
{
OnFixexUpdate.Invoke(Time.deltaTime);
}
protected override void LateUpdate()
{
OnLateUpdate.Invoke(Time.deltaTime);
}
protected override void OnDestroy()
{
OnDestroyComponent.Invoke();
}
}
}