Example #1
0
 public override void OnAwake()
 {
     myHero   = GetComponent <ServerLifeNpc>();
     pathFind = myHero.pathFinding;
     mTrans   = myHero.transform;
     param    = new WarMsgParam();
 }
Example #2
0
 public override void OnAwake()
 {
     myHero   = GetComponent <ServerLifeNpc>();
     pathFind = myHero.pathFinding;
     npcList  = new List <ServerNPC> ();
     param    = new WarMsgParam();
 }
Example #3
0
        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;
            }
        }
Example #4
0
        public override void OnAwake()
        {
            npc   = GetComponent <ServerLifeNpc>();
            param = new WarMsgParam();

            if (npc.data.configData.moveable == Moveable.Movable)
            {
                pathFind = npc.pathFinding;
            }
        }
Example #5
0
 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();
 }
Example #6
0
        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();
            }
        }
Example #7
0
 public override void OnAwake()
 {
     param  = new WarMsgParam();
     myHero = GetComponent <ServerLifeNpc>();
 }