Class: Zombie
- Includes:
- ZombieInterface
- Defined in:
- lib/zombie-chaser/human.rb
Instance Attribute Summary
Attributes inherited from Human
Instance Method Summary collapse
- #actor_direction ⇒ Object
-
#initialize(*args) ⇒ Zombie
constructor
A new instance of Zombie.
Methods included from ZombieInterface
#actor_type, #current_symbol, #eat_human, #increase_angle_by, #notify_finished, #shuffle_in_one_place
Methods inherited from Human
#actor_state, #actor_type, #build_view_queue, #current_symbol, #dead?, #get_eaten, new_using_test_unit_handler, #no_other_living_zombies_in?, #notify_finish_dying, #notify_finished, #notify_passing_step, #notify_start_dying, #notify_world, #run, #run_tests, #test_suite_size, #update_view
Methods inherited from Actor
#actor_type, #calculate_x, #calculate_y, #draw, #image, sprites, window, #window, window=, #x, #y, #z
Constructor Details
#initialize(*args) ⇒ Zombie
Returns a new instance of Zombie.
294 295 296 297 |
# File 'lib/zombie-chaser/human.rb', line 294 def initialize(*args) @lurch_offset = 0 super end |
Instance Method Details
#actor_direction ⇒ Object
299 300 301 |
# File 'lib/zombie-chaser/human.rb', line 299 def actor_direction (@angle * -360.0 / (2 * Math::PI) + @lurch_offset) end |