Class Gee
Parent: Enemy
The Gee is a flying monster that moves slowly or quickly along a fixed path. Red gees are immunate to fire attacks.
Class Methods
new
new() → a_gee
Create a new gee with the default values.
Instance Methods
always_flying=
always_flying( bool ) → bool
Set to true to have this gee never wait.
always_flying?
always_flying?() → true or false
Check whether this gee is always moving.
color
color() → a_symbol
Retrieve the gee’s color.
Return value
The gee’s current color as a symbol. See #color= for possible values.
color=
color=( color ) → color
Set this gee’s color. Note that changing color also resets some attributes depending on the color (i.e. if you make a gee :red, it will automatically gain fire resistance, which you could then undo by calling #fire_resistance= on it afterwards).
Parameters
- color
-
One of the following, self-explanatory symbols: :red, :green, :blue.
fly_speed
fly_speed() → a_float
Returns the gee’s flying velocity.
fly_speed=
fly_speed=( speed ) → speed
Set the gee’s flying velocity.
Parameters
- speed
The new flying velocity. A float.
max_distance
max_distance() → an_integer
The maximum distance the gee may travel, in pixels.
max_distance=
max_distance=( distance ) → distance
Set the maximum distance the gee may move.
Parameters
- distance
The maximum distance to travel, in pixels.
wait_time
wait_time() → a_float
Returns the number of seconds the gee waits between movements as a float. Note this value is ignored if `always_flying?` is `true`.
wait_time=
wait_time=( seconds ) → seconds
Specify how long to wait between movements. Note this value is ignored if #always_flying is true.
Parameters
- seconds
-
New number of seconds to wait until next movement. A float.