mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
Update GameActor.cs
This commit is contained in:
@@ -10,6 +10,7 @@ namespace TEngine.Runtime.Actor
|
||||
public abstract partial class GameActor
|
||||
{
|
||||
#region Propreties
|
||||
|
||||
public uint ActorId { get; set; }
|
||||
|
||||
public bool IsCreated { get; set; }
|
||||
@@ -51,6 +52,7 @@ namespace TEngine.Runtime.Actor
|
||||
{
|
||||
_visibleTime = Time.time;
|
||||
}
|
||||
|
||||
Event.SendEvent(ActorEventType.ModelVisibleChange, _visible);
|
||||
}
|
||||
}
|
||||
@@ -74,9 +76,11 @@ namespace TEngine.Runtime.Actor
|
||||
{
|
||||
return "UNNAMED";
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Transform
|
||||
|
||||
public Transform transform
|
||||
{
|
||||
get
|
||||
@@ -175,9 +179,11 @@ namespace TEngine.Runtime.Actor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Init
|
||||
|
||||
internal void Init()
|
||||
{
|
||||
Awake();
|
||||
@@ -188,17 +194,14 @@ namespace TEngine.Runtime.Actor
|
||||
|
||||
public virtual void Awake()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public virtual void OnInit()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public virtual void AfterInit()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected virtual GameObject CreateGameObject()
|
||||
@@ -216,10 +219,10 @@ namespace TEngine.Runtime.Actor
|
||||
|
||||
ActorManager.Instance.BindGameActorGo(this, _gameObject);
|
||||
}
|
||||
|
||||
InitExt();
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
@@ -244,11 +247,13 @@ namespace TEngine.Runtime.Actor
|
||||
IsDestroyed = true;
|
||||
_isDestroying = false;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Expand
|
||||
|
||||
#region Base
|
||||
|
||||
public static bool operator ==(GameActor obj1, GameActor obj2)
|
||||
{
|
||||
if (ReferenceEquals(obj1, obj2))
|
||||
@@ -282,6 +287,7 @@ namespace TEngine.Runtime.Actor
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
Reference in New Issue
Block a user