Class: Entity::Destination
- Inherits:
-
OwnedEntity
- Object
- Entity
- OwnedEntity
- Entity::Destination
- Defined in:
- lib/game_2d/entity/destination.rb
Constant Summary
Constants included from EntityConstants
EntityConstants::CELL_WIDTH_IN_PIXELS, EntityConstants::MAX_VELOCITY, EntityConstants::PIXEL_WIDTH, EntityConstants::WIDTH
Instance Attribute Summary
Attributes inherited from OwnedEntity
Attributes inherited from Entity
#a, #moving, #space, #x, #x_vel, #y, #y_vel
Instance Method Summary collapse
- #destroy! ⇒ Object
- #draw_angle ⇒ Object
- #draw_zorder ⇒ Object
- #image_filename ⇒ Object
- #should_fall? ⇒ Boolean
- #teleportable? ⇒ Boolean
- #update ⇒ Object
Methods inherited from OwnedEntity
#all_state, #as_json, #owner, #owner=, #update_from_json
Methods inherited from Entity
#above, #accelerate, #all_state, #angle_to_vector, #as_json, #beneath, #bottom_cell_y, #cx, #cy, #direction, #direction_to, #doomed?, #draw, #draw_animation, #draw_image, #drop_diagonal, #empty_above?, #empty_on_left?, #empty_on_right?, #empty_underneath?, #entities_obstructing, #going_past_entity, #grab!, #grabbed?, #harmed_by, #i_hit, #initialize, #left_cell_x, #move, #move_x, #move_y, #moving?, #next_to, #occupied_cells, #on_left, #on_right, #opaque, #pixel_x, #pixel_y, #release!, #right_cell_x, #sleep_now?, #slide_around, #slow_by, #slower_speed, #to_s, #top_cell_y, #underfoot, #update_from_json, #vector_to_angle, #wake!, #warp
Methods included from ClassMethods
#bottom_cell_y_at, #constrain_velocity, #left_cell_x_at, #right_cell_x_at, #top_cell_y_at
Methods included from Transparency
Methods included from Registerable
#nullsafe_registry_id, #registry_id, #registry_id=, #registry_id?, #registry_id_safe
Methods included from Serializable
#<=>, #==, #all_state, as_json, #eql?, from_json, #hash, #to_json, #to_s, #update_from_json
Constructor Details
This class inherits a constructor from Entity
Instance Method Details
#destroy! ⇒ Object
18 19 20 |
# File 'lib/game_2d/entity/destination.rb', line 18 def destroy! space.doom owner end |
#draw_angle ⇒ Object
16 |
# File 'lib/game_2d/entity/destination.rb', line 16 def draw_angle; space.game.tick % 360; end |
#draw_zorder ⇒ Object
15 |
# File 'lib/game_2d/entity/destination.rb', line 15 def draw_zorder; ZOrder::Destination; end |
#image_filename ⇒ Object
13 |
# File 'lib/game_2d/entity/destination.rb', line 13 def image_filename; "destination.png"; end |
#should_fall? ⇒ Boolean
7 |
# File 'lib/game_2d/entity/destination.rb', line 7 def should_fall?; false; end |
#teleportable? ⇒ Boolean
9 |
# File 'lib/game_2d/entity/destination.rb', line 9 def teleportable?; false; end |
#update ⇒ Object
11 |
# File 'lib/game_2d/entity/destination.rb', line 11 def update; end |