Question: 12. State variables? 1 point possible (graded) Why did we use inputStates and gameStates variables? O It's just how Professor Buffa programs games. It's not
12. State variables? 1 point possible (graded) Why did we use inputStates and gameStates variables? O It's just how Professor Buffa programs games. It's not best practice to use state variables like this. O A game is a state machine. The states are changed depending on user interactions, collisions, or game conditions; and the mainloop will refer to the current states to make the game respond accordingly. O We could have changed the x and y coordinates of the player in the key or mouse event listeners, and that would have done the same thing. Previous Unit Sprite-based animation (9-11 Next Unit Video introduction-Week 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
