cyberarm_engine 0.10.1 → 0.10.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48b0f91fa28c566c872aa5fba6fcc3e34d68a1e6df80eb33ec9ae1d229780c91
|
4
|
+
data.tar.gz: df059b7335fac48a38654ab85d271b096d010e2f6f0e6cb64a96d8b086883799
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '090c7d78a563a9d4c12ec886c6a42ecdef0feab89d98f5a395bdd7b03e9de0f837725e25aeeba03ff754194ed422bef1b732e391e6961d571e2688e035dbdabc'
|
7
|
+
data.tar.gz: 845517dfb3f09c58b4787c3b71a901f95382cccf71c68fc59e7434f4a8e9430b61513413886fc98c9379a6170d66e577deaa5196cc67355a2495f732bd2ea295
|
@@ -3,7 +3,8 @@ module CyberarmEngine
|
|
3
3
|
include Common
|
4
4
|
|
5
5
|
attr_accessor :image, :angle, :position, :velocity, :center_x, :center_y, :scale_x, :scale_y,
|
6
|
-
:color, :
|
6
|
+
:color, :mode, :options, :paused, :radius, :last_position
|
7
|
+
attr_reader :alpha
|
7
8
|
def initialize(options={})
|
8
9
|
if options[:auto_manage] || options[:auto_manage] == nil
|
9
10
|
$window.current_state.add_game_object(self)
|
@@ -141,7 +142,7 @@ module CyberarmEngine
|
|
141
142
|
self.angle%=360
|
142
143
|
end
|
143
144
|
|
144
|
-
def alpha=int # 0-255
|
145
|
+
def alpha=(int) # 0-255
|
145
146
|
@alpha = int
|
146
147
|
@alpha = 255 if @alpha > 255
|
147
148
|
@color = Gosu::Color.rgba(@color.red, @color.green, @color.blue, int)
|
@@ -49,11 +49,17 @@ module CyberarmEngine
|
|
49
49
|
return temp
|
50
50
|
end
|
51
51
|
|
52
|
-
# returns whether
|
52
|
+
# returns whether bounding box intersects other
|
53
53
|
def intersect?(other)
|
54
|
-
|
55
|
-
|
56
|
-
|
54
|
+
if other.is_a?(Ray)
|
55
|
+
other.intersect?(self)
|
56
|
+
elsif other.is_a?(BoundingBox)
|
57
|
+
(@min.x <= other.max.x && @max.x >= other.min.x) &&
|
58
|
+
(@min.y <= other.max.y && @max.y >= other.min.y) &&
|
59
|
+
(@min.z <= other.max.z && @max.z >= other.min.z)
|
60
|
+
else
|
61
|
+
raise "Unknown collider: #{other.class}"
|
62
|
+
end
|
57
63
|
end
|
58
64
|
|
59
65
|
# does this bounding box envelop other bounding box? (inclusive of border)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cyberarm_engine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cyberarm
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-08-
|
11
|
+
date: 2019-08-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gosu
|