Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualDiegoSLTS

Posted 03 June 2014 - 04:34 PM

It highly depends on more parts of your code (those few lines are really not useful, it's just one line of code and an enum), but since you're working with states you must define what state transitions are valid and what triggers them. When you press the "jump" key check if the state is a valid state to trasition to jumping.

 

Also... that enum doesn't have a JUMPING element, is that your actual code?


#1DiegoSLTS

Posted 03 June 2014 - 04:34 PM

It highly depends on more parts of your code (those few lines are really not useful, it's just one line of code and an enum), but since you're working with states you must define what state transitions are valid and what triggers them. When you press the "jump" key check if the state is a valid state to trasition to jumping.


PARTNERS