Files
TEngine/Assets/TEngine/Runtime/ECS/HotfixComponent.cs
ALEXTANG 90ae4874a9 TEngine Commit 1.0.0
TEngine Commit 1.0.0
2022-05-20 23:19:50 +08:00

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;
}
}
}