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); }
public bool ActionUp(InputActions action) { if (!IsPressed.ContainsKey(action)) { return(false); } return(!IsPressed[action]); }
public bool ActionReleased(InputActions action) { if (!IsPressed.ContainsKey(action) || !WasPressed.ContainsKey(action)) { return(false); } return(!IsPressed[action] && WasPressed[action]); }
public void Press() { IsPressed?.Invoke(); }
public bool ActionDown(InputActions action) { return(IsPressed.ContainsKey(action) && IsPressed[action]); }
public void DoIsPressed() => IsPressed?.Invoke();