or2d 0.0.1.pre.rc1 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bf0597361e53518e19601f4e1a17341d5bcba4a55eb76541f6b7c228c32222ec
4
- data.tar.gz: 8e83ff4280a96860f70ad048b5f41d786ed80fd1d87bb480679d5fe51be00c03
3
+ metadata.gz: 84ff6f80df77d3cdf1c7d68a9c807c6f91024150984ee4848f6852f7d1f1e73a
4
+ data.tar.gz: 1f3c4e7a6f0f88acea2ec63ad7c78f5c2a76e8417abbeba4b0fd5fbdbf7b8d53
5
5
  SHA512:
6
- metadata.gz: 839294376a8000552136d439f56f7043b0398cfe5a1c20a0fe19093bd8fc984ca105db82dd08437b28266690b507914a1fb65fdd1db025afe747efbafdd58661
7
- data.tar.gz: a648146556ab88b70f614bc6b6559cf292352b366d04ce2c7504f479d8699d378f1e04bd107a7e049100ac993d853df63c0039b13245b8279d3238fb3ddb5ede
6
+ metadata.gz: 3c63db0c5fb39018dd3054d4fc83121ab697dca0326f5b46ee3d4ec0f2917df3de83be7bd2cbbdfc6e34ba420f7fa9032ba584caab150c73d6343e20904f9aa9
7
+ data.tar.gz: a24f90e8eb8749a3f92cc24120ffe1aa21b7906226cd1c110574ed1384839783dad6308664e98b5f8b3af38700a65e844f97fc79ec689cfa2cd44f79e1d5c8d8
File without changes
File without changes
File without changes
@@ -0,0 +1,87 @@
1
+ module OR2D
2
+ class Camera
3
+
4
+ # The target of the camera.
5
+ # @return [OR2D::Entity] the target of the camera
6
+ attr_reader :target
7
+
8
+ # The viewport of the camera.
9
+ # @return [OR2D::Entity] the viewport of the camera
10
+ attr_reader :viewport
11
+
12
+ # Constructs a new Camera object.
13
+ # @param viewport_width [Integer] the width of the viewport
14
+ # @param viewport_height [Integer] the height of the viewport
15
+ # @param target [OR2D::Entity] the target of the camera
16
+ def initialize(viewport_width = OR2D.game.screen_width,
17
+ viewport_height = OR2D.game.screen_height,
18
+ target = OR2D::Entity.new(:square, { size: 1, x: 0, y: 0, show: false }),
19
+ speed = 1)
20
+ @target = target
21
+ @speed = speed
22
+ @viewport = OR2D::Entity.new(:rectangle, {
23
+ x: (OR2D.game.screen_width / 2) - viewport_width,
24
+ y: (OR2D.game.screen_height / 2) + viewport_height,
25
+ width: viewport_width,
26
+ height: viewport_height,
27
+ show: false
28
+ })
29
+ end
30
+
31
+ def update; end
32
+
33
+ def scroll(direction, amount, target: false)
34
+ case direction
35
+ when :north then scroll_north(amount, target)
36
+ when :south then scroll_south(amount, target)
37
+ when :east then scroll_east(amount, target)
38
+ when :west then scroll_west(amount, target)
39
+ else raise ArgumentError, "Invalid direction: #{direction}"
40
+ end
41
+ end
42
+
43
+ # Simulates a northern camera scroll by moving all of the visible entities on the screen to the south.
44
+ # @param delta_y [Integer] the amount to scroll each entity
45
+ # @param target [Boolean] whether or not to scroll the target
46
+ def scroll_north(delta_y, target)
47
+ OR2D.game.entities.each_value do |entity|
48
+ next if !target && entity == @target
49
+
50
+ entity.screen_y += delta_y
51
+ end
52
+ end
53
+
54
+ # Simulates a southern camera scroll by moving all of the visible entities on the screen to the north.
55
+ # @param delta_y [Integer] the amount to scroll each entity
56
+ # @param target [Boolean] whether or not to scroll the target
57
+ def scroll_south(delta_y, target)
58
+ OR2D.game.entities.each_value do |entity|
59
+ next if !target && entity == @target
60
+
61
+ entity.screen_y -= delta_y
62
+ end
63
+ end
64
+
65
+ # Simulates an eastern camera scroll by moving all of the visible entities on the screen to the west.
66
+ # @param delta_x [Integer] the amount to scroll each entity
67
+ # @param target [Boolean] whether or not to scroll the target
68
+ def scroll_east(delta_x, target)
69
+ OR2D.game.entities.each_value do |entity|
70
+ next if !target && entity == @target
71
+
72
+ entity.screen_x -= delta_x
73
+ end
74
+ end
75
+
76
+ # Simulates a western camera scroll by moving all of the visible entities on the screen to the east.
77
+ # @param delta_x [Integer] the amount to scroll each entity
78
+ # @param target [Boolean] whether or not to scroll the target
79
+ def scroll_west(delta_x, target)
80
+ OR2D.game.entities.each_value do |entity|
81
+ next if !target && entity == @target
82
+
83
+ entity.screen_x += delta_x
84
+ end
85
+ end
86
+ end
87
+ end
@@ -0,0 +1,39 @@
1
+ module OR2D::Cameras
2
+ class CenteredCamera < OR2D::Camera
3
+ def initialize(target = nil)
4
+ super(OR2D.game.screen_width, OR2D.game.screen_height, target, 1.scale)
5
+ orientate
6
+ @scrolling = false
7
+ @direction = nil
8
+ end
9
+
10
+ def update
11
+ orientate
12
+ return unless @scrolling
13
+
14
+ case @direction
15
+ when :north then scroll_north(@speed, false)
16
+ when :south then scroll_south(@speed, false)
17
+ when :east then scroll_east(@speed, false)
18
+ when :west then scroll_west(@speed, false)
19
+ end
20
+
21
+ reset_scrolling
22
+ end
23
+
24
+ def scroll(direction, amount)
25
+ @scrolling = true
26
+ @direction = direction
27
+ @speed = amount
28
+ end
29
+
30
+ def orientate
31
+ @target.screen_x = OR2D.game.screen_width / 2
32
+ @target.screen_y = OR2D.game.screen_height / 2
33
+ end
34
+
35
+ def reset_scrolling
36
+ @scrolling = false
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,65 @@
1
+ module OR2D::Cameras
2
+ # A PaddedCamera is a camera that has padding. When the target <OR2D::Entity> reaches the edge of the padding, the camera will scroll.
3
+ class PaddedCamera < OR2D::Camera
4
+ # Constructs a new PaddedCamera.
5
+ # @param target [OR2D::Entity] the target of the camera
6
+ # @param padding_width [Integer] the width of the padding
7
+ # @param padding_height [Integer] the height of the padding
8
+ def initialize(padding_width = 512, padding_height = 512, target = nil)
9
+ @padding_width = padding_width
10
+ @padding_height = padding_height
11
+ super(@padding_width, @padding_height, target, 1.scale)
12
+ orientate
13
+ end
14
+
15
+ # Updates the camera.
16
+ def update
17
+ scroll if should_scroll?
18
+ end
19
+
20
+ # Checks if the camera should scroll. This check is done by checking if the target <OR2D::Entity> is within the <OR2D::Cameras::PaddedCamera#boundary>.
21
+ # @return [Boolean] true if the camera should scroll, false otherwise
22
+ def should_scroll?
23
+ should_scroll_east? || should_scroll_west? || should_scroll_north? || should_scroll_south?
24
+ end
25
+
26
+ def should_scroll_east?
27
+ @target.screen_x >= (@viewport.screen_x + @viewport.width)
28
+ end
29
+
30
+ def should_scroll_west?
31
+ @target.screen_x <= (@viewport.screen_x - @viewport.width)
32
+ end
33
+
34
+ def should_scroll_north?
35
+ @target.screen_y <= (@viewport.screen_y - @viewport.height)
36
+ end
37
+
38
+ def should_scroll_south?
39
+ @target.screen_y >= (@viewport.screen_y + @viewport.height)
40
+ end
41
+
42
+ def scroll
43
+ if should_scroll_east?
44
+ super(:east, @speed, target: true)
45
+ @viewport.screen_x += @speed
46
+ elsif should_scroll_west?
47
+ super(:west, @speed, target: true)
48
+ @viewport.screen_x -= @speed
49
+ end
50
+
51
+ if should_scroll_north?
52
+ super(:north, @speed, target: true)
53
+ @viewport.screen_y -= @speed
54
+ elsif should_scroll_south?
55
+ super(:south, @speed, target: true)
56
+ @viewport.screen_y += @speed
57
+ end
58
+ end
59
+
60
+ def orientate
61
+ @target.screen_x = @viewport.screen_x + @viewport.width / 2
62
+ @target.screen_y = @viewport.screen_y + @viewport.height / 2
63
+ end
64
+ end
65
+ end
@@ -39,6 +39,16 @@ module OR2D
39
39
  OR2D.game.remove_entity(id)
40
40
  end
41
41
 
42
+ def each_layer(&block)
43
+ @layers.each(&block)
44
+ end
45
+
46
+ def toggle_boundary
47
+ @layers.each_key do |key|
48
+ OR2D.game.entities[key].toggle_boundary
49
+ end
50
+ end
51
+
42
52
  # Show the Composite object.
43
53
  def show
44
54
  @layers.each do |id, properties|
File without changes
File without changes
File without changes
data/lib/or2d/console.rb CHANGED
@@ -18,17 +18,16 @@ module OR2D
18
18
  height: (OR2D.game.window.get(:height) / 2),
19
19
  color: 'green', opacity: 0.25)
20
20
  OR2D.game.window.add(@boundary)
21
- @properties = { input_size: (8 * OR2D.scale), output_size: (4 * OR2D.scale), max_length: options[:max_length] || 24 }
22
- @properties[:max_lines] = (@boundary.height / (@properties[:output_size] * OR2D.scale)).to_i - @properties[:output_size]
23
-
21
+ @properties = { input_size: 8.scale, output_size: 4.scale, max_length: options[:max_length] || 24 }
22
+ @properties[:max_lines] = (@boundary.height / @properties[:output_size].scale).to_i - @properties[:output_size]
24
23
 
25
24
  @prompt = options[:prompt] || '>> '
26
25
  @buffer = String.new
27
26
  @display = OR2D::Composites::Text.new
28
27
  @display.add_line(text: 'OR2D Console', color: 'yellow', size: @properties[:output_size],
29
- x: @boundary.x + 16, y: @boundary.y + (16 * OR2D.scale), z: @boundary.z + 1)
28
+ x: @boundary.x + 16, y: @boundary.y + 16.scale, z: @boundary.z + 1)
30
29
  @input = OR2D::Entity.new(:text, { text: @prompt, color: 'white',
31
- x: @boundary.x + 16, y: (@boundary.y + @boundary.height) - (16 * OR2D.scale),
30
+ x: @boundary.x + 16, y: (@boundary.y + @boundary.height) - 16.scale,
32
31
  z: @boundary.z + 1, size: @properties[:input_size],
33
32
  show: true })
34
33
  @state = State.new(:RETRACTED, false, false)
@@ -62,7 +61,7 @@ module OR2D
62
61
  @state.drawn = false
63
62
  end
64
63
  when :PULL_DOWN
65
- if @boundary.y <= -16 * OR2D.scale
64
+ if @boundary.y <= -16.scale
66
65
  @boundary.y += 16
67
66
  @input.y += 16
68
67
  @display.y += 16 unless @display.empty?
@@ -157,8 +156,8 @@ module OR2D
157
156
  puts e.backtrace
158
157
  end
159
158
 
160
- @display.add_line(text: "#{@buffer} #=> #{output}",
161
- size: @properties[:output_size],
159
+ @display.add_line(text: "#{@buffer} #=> #{output}",
160
+ size: @properties[:output_size],
162
161
  color: 'white',
163
162
  show: true)
164
163
  @buffer.clear
data/lib/or2d/entity.rb CHANGED
@@ -14,20 +14,30 @@ module OR2D
14
14
  # @return [Ruby2D::Image, Ruby2D::Sprite, Ruby2D::Text, Ruby2D::Triangle, Ruby2D::Quad, Ruby2D::Circle, Ruby2D::Square, Ruby2D::Line, Ruby2D::Rectangle] the entity's resource
15
15
  attr_reader :resource
16
16
 
17
+ # @!attribute [r] previous_x
18
+ # @return [Integer] the entity's previous x coordinate
19
+ attr_reader :previous_screen_x
20
+
21
+ # @!attribute [r] previous_y
22
+ # @return [Integer] the entity's previous y coordinate
23
+ attr_reader :previous_screen_y
24
+
17
25
  # Constructs a new Entity object.
18
26
  # @param type [Symbol] the type of entity to create
19
27
  # @param options [Hash] the options to create the entity with
20
28
  def initialize(type, options = {})
21
29
  super(x: options[:x] || 0,
22
30
  y: options[:y] || 0,
23
- width: options[:width].nil? ? 1 : options[:width] * OR2D.scale,
24
- height: options[:height].nil? ? 1 : options[:height] * OR2D.scale,
31
+ width: options[:width].nil? ? 1 : options[:width].scale,
32
+ height: options[:height].nil? ? 1 : options[:height].scale,
25
33
  opacity: options[:show_boundary] ? 0.55 : 0.0,
26
34
  color: 'green')
27
35
  @id = options[:id] || SecureRandom.uuid
28
36
  @resource = options[:resource] || OR2D::Resource.create(type, options)
29
37
  @width = @resource.width if @resource.respond_to?(:width)
30
38
  @height = @resource.height if @resource.respond_to?(:height)
39
+ @previous_screen_x = options[:x] || 0
40
+ @previous_screen_y = options[:y] || 0
31
41
  show if options[:show]
32
42
  ensure
33
43
  OR2D.game.add_entity(self)
@@ -36,6 +46,7 @@ module OR2D
36
46
  # Set the Entity x coordinate.
37
47
  # @param x_coordinate [Integer] the x coordinate of the Entity on the screen
38
48
  def x=(x_coordinate)
49
+ @previous_screen_x = @x
39
50
  super(x_coordinate)
40
51
  @resource.x = x_coordinate if @resource.respond_to?(:x=)
41
52
  end
@@ -43,6 +54,7 @@ module OR2D
43
54
  # Set the Entity y coordinate.
44
55
  # @param y_coordinate [Integer] the y coordinate of the Entity on the screen
45
56
  def y=(y_coordinate)
57
+ @previous_screen_x = @y
46
58
  super(y_coordinate)
47
59
  @resource.y = y_coordinate if @resource.respond_to?(:y=)
48
60
  end
@@ -56,6 +68,10 @@ module OR2D
56
68
  end
57
69
  end
58
70
 
71
+ def contains?(x, y)
72
+ (@x1..@x2).cover?(x) && (@y1..@y4).cover?(y)
73
+ end
74
+
59
75
  # Show the entity on the game instance window.
60
76
  def show
61
77
  OR2D.game.window.add(self)
@@ -74,5 +90,12 @@ module OR2D
74
90
  OR2D.game.window.remove(@resource) if @resource
75
91
  OR2D.game.remove_entity(@id)
76
92
  end
93
+
94
+ alias screen_x x
95
+ alias screen_y y
96
+ alias screen_z z
97
+ alias screen_x= x=
98
+ alias screen_y= y=
99
+ alias screen_z= z=
77
100
  end
78
101
  end
data/lib/or2d/instance.rb CHANGED
@@ -88,6 +88,18 @@ module OR2D
88
88
  @window.close
89
89
  end
90
90
 
91
+ # The width of the game window.
92
+ # @return [Integer] the width of the game window
93
+ def screen_width
94
+ @window.get(:width)
95
+ end
96
+
97
+ # The height of the game window.
98
+ # @return [Integer] the height of the game window
99
+ def screen_height
100
+ @window.get(:height)
101
+ end
102
+
91
103
  private
92
104
 
93
105
  def setup
@@ -181,6 +193,5 @@ module OR2D
181
193
  puts "An error occurred while processing the current scene: #{e.message}"
182
194
  puts e.backtrace if OR2D.debug?
183
195
  end
184
-
185
196
  end
186
197
  end
@@ -0,0 +1,5 @@
1
+ class Float
2
+ def scale
3
+ self * OR2D.scale.to_f
4
+ end
5
+ end
@@ -0,0 +1,7 @@
1
+ class Integer
2
+
3
+ # Scale the integer by the game window's scale.
4
+ def scale
5
+ self * OR2D.scale
6
+ end
7
+ end
File without changes
File without changes
File without changes
File without changes
File without changes
data/lib/or2d/resource.rb CHANGED
@@ -41,8 +41,8 @@ module OR2D::Resource
41
41
  def create_image(options)
42
42
  Ruby2D::Image.new(options[:path],
43
43
  atlas: options[:atlas],
44
- width: options[:width] * OR2D.scale || 4,
45
- height: options[:height] * OR2D.scale || 4,
44
+ width: options[:width].scale || 4,
45
+ height: options[:height].scale || 4,
46
46
  opacity: options[:opacity] || 1.0,
47
47
  rotate: options[:rotate] || 0,
48
48
  x: options[:x] || 0,
@@ -58,8 +58,8 @@ module OR2D::Resource
58
58
  y1: options[:y1],
59
59
  x2: options[:x2],
60
60
  y2: options[:y2],
61
- z: options[:z],
62
- width: options[:width] * OR2D.scale || 2,
61
+ z: options[:z] || 0,
62
+ width: options[:width].scale || 2,
63
63
  color: options[:color] || 'yellow',
64
64
  opacity: options[:opacity] || 1.0)
65
65
  end
@@ -71,8 +71,8 @@ module OR2D::Resource
71
71
  Ruby2D::Rectangle.new(x: options[:x] || 0,
72
72
  y: options[:y] || 0,
73
73
  z: options[:z] || 0,
74
- width: options[:width] * OR2D.scale,
75
- height: options[:height] * OR2D.scale,
74
+ width: options[:width].scale,
75
+ height: options[:height].scale,
76
76
  color: options[:color] || 'yellow',
77
77
  opacity: options[:opacity] || 1.0)
78
78
  end
@@ -83,8 +83,8 @@ module OR2D::Resource
83
83
  def create_sprite(options)
84
84
  Ruby2D::Sprite.new(options[:path],
85
85
  atlas: options[:atlas],
86
- width: options[:width] ? options[:width] * OR2D.scale : nil,
87
- height: options[:height] ? options[:height] * OR2D.scale : nil,
86
+ width: options[:width] ? options[:width].scale : nil,
87
+ height: options[:height] ? options[:height].scale : nil,
88
88
  rotate: options[:rotate] || 0,
89
89
  opacity: options[:opacity] || 1.0,
90
90
  loop: options[:loop] || false,
@@ -120,7 +120,7 @@ module OR2D::Resource
120
120
  x: options[:x] || 0,
121
121
  y: options[:y] || 0,
122
122
  z: options[:z] || 0,
123
- size: (options[:size] || 16) * OR2D.scale,
123
+ size: (options[:size] || 16).scale,
124
124
  style: options[:style],
125
125
  font: options[:font] || Ruby2D::Font.default,
126
126
  color: options[:color] || 'yellow',
data/lib/or2d/scene.rb CHANGED
@@ -96,6 +96,11 @@ module OR2D
96
96
  Fiber.yield
97
97
  end
98
98
 
99
+ def clear_descriptors
100
+ @descriptors.each_value { |descriptor| OR2D.game.window.off(descriptor) }
101
+ @descriptors.clear
102
+ end
103
+
99
104
  # Setup event descriptors.
100
105
  def setup_descriptor(label, event, &block)
101
106
  @descriptors[label] = OR2D.game.window.on(event, &block)
@@ -42,7 +42,7 @@ module OR2D::Scenes
42
42
  def setup_events
43
43
  setup_descriptor(:mouse_input, :mouse) do |event|
44
44
  @cursor_position.resource.text = "[x: #{event.x}, y: #{event.y}]"
45
- @cursor_position.width = @cursor_position.resource.text.length * (6 * OR2D.scale)
45
+ @cursor_position.width = @cursor_position.resource.text.length * 6.scale
46
46
  end
47
47
 
48
48
  setup_descriptor(:debug_input, :key_up) do |event|
data/lib/or2d.rb CHANGED
@@ -19,30 +19,37 @@ Dir["#{File.dirname(__FILE__)}/or2d/patches/*.rb"].each { |file| load(file) }
19
19
  # @author Patrick W.
20
20
  # @since 2023-04-26
21
21
  module OR2D
22
- autoload :Animation, 'or2d/animation'
23
- autoload :Composite, 'or2d/composite'
24
- autoload :Console, 'or2d/console'
25
- autoload :Entity, 'or2d/entity'
26
- autoload :Instance, 'or2d/instance'
27
- autoload :Resource, 'or2d/resource'
28
- autoload :Scene, 'or2d/scene'
22
+ autoload :Animation, 'or2d/animation'
23
+ autoload :Composite, 'or2d/composite'
24
+ autoload :Console, 'or2d/console'
25
+ autoload :Camera, 'or2d/camera'
26
+ autoload :Entity, 'or2d/entity'
27
+ autoload :Instance, 'or2d/instance'
28
+ autoload :Resource, 'or2d/resource'
29
+ autoload :Scene, 'or2d/scene'
29
30
 
30
31
  # The Animations module contains modules and classes for animating objects.
31
32
  module Animations
32
- autoload :CompositeAnimations, 'or2d/animations/composite_animations'
33
- autoload :EntityAnimations, 'or2d/animations/entity_animations'
33
+ autoload :CompositeAnimations, 'or2d/animations/composite_animations'
34
+ autoload :EntityAnimations, 'or2d/animations/entity_animations'
35
+ end
36
+
37
+ # The Cameras module contains all of the camera implementations for the OR2D gem.
38
+ module Cameras
39
+ autoload :CenteredCamera, 'or2d/cameras/centered'
40
+ autoload :PaddedCamera, 'or2d/cameras/padded'
34
41
  end
35
42
 
36
43
  # The Composites module contains all of the composite entities for the OR2D gem.
37
44
  module Composites
38
- autoload :Projectile, 'or2d/composites/projectile'
39
- autoload :Sprite, 'or2d/composites/sprite'
40
- autoload :Text, 'or2d/composites/text'
45
+ autoload :Projectile, 'or2d/composites/projectile'
46
+ autoload :Sprite, 'or2d/composites/sprite'
47
+ autoload :Text, 'or2d/composites/text'
41
48
  end
42
49
 
43
50
  # The Scenes module contains all of the scenes for the OR2D gem.
44
51
  module Scenes
45
- autoload :PlaceholderScene, 'or2d/scenes/placeholder_scene'
52
+ autoload :PlaceholderScene, 'or2d/scenes/placeholder_scene'
46
53
  end
47
54
 
48
55
  # Is debug mode enabled?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: or2d
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.pre.rc1
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick W.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-18 00:00:00.000000000 Z
11
+ date: 2023-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dotenv
@@ -17,6 +17,9 @@ dependencies:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '2.8'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 2.8.1
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -24,6 +27,9 @@ dependencies:
24
27
  - - "~>"
25
28
  - !ruby/object:Gem::Version
26
29
  version: '2.8'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 2.8.1
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: ruby2d
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -38,6 +44,20 @@ dependencies:
38
44
  - - "~>"
39
45
  - !ruby/object:Gem::Version
40
46
  version: 0.12.1
47
+ - !ruby/object:Gem::Dependency
48
+ name: minitest
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '5.18'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '5.18'
41
61
  - !ruby/object:Gem::Dependency
42
62
  name: rake
43
63
  requirement: !ruby/object:Gem::Requirement
@@ -80,6 +100,20 @@ dependencies:
80
100
  - - "~>"
81
101
  - !ruby/object:Gem::Version
82
102
  version: '1.42'
103
+ - !ruby/object:Gem::Dependency
104
+ name: simplecov
105
+ requirement: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - "~>"
108
+ - !ruby/object:Gem::Version
109
+ version: '0.22'
110
+ type: :development
111
+ prerelease: false
112
+ version_requirements: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - "~>"
115
+ - !ruby/object:Gem::Version
116
+ version: '0.22'
83
117
  - !ruby/object:Gem::Dependency
84
118
  name: yard
85
119
  requirement: !ruby/object:Gem::Requirement
@@ -104,6 +138,9 @@ files:
104
138
  - lib/or2d/animation.rb
105
139
  - lib/or2d/animations/composite_animations.rb
106
140
  - lib/or2d/animations/entity_animations.rb
141
+ - lib/or2d/camera.rb
142
+ - lib/or2d/cameras/centered.rb
143
+ - lib/or2d/cameras/padded.rb
107
144
  - lib/or2d/composite.rb
108
145
  - lib/or2d/composites/projectile.rb
109
146
  - lib/or2d/composites/sprite.rb
@@ -111,6 +148,8 @@ files:
111
148
  - lib/or2d/console.rb
112
149
  - lib/or2d/entity.rb
113
150
  - lib/or2d/instance.rb
151
+ - lib/or2d/patches/float.rb
152
+ - lib/or2d/patches/integer.rb
114
153
  - lib/or2d/patches/music.rb
115
154
  - lib/or2d/patches/renderable.rb
116
155
  - lib/or2d/patches/sound.rb
@@ -134,9 +173,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
134
173
  version: 3.1.0
135
174
  required_rubygems_version: !ruby/object:Gem::Requirement
136
175
  requirements:
137
- - - ">"
176
+ - - ">="
138
177
  - !ruby/object:Gem::Version
139
- version: 1.3.1
178
+ version: '0'
140
179
  requirements: []
141
180
  rubygems_version: 3.4.10
142
181
  signing_key: