Sha256: c3b42fd2dca6f082ae57a3afc9d39104a0319677f740ddc5a78d93b7d9b61230

Contents?: true

Size: 1.24 KB

Versions: 5

Compression:

Stored size: 1.24 KB

Contents

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

      def colliding_edge(sprite_index, sprite_x, sprite_y, target_sprite_index, target_x, target_y)
        @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)
        @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)
        @collision_detection.sprite_vs_level(sprite_index, sprite_x, sprite_y, level)
      end

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

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

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
author_engine-0.6.1 lib/author_engine/game/common/parts/collision_detection.rb
author_engine-0.6.0 lib/author_engine/game/common/parts/collision_detection.rb
author_engine-0.5.0 lib/author_engine/game/common/parts/collision_detection.rb
author_engine-0.4.0 lib/author_engine/game/common/parts/collision_detection.rb
author_engine-0.3.1 lib/author_engine/game/common/parts/collision_detection.rb