From 772ea8650f04fefae7eea7dcd36fe05df381f832 Mon Sep 17 00:00:00 2001 From: realtradam Date: Sat, 7 Aug 2021 17:07:36 -0400 Subject: images --- lib/ruby2d/camera/circle.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib/ruby2d/camera/circle.rb') 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 -- cgit v1.2.3