public int WeaponIndex;                       //角色当前武器ID

        //战斗中
        //目标置入初始状态.
        public void Init(MeteorUnit Unit)
        {
            EventBus           = new EventBus();
            Player             = Unit;
            WaitState          = new WaitState(this);
            IdleState          = new IdleState(this);
            GuardState         = new GuardState(this);
            KillState          = new KillState(this);
            PatrolState        = new PatrolState(this);
            ReviveState        = new ReviveState(this);
            FollowState        = new FollowState(this);
            FightOnGroundState = new FightOnGroundState(this);
            FightOnAirState    = new FightOnAirState(this);
            LookState          = new LookState(this);
            DodgeState         = new DodgeState(this);
            FindState          = new FindState(this);
            FaceToState        = new FaceToState(this);
            PickUpState        = new PickUpState(this);
            LeaveState         = new LeaveState(this);
            InitFightWeight();
            int dis = Player.Attr.View;

            DistanceFindUnit = dis * dis;
            DistanceMissUnit = (dis + dis / 2) * (dis + dis / 2);
            this.EnterDefaultState();
            stoped = false;
        }
 public bool IsFighting()
 {
     if (CurrentState != null)
     {
         FightOnGroundState fs = CurrentState as FightOnGroundState;
         return(fs != null);
     }
     return(false);
 }