diff options
| author | realtradam <[email protected]> | 2021-08-07 17:07:36 -0400 |
|---|---|---|
| committer | realtradam <[email protected]> | 2021-08-07 17:07:36 -0400 |
| commit | 772ea8650f04fefae7eea7dcd36fe05df381f832 (patch) | |
| tree | 8d9168d0f3427d6baf302d5cc651092ca16b8c07 /lib/ruby2d/camera/circle.rb | |
| parent | 8fb5bfdf72c54dbc9161f3be6ebdc1c9e7bcc384 (diff) | |
| download | ruby2d-camera-772ea8650f04fefae7eea7dcd36fe05df381f832.tar.gz ruby2d-camera-772ea8650f04fefae7eea7dcd36fe05df381f832.zip | |
images
Diffstat (limited to 'lib/ruby2d/camera/circle.rb')
| -rw-r--r-- | lib/ruby2d/camera/circle.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/ruby2d/camera/circle.rb b/lib/ruby2d/camera/circle.rb index a7416a2..ea841f5 100644 --- a/lib/ruby2d/camera/circle.rb +++ b/lib/ruby2d/camera/circle.rb @@ -14,14 +14,13 @@ module Ruby2D temp_radius = @radius * Camera.zoom temp_x = (((@x - Ruby2D::Camera.x + radius) * Math.cos(angle)) - ((@y - Ruby2D::Camera.y + radius) * Math.sin(angle))) * Ruby2D::Camera.zoom + half_width temp_y = (((@x - Ruby2D::Camera.x + radius) * Math.sin(angle)) + ((@y - Ruby2D::Camera.y + radius) * Math.cos(angle))) * Ruby2D::Camera.zoom + half_height - Ruby2D::Circle.draw(x: temp_x, y: tempy, + Ruby2D::Circle.draw(x: temp_x, y: temp_y, radius: temp_radius, - sectors: @sectors, + sectors: self.sectors, color: [self.color.r, self.color.g, self.color.b, self.color.a]) - end - def initialize(otps= {}) + def initialize(opts= {}) super(opts) Ruby2D::Camera << self self.remove |
