Answer by Baste
A big question here is "why?". You usually want to allow the player to press several buttons at once. Also, GetButtonDown only registers on the frame the button is pressed - which means that two of...
View ArticleAnswer by Jarnak
Well, you could put this in your Update(). There is surely a better way, but it's the first that came into my mind. int count = 0; bool tooManyKey = false; foreach (KeyCode kc in...
View ArticleAnswer by LaneFox
Assuming the keys are known, I would use a static bool to gate the input logic. public class Keys : MonoBehaviour { public static bool SomeKeyIsDown; void Update() { if (!SomeKeyIsDown &&...
View ArticleAnswer by Baste
A big question here is "why?". You usually want to allow the player to press several buttons at once. Also, GetButtonDown only registers on the frame the button is pressed - which means that two of...
View ArticleAnswer by Jarnak
Well, you could put this in your Update(). There is surely a better way, but it's the first that came into my mind. int count = 0; bool tooManyKey = false; foreach (KeyCode kc in...
View ArticleAnswer by LaneFox
Assuming the keys are known, I would use a static bool to gate the input logic. public class Keys : MonoBehaviour { public static bool SomeKeyIsDown; void Update() { if (!SomeKeyIsDown &&...
View Article