diff options
| author | realtradam <[email protected]> | 2021-08-08 01:52:47 -0400 |
|---|---|---|
| committer | realtradam <[email protected]> | 2021-08-08 01:52:47 -0400 |
| commit | e9a05cecd41b244977c794931b4706015097774f (patch) | |
| tree | 21c506d87226dd794635ab944317892eccc42fcb /lib/ruby2d/camera/line.rb | |
| parent | 4a759ba2710de0b7335e6cfcd6db8bc16795c13b (diff) | |
| download | ruby2d-camera-e9a05cecd41b244977c794931b4706015097774f.tar.gz ruby2d-camera-e9a05cecd41b244977c794931b4706015097774f.zip | |
working copy
Diffstat (limited to 'lib/ruby2d/camera/line.rb')
| -rw-r--r-- | lib/ruby2d/camera/line.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/ruby2d/camera/line.rb b/lib/ruby2d/camera/line.rb index e7e7c0f..9113b92 100644 --- a/lib/ruby2d/camera/line.rb +++ b/lib/ruby2d/camera/line.rb @@ -8,6 +8,7 @@ module Ruby2D # Recalculates real coordiantes # Use after changing variables def _draw + return if @hide angle = Camera.angle * (Math::PI / 180) half_width = Window.width * 0.5 half_height = Window.height * 0.5 @@ -31,7 +32,14 @@ module Ruby2D def initialize(opts= {}) super(opts) Ruby2D::Camera << self - self.remove + Window.remove(self) + end + def remove + @hide = true + end + + def add + @hide = false end #Methods for moving the shape |
