Class Std::ClimbingBox
This class adds a climbing plant into a given box. Use it like this:
c = ClimbingBox.new(UIDS[14], count: 4) c.attach
This will create a climbing plant with 4 middle sprites (and a top sprite) and attaches it to the box with UID 14. When that one gets activated, the climbing plant will come out of it.
Once you called #attach, climbing boxes automatically save its state to a savegame, so you don’t have to do that manually by hooking into the level save and load events.
Class Methods
new
new( box, opts ) → a_climbing_box
Create a new climbing plant box.
Parameters
- box
-
A Box instance to attach the climbing plant to.
- opts
-
Hash for keyword arguments.
- count
-
The number of sprites the plant shall have.
- middle_graphic = "ground/green_1/ladder.png"
-
Middle graphic of the plant.
- top_graphic = "ground/green_1/ladder_head.png"
-
Top graphci of the plant.
Instance Methods
activated?
activated?() → bool
TODO: Docs
attach
attach()
Attach the climbing plant to its box.
hide_plant
hide_plant()
Immediately hide the entire climbing plant.
show_plant
show_plant()
Immediately show the entire climbing plant.