Class Crate
Parent: MovingSprite
Crates are heavy boxes Alex can move around. They can be used to unblock paths, kill enemies or just for fun.
It is generally a bad idea to use a large number of stacked crates, because they tend to behave in a weird manor if you hit multiple of them at once. As long as you ensure only one crate is hit at a time, everything should be fine.
Alex can’t move stacks of crates. Instead, the whole stack will come down when you move a crate out of it; when crates stand next to each other, Alex is not able to move two crates in a row.
Class Methods
new
new() → a_crate
Create a new crate with the default values.
Instance Methods
smash
smash()
Smash the crate into pieces, removing it from the level.