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
- #draw_angle ⇒ Object
- #draw_zorder ⇒ Object
- #image_filename ⇒ Object
- #should_fall? ⇒ Boolean
- #update ⇒ Object
Methods inherited from OwnedEntity
#all_state, #as_json, #owner, #owner=, #update_from_json
Methods inherited from Entity
#accelerate, #all_state, #angle_to_vector, #as_json, #bottom_cell_y, #destroy!, #direction_to, #doomed?, #draw, #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, #opaque, #pixel_x, #pixel_y, #release!, #right_cell_x, #sleep_now?, #to_s, #top_cell_y, #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
#draw_angle ⇒ Object
14 |
# File 'lib/game_2d/entity/destination.rb', line 14 def draw_angle; space.game.tick % 360; end |
#draw_zorder ⇒ Object
13 |
# File 'lib/game_2d/entity/destination.rb', line 13 def draw_zorder; ZOrder::Destination; end |
#image_filename ⇒ Object
11 |
# File 'lib/game_2d/entity/destination.rb', line 11 def image_filename; "destination.png"; end |
#should_fall? ⇒ Boolean
7 |
# File 'lib/game_2d/entity/destination.rb', line 7 def should_fall?; false; end |
#update ⇒ Object
9 |
# File 'lib/game_2d/entity/destination.rb', line 9 def update; end |