Esempio n. 1
0
File: Input.cs Progetto: cuongdv/stg
        public void Push(PadState history)
        {
            if (History.Count >= Capacity)
            {
                History.RemoveFirst();
            }

            History.AddLast(history);
        }
Esempio n. 2
0
File: Input.cs Progetto: cuongdv/stg
        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);
        }
Esempio n. 3
0
File: Input.cs Progetto: cuongdv/stg
 public override void OnAwake()
 {
     PadHistory = new PadInputHistory(PadHistorySize);
     CurInput   = new PadState();
 }