Ejemplo n.º 1
0
    public override void InitState()
    {
        base.InitState();

        {
            State state = new PlayerIdleState();
            state.Init(this);
            _stateMap[eStateType.IDLE] = state;
        }
        {
            State state = new PathfindingMoveState();
            state.Init(this);
            _stateMap[eStateType.MOVE] = state;
        }
        {
            State state = new PathfindingState();
            state.Init(this);
            _stateMap[eStateType.PATHFINDING] = state;
        }
        {
            State state = new SelectTargetState();
            state.Init(this);
            _stateMap[eStateType.SELECT_TARGET] = state;
        }

        _state = _stateMap[eStateType.IDLE];
    }
Ejemplo n.º 2
0
    override public void InitState()
    {
        base.InitState();

        {
            State state = new PathfindingIdleState();
            state.Init(this);
            _stateMap[eStateType.IDLE] = state;
        }

        {
            State state = new PathfindingState();
            //State state = new PathfindingImmediateState();
            state.Init(this);
            _stateMap[eStateType.PATHFINDING] = state;
        }

        {
            State state = new PathfindingMoveState();
            state.Init(this);
            _stateMap[eStateType.MOVE] = state;
        }

        _state = _stateMap[eStateType.IDLE];
    }
Ejemplo n.º 3
0
 virtual public void InitState()
 {
     {
         State state = new PlayerIdleState();
         state.Init(this);
         _stateMap[eStateType.IDLE] = state;
     }
     {
         State state = new PathfindingMoveState();
         state.Init(this);
         _stateMap[eStateType.MOVE] = state;
     }
     {
         State state = new AttackState();
         state.Init(this);
         _stateMap[eStateType.ATTACK] = state;
     }
     {
         State state = new DamagedState();
         state.Init(this);
         _stateMap[eStateType.DAMAGED] = state;
     }
     {
         State state = new DeadState();
         state.Init(this);
         _stateMap[eStateType.DEAD] = state;
     }
     _state = _stateMap[eStateType.IDLE];
 }