mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
PlayerActor
PlayerActor
This commit is contained in:
@@ -6,16 +6,21 @@ namespace TEngine.Runtime.Actor
|
||||
{
|
||||
public class ActorEntity : EntityLogicEx
|
||||
{
|
||||
protected override void OnInit(object userData)
|
||||
protected override void OnShow(object userData)
|
||||
{
|
||||
base.OnInit(userData);
|
||||
|
||||
var entityData = (EntityData)userData;
|
||||
|
||||
var actor = ActorManager.Instance.GetActor((uint)entityData.UserData);
|
||||
|
||||
GameActor actor = (GameActor)entityData.UserData;
|
||||
|
||||
actor.Get<ModelComponent>().BindModel(gameObject);
|
||||
}
|
||||
|
||||
protected override void OnHide(bool isShutdown, object userData)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -77,7 +82,7 @@ namespace TEngine.Runtime.Actor
|
||||
// _model = Object.Instantiate(obj);
|
||||
|
||||
//通过Entity创建实体
|
||||
PlayEntityMgr.Instance.CreatePlayerEntity((int)OwnActor.ActorId,"Capsule",Vector3.zero, Quaternion.identity);
|
||||
PlayEntityMgr.Instance.CreatePlayerEntity(OwnActor,"Capsule",Vector3.zero, Quaternion.identity);
|
||||
}
|
||||
|
||||
public void BindModel(GameObject gameObject)
|
||||
|
Reference in New Issue
Block a user