mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
33 lines
635 B
C#
33 lines
635 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace TEngine
|
|
{
|
|
public class HotfixComponent : ECSComponent,IUpdate
|
|
{
|
|
public object[] Values;
|
|
public Action OnAwake, OnUpdate, OnDestroyExt;
|
|
|
|
public override void Awake()
|
|
{
|
|
OnAwake?.Invoke();
|
|
}
|
|
|
|
void IUpdate.Update()
|
|
{
|
|
OnUpdate?.Invoke();
|
|
}
|
|
|
|
public override void OnDestroy()
|
|
{
|
|
OnDestroyExt?.Invoke();
|
|
OnAwake = null;
|
|
OnUpdate = null;
|
|
OnDestroyExt = null;
|
|
}
|
|
}
|
|
}
|
|
|