private void State_Quit(double now) { STATE = PlayerAState.Quit; //Entry Action _Clock = now; Send_TAR(double.MaxValue, "OVER"); }
private void State_Wait(double now) { STATE = PlayerAState.Wait; //Entry Action _Clock = now; Send_TAR(_Clock + wa, "Quit", "OVER"); }
private void State_Gameover(double now) { STATE = PlayerAState.Gameover; //Entry Action _Clock = now; Send_TAR(double.MaxValue, "OVER"); }
private void State_Defense(double now) { STATE = PlayerAState.Defense; //Entry Action _Clock = now; Send_TAR(double.MaxValue, "BallB", "OutB", "Quit", "OVER"); }
private void State_Attack(double now) { STATE = PlayerAState.Attack; //Entry Action Rally++; U = r.NextDouble(); _Clock = now; Send_TAR(_Clock + aa, "Quit", "OVER"); }
/// <summary> /// Changes the player's attack state to target input player attack state type. IMPORTANT: Also calls the previous state's ExitState before switching. /// </summary> /// <typeparam name="TargetStateType">The intended attack state.</typeparam> public virtual void ChangeAttackState <TargetStateType>() where TargetStateType : PlayerAState { if (CurrentAttackState) { CurrentAttackState.ExitState(); Destroy(CurrentAttackState); } _currentAttackState = gameObject.AddComponent <TargetStateType>(); }
private void State_OVER(double now) { STATE = PlayerAState.OVER; }