I'm trying to make a command that activates an animation when I press 2 keyboard keys and when I stop pressing one of them, that animation stops. For example I chose the "w" + "leftShift" key, when both are pressed I want to start the animation, "RUN". When I stop pressing "leftShift", I want it to start a walking animation "WALK", and lastly when I stop pressing "w", I want it to start an iddle "iddle" animation. can anybody help me? Here is the command I'm trying to make work:
if (Input.GetKey(KeyCode.LeftShift) + (Input.GetKey ("w"))) {
animationController.PlayAnimation (AnimationStates.RUN);
}