Module: AuthorEngine::Part::CollisionDetection

Included in:
Game
Defined in:
lib/author_engine/game/common/parts/collision_detection.rb

Instance Method Summary collapse

Instance Method Details

#bounding_box(sprite_index) ⇒ Object



4
5
6
# File 'lib/author_engine/game/common/parts/collision_detection.rb', line 4

def bounding_box(sprite_index)
  @authorengine_collision_detection.box(sprite_index)
end

#colliding_edge(sprite_index, sprite_x, sprite_y, target_sprite_index, target_x, target_y) ⇒ Object



8
9
10
# File 'lib/author_engine/game/common/parts/collision_detection.rb', line 8

def colliding_edge(sprite_index, sprite_x, sprite_y, target_sprite_index, target_x, target_y)
  @authorengine_collision_detection.colliding_edge(sprite_index, sprite_x, sprite_y, target_sprite_index, target_x, target_y)
end

#draw_level_boxes(level_index) ⇒ Object



24
25
26
# File 'lib/author_engine/game/common/parts/collision_detection.rb', line 24

def draw_level_boxes(level_index)
  @authorengine_collision_detection.debug_draw_level(level_index)
end

#draw_sprite_box(sprite_index, sprite_x, sprite_y) ⇒ Object



20
21
22
# File 'lib/author_engine/game/common/parts/collision_detection.rb', line 20

def draw_sprite_box(sprite_index, sprite_x, sprite_y)
  @authorengine_collision_detection.debug_draw_sprite(sprite_index, sprite_x, sprite_y)
end

#render_bounding_box(sprite_index, box, sprite_x, sprite_y, edges = {}, z = Float::INFINITY) ⇒ Object



28
29
30
# File 'lib/author_engine/game/common/parts/collision_detection.rb', line 28

def render_bounding_box(sprite_index, box, sprite_x, sprite_y, edges = {}, z = Float::INFINITY)
  @authorengine_collision_detection.render_bounding_box(sprite_index, box, sprite_x, sprite_y, edges, z)
end

#sprite_vs_level(sprite_index, sprite_x, sprite_y, level) ⇒ Object



16
17
18
# File 'lib/author_engine/game/common/parts/collision_detection.rb', line 16

def sprite_vs_level(sprite_index, sprite_x, sprite_y, level)
  @authorengine_collision_detection.sprite_vs_level(sprite_index, sprite_x, sprite_y, level)
end

#sprite_vs_sprite(sprite_index, sprite_x, sprite_y, target_sprite_index, target_x, target_y) ⇒ Object



12
13
14
# File 'lib/author_engine/game/common/parts/collision_detection.rb', line 12

def sprite_vs_sprite(sprite_index, sprite_x, sprite_y, target_sprite_index, target_x, target_y)
  @authorengine_collision_detection.sprite_vs_sprite(sprite_index, sprite_x, sprite_y, target_sprite_index, target_x, target_y)
end