From 2c9a77e346466473c408990ed1d9f55fdab0d600 Mon Sep 17 00:00:00 2001 From: ALEXTANG <574809918@qq.com> Date: Mon, 19 Sep 2022 19:37:34 +0800 Subject: [PATCH] Update GameActor.cs --- .../Scripts/Runtime/Actor/GameActor.cs | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/Assets/TEngine/Scripts/Runtime/Actor/GameActor.cs b/Assets/TEngine/Scripts/Runtime/Actor/GameActor.cs index 1a5e15dc..cdb43772 100644 --- a/Assets/TEngine/Scripts/Runtime/Actor/GameActor.cs +++ b/Assets/TEngine/Scripts/Runtime/Actor/GameActor.cs @@ -75,12 +75,6 @@ namespace TEngine.Runtime.Actor return "UNNAMED"; } #endregion - - #region Actions - public Action Awake; - public Action OnInit; - public Action AfterInit; - #endregion #region Transform public Transform transform @@ -184,9 +178,27 @@ namespace TEngine.Runtime.Actor #endregion #region Init - public GameActor() + internal void Init() { - + Awake(); + BaseInit(); + OnInit(); + AfterInit(); + } + + public virtual void Awake() + { + + } + + public virtual void OnInit() + { + + } + + public virtual void AfterInit() + { + } protected virtual GameObject CreateGameObject()