Sha256: 2ad08232a181226deda2e8be112cb7d5d080049b8f9a42052d600c5f2dd2e210

Contents?: true

Size: 1.33 KB

Versions: 3

Compression:

Stored size: 1.33 KB

Contents

class AuthorEngine
  class Part
    module CollisionDetection
      def bounding_box(sprite_index)
        @authorengine_collision_detection.box(sprite_index)
      end

      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

      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

      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

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

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

      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
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
author_engine-0.9.0 lib/author_engine/game/common/parts/collision_detection.rb
author_engine-0.8.0 lib/author_engine/game/common/parts/collision_detection.rb
author_engine-0.7.0 lib/author_engine/game/common/parts/collision_detection.rb