@UnderwaterAstronaut
I like how you change the animation of your sprite depending on the direction it is facing in:
@richard
I know you can define and code enums in TypeScript, but is there any block code to define an enum? For instance, in block code define an variable having the name ‘DirectionFacing’ with the values Left, Right, Up, Down
This produces the script
enum DirectionFacing {
Left,
Right,
Up,
Down
}
Assume the variable direction has been set to DirectionFacing.Left in block code:
if (direction == DirectionFacing.Left){
}