Example #1
0
    public virtual void InitState()
    {
        {
            State state = new IdleState();
            state.Init(this);
            _stateMap[eStateType.IDLE] = state;
        }
        {
            State state = new MoveState();
            state.Init(this);
            _stateMap[eStateType.MOVE] = state;
        }
        {
            State state = new AttackState();
            state.Init(this);
            _stateMap[eStateType.ATTACK] = state;
        }
        {
            State state = new DamageState();
            state.Init(this);
            _stateMap[eStateType.DAMAGE] = state;
        }
        {
            State state = new DeathState();
            state.Init(this);
            _stateMap[eStateType.DEATH] = state;
        }

        _state = _stateMap[eStateType.IDLE];
    }
Example #2
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);
    }
Example #3
0
    virtual protected void InitState()
    {
        State idleState = new IdleState();

        idleState.Init(this);
        _stateDictionary.Add(eState.IDLE, idleState);

        State moveState = new MoveState();

        moveState.Init(this);
        _stateDictionary.Add(eState.MOVE, moveState);

        State attackState = new AttackState();

        attackState.Init(this);
        _stateDictionary.Add(eState.ATTACK, attackState);

        State chaseState = new ChaseState();

        chaseState.Init(this);
        _stateDictionary.Add(eState.CHASE, chaseState);

        State patrolState = new PatrolState();

        patrolState.Init(this);
        _stateDictionary.Add(eState.PATROL, patrolState);
    }
Example #4
0
    virtual protected void InitState()
    {
        State moveState   = new MoveState();
        State attackState = new AttackState();
        State hitState    = new HitState();


        State skillOneState   = new SkillOne();
        State skillTwoState   = new SkillTwo();
        State skillThreeState = new SkillThree();
        State idleState       = new IdleState();



        moveState.Init(this);
        attackState.Init(this);
        hitState.Init(this);
        skillOneState.Init(this);
        skillTwoState.Init(this);
        skillThreeState.Init(this);
        idleState.Init(this);


        _stateDic.Add(eSTATE.MOVE, moveState);
        _stateDic.Add(eSTATE.ATTACK, attackState);
        _stateDic.Add(eSTATE.HIT, hitState);
        _stateDic.Add(eSTATE.SKILLONE, skillOneState);
        _stateDic.Add(eSTATE.SKILLTWO, skillTwoState);
        _stateDic.Add(eSTATE.SKILLTHREE, skillThreeState);
        _stateDic.Add(eSTATE.IDLE, idleState);
    }
Example #5
0
    virtual protected void InitState()
    {
        {
            State state = new IdleState();
            state.Init(this);
            _stateMap[eStateType.IDLE] = state;
        }

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

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

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

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

        _state = _stateMap[eStateType.IDLE];
    }
Example #6
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];
 }
Example #7
0
    protected override void InitState()
    {
        base.InitState();

        State idleState   = new EnemyIdleState();
        State attackState = new AttackState();


        idleState.Init(this);
        attackState.Init(this);

        _stateDic[eState.IDLE]   = idleState;
        _stateDic[eState.ATTACK] = attackState;
    }
    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);
    }
Example #9
0
    virtual protected void InitState()
    {
        State idleState   = new IdleState();
        State moveState   = new MoveState();
        State attackState = new AttackState();
        State chaseState  = new ChaseState();


        idleState.Init(this);
        moveState.Init(this);
        attackState.Init(this);
        chaseState.Init(this);

        _stateList.Add(eState.IDLE, idleState);
        _stateList.Add(eState.MOVE, moveState);
        _stateList.Add(eState.ATTACK, attackState);
        _stateList.Add(eState.CHASE, chaseState);
    }
Example #10
0
    virtual protected void InitState()
    {
        //데이터 주도 프로그래밍: 스크립트로 다 빼기
        State idleState   = new IdleState();
        State moveState   = new MoveState();
        State chaseState  = new ChaseState();
        State attackState = new AttackState();
        State patrolState = new PatrolState();

        idleState.Init(this);
        moveState.Init(this);
        chaseState.Init(this);
        attackState.Init(this);
        patrolState.Init(this);

        _stateMap.Add(eState.IDLE, idleState);
        _stateMap.Add(eState.MOVE, moveState);
        _stateMap.Add(eState.CHASE, chaseState);
        _stateMap.Add(eState.ATTACK, attackState);
        _stateMap.Add(eState.PATROL, patrolState);
    }
Example #11
0
    protected override void InitState()
    {
        State idleState = new WargIdleState();

        idleState.Init(this);
        _stateList.Add(eState.IDLE, idleState);

        State patrolState = new PatrolState();

        patrolState.Init(this);
        _stateList.Add(eState.PATROL, patrolState);

        State chaseState = new ChaseState();

        chaseState.Init(this);
        _stateList.Add(eState.CHASE, chaseState);

        State attackState = new AttackState();

        attackState.Init(this);
        _stateList.Add(eState.ATTACK, attackState);
    }