//状態遷移関数 public override void ChangeState(PlayerStateEntry se) { currentState.Exit(this); preState = currentState; currentState = se; currentState.Enter(this); }
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); }
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; }
public override void ChangeState(PlayerStateEntry nextState) { currentState.Exit(this); currentState = nextState; currentState.Enter(this); }
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); }