Ejemplo n.º 1
0
        public override void Update(int deltaTime)
        {
            base.Update(deltaTime);

            owner.FindOpponent();
            owner.WaypointHandler();

            owner.pathAgent.Move(owner.speed * deltaTime);
        }
Ejemplo n.º 2
0
        // Update is called once per frame
        public override void Update(int deltaTime)
        {
            base.Update(deltaTime);

            if (owner.target != null && owner.target.Alive())
            {
                owner.FindOpponent();
                owner.WaypointHandler();
                owner.pathAgent.Move(owner.speed * deltaTime);

                // After move, Check the crystal's position is in the attack area.
                long distance       = FixVector3.SqrDistance(owner.target.position, owner.position);
                long attackDistance = (long)owner.attackArea + (long)owner.target.modelRadius + (long)owner.modelRadius;

                if (distance < attackDistance)
                {
                    owner.Fight(owner.target);
                }
            }
            else
            {
                owner.ChangeState(DemolisherState.IDLE, owner.fsmIdle);
            }
        }
Ejemplo n.º 3
0
        public override void Update(int deltaTime)
        {
            base.Update(deltaTime);

            owner.FindOpponent();
        }