public void Push(PadState history) { if (History.Count >= Capacity) { History.RemoveFirst(); } History.AddLast(history); }
private PadState DetectInput() { var state = new PadState(); // 発射ボタン var isFireButtonDown = UnityEngine.Input.GetButtonDown("Fire1"); if (isFireButtonDown == true) { state.FireButton = ButtonState.On; } // レバー状態 var hAxis = UnityEngine.Input.GetAxis("Horizontal"); var vAxis = UnityEngine.Input.GetAxis("Vertical"); var leverState = CalcLeverState(hAxis, vAxis); return(state); }
public override void OnAwake() { PadHistory = new PadInputHistory(PadHistorySize); CurInput = new PadState(); }