Exemple #1
0
        public void Push(PadState history)
        {
            if (History.Count >= Capacity)
            {
                History.RemoveFirst();
            }

            History.AddLast(history);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
 public override void OnAwake()
 {
     PadHistory = new PadInputHistory(PadHistorySize);
     CurInput   = new PadState();
 }