An Int Variable can store an integer/whole number {... -3, -2, -1, 0, 1, 2, 3 ...}
Int Variables are good at representing properties with discrete values such as numberOfLives, coinCount, childIndex...
Int Variables are often used as counters in an FSM.
Examples
Increase Score
- This example uses an int variable: score
- The Int Add action adds 5 to the score.
- Then the Int Compare action compares the score to 100.
- If the score is equal or greater than 100 it send the Bonus event.
- The FSM might respond to the Bonus event by spawning some particle effects...
See Also: