public override void OnAwake() { myHero = GetComponent <ServerLifeNpc>(); pathFind = myHero.pathFinding; mTrans = myHero.transform; param = new WarMsgParam(); }
public override void OnAwake() { myHero = GetComponent <ServerLifeNpc>(); pathFind = myHero.pathFinding; npcList = new List <ServerNPC> (); param = new WarMsgParam(); }
public override void OnStart() { npc = GetComponent <ServerLifeNpc>(); if (npc == null) { Debug.LogWarning("npc is null"); } if (npc.data == null) { Debug.LogWarning("npc.data is null"); } mTrans = npc.transform; mTargetTrans = target.Value.transform; pathFind = npc.pathFinding; param = new WarMsgParam(); if (npc.data.configData.moveable == Moveable.Movable) { pathFind.speed = npc.data.configData.speed; pathFind.enabled = true; pathFind.destination = target.Value.transform.position; } }
public override void OnAwake() { npc = GetComponent <ServerLifeNpc>(); param = new WarMsgParam(); if (npc.data.configData.moveable == Moveable.Movable) { pathFind = npc.pathFinding; } }
public override void OnAwake() { npc = GetComponent <ServerLifeNpc>(); pathFind = npc.pathFinding; param = new WarMsgParam(); tempList = new List <ServerLifeNpc>(); sortList = new SortedList <int, ServerLifeNpc>(); targets = new List <ServerLifeNpc> (); mTrans = npc.transform; animMsg = new IpcNpcAnimMsg(); }
public override void OnAwake() { myHero = GetComponent <ServerLifeNpc>(); if (myHero.data.configData.moveable == Moveable.Movable) { // cache for quick lookup // navMeshAgent = gameObject.GetComponent<NavMeshAgent> (); navMeshAgent = myHero.pathFinding; // set the speed and angular speed // navMeshAgent.angularSpeed = rotationSpeed.Value; // navMeshAgent.speed = myHero.data.configData.speed; param = new WarMsgParam(); } }
public override void OnAwake() { param = new WarMsgParam(); myHero = GetComponent <ServerLifeNpc>(); }