Class Armadillo
Parent: Enemy
Hit once, the armadillo hides in its shell until it thinks danger is over. If you hit the shell, it will start to roll and kill other enemies in its way — or you if you don’t take care.
Events
- Downgrade
-
This event gets triggered when the armadillo gets stumped upon. The event handlers gets passed to arguments, but you should ignore them as they are of no useful value (because an armadillo does not die from stumping upon it).
Class Methods
new
new() → a_armadillo
Creates a new armadillo with the default values.
Instance Methods
color
color() → a_symbol
Return’s the armadillo’s color. See #color= for a list of possible return values.
color=
color=( col ) → col
Specify the armadillo’s color (the default is :red).
Parameters
- col
-
The armadillo’s new color. One of these symbols: :red, :green.
shell_moving?
shell_moving?() → true or false
Checks whether or not the armadillo is in its shell and moving.
shell_standing?
shell_standing?() → true or false
Checks whether or not the armadillo is in its shell and not moving.
shelled?
shelled?() → true or false
Checks whether or not the armadillo is in its shell, regardless of whether the shell is moving or not.
stand_up
stand_up()
If the armadillo is in its shell, make it come out and walk again. If the armadillo is not in its shell, does nothing.
walking?
walking?() → true or false
Checks whether or not the armadillo is walking currently.