예제 #1
0
 //状態遷移関数
 public override void ChangeState(PlayerStateEntry se)
 {
     currentState.Exit(this);
     preState     = currentState;
     currentState = se;
     currentState.Enter(this);
 }
예제 #2
0
 public override void Enter(PlayerStateEntry upperState)
 {
     if (upperState.GetPreState() == jumping)
     {
         currentState = attackingInAir;
     }
     else
     {
         currentState = attackingFirst;
     }
     currentState.Enter(this);
 }
    public override void Enter(PlayerStateEntry upperState)
    {
        if (status.GetDead())
        {
            currentState = dying;
        }
        else
        {
            currentState = nockBacking;
        }

        currentState.Enter(this);
    }
예제 #4
0
    public override void Enter(PlayerStateEntry upperState)
    {
        //if (status.GetSlideButton()) {
        //    currentState = slideJumping;
        /*} else*/ if (status.GetJumpButton())
        {
            currentState = jumpingFirst;
        }
        else
        {
            currentState = jumpingWithUpToDown;
        }

        currentState.Enter(this);
        preState = currentState;

        waitingTimer = 0;
    }
예제 #5
0
 public override void ChangeState(PlayerStateEntry nextState)
 {
     currentState.Exit(this);
     currentState = nextState;
     currentState.Enter(this);
 }
예제 #6
0
    PlayerStateEntry preState;     //前フレームの状態

    //初期化
    protected override void SubInitialize(GameObject usingObj)
    {
        currentState = moving;
        preState     = moving;
        currentState.Enter(this);
    }
 public override void Enter(PlayerStateEntry upperState)
 {
     currentState = waiting;
     currentState.Enter(this);
 }