Esempio n. 1
0
        public override string ToString()
        {
            string outString = " " + Name;

            for (; outString.Length < 11;)
            {
                outString += " ";
            }

            string boolsString = "| " + IsDown.ToString();

            for (; boolsString.Length < 12;)
            {
                boolsString += " ";
            }
            outString += boolsString;

            boolsString = "| " + IsUp.ToString();
            for (; boolsString.Length < 12;)
            {
                boolsString += " ";
            }
            outString += boolsString;

            boolsString = "| " + IsPressed.ToString();
            for (; boolsString.Length < 12;)
            {
                boolsString += " ";
            }
            outString += boolsString;


            outString += $"| {IsToggled}";
            return(outString);
        }
Esempio n. 2
0
        public bool ActionUp(InputActions action)
        {
            if (!IsPressed.ContainsKey(action))
            {
                return(false);
            }

            return(!IsPressed[action]);
        }
Esempio n. 3
0
        public bool ActionReleased(InputActions action)
        {
            if (!IsPressed.ContainsKey(action) || !WasPressed.ContainsKey(action))
            {
                return(false);
            }

            return(!IsPressed[action] && WasPressed[action]);
        }
 public void Press()
 {
     IsPressed?.Invoke();
 }
Esempio n. 5
0
 public bool ActionDown(InputActions action)
 {
     return(IsPressed.ContainsKey(action) && IsPressed[action]);
 }
Esempio n. 6
0
 public void DoIsPressed() => IsPressed?.Invoke();