Im trying to clean up my Playercontroller and thought i could do a switch/case with the Input of which or if any Button is pressed at this frame instead of all these if/else in one function.
im trying to implement sth like that:
WhateverType KeyboardInput = null;
switch(getKeyboardInput())
{
case Keycode.W: PlayerMovement(V3Up; break;
case Keycode.S: PlayerMovement(V3Down); break;
...
case null: break;
}
But i just don’t know how can i get the Keyboard Input stored in a varibale
may you know
thx in advice
CKM