예제 #1
0
    virtual protected void InitState()
    {
        State idleState       = new IdleState();
        State moveState       = new MoveState();
        State attackState     = new AttackState();
        State runState        = new RunState();
        State findTargetState = new FindTargetState();
        State takeOffState    = new TakeOffState();
        State landingState    = new LandingState();

        idleState.Init(this);
        moveState.Init(this);
        attackState.Init(this);
        runState.Init(this);
        findTargetState.Init(this);
        takeOffState.Init(this);
        landingState.Init(this);

        _stateDic.Add(eState.IDLE, idleState);
        _stateDic.Add(eState.MOVE, moveState);
        _stateDic.Add(eState.RUN, runState);
        _stateDic.Add(eState.ATTACK, attackState);
        _stateDic.Add(eState.FIND_TARGET, findTargetState);
        _stateDic.Add(eState.TAKE_OFF, takeOffState);
        _stateDic.Add(eState.LANDING, landingState);
    }
예제 #2
0
    virtual protected void InitState()
    {
        State idlestate       = new IdleState();
        State movestate       = new MoveState();
        State attackstate     = new AttackState();
        State findTargetstate = new FindTargetState();

        idlestate.Init(this);
        movestate.Init(this);
        attackstate.Init(this);
        findTargetstate.Init(this);

        _stateDic.Add(eState.IDLE, idlestate);
        _stateDic.Add(eState.MOVE, movestate);
        _stateDic.Add(eState.ATTACK, attackstate);
        _stateDic.Add(eState.FIND_TARGET, findTargetstate);
    }