minigl 2.3.1 → 2.3.2
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 +4 -4
- data/README.md +2 -4
- data/lib/minigl/movement.rb +7 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ac508ba7f8437fc38fe8fbb4f0bd9b82e95fcaecb629cd5fa9ed5e38f34058e
|
4
|
+
data.tar.gz: c6feadf293623b39817281093e9cb0f92fe72935d698ff7b0bc24b8a8e3881e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f54a8f402998aae0f9db1cb40266d8a165a69b2d637ddd36b2190e66319a73fe49dcc20b88757abcfb68fd9c86a3f91889020634c71cd998836013bcb842ee9
|
7
|
+
data.tar.gz: bdc777463aa6681d0cbd1e18dd2e02af34d84e4d59daf0ce51f71d9b7fe6cd97b671c1db7420274c436ff74a83fc3244c650ed984947ff0a4925842e6ad62211
|
data/README.md
CHANGED
@@ -29,11 +29,9 @@ After installing the Gosu dependencies, you can just `gem install minigl`.
|
|
29
29
|
* The [wiki](https://github.com/victords/minigl/wiki) is a work in progress with tutorials and examples.
|
30
30
|
* Test package and examples aren't complete!
|
31
31
|
|
32
|
-
## Version 2.3.
|
32
|
+
## Version 2.3.2
|
33
33
|
|
34
|
-
*
|
35
|
-
* Fix `ImageFont#draw_markup_rel` for different values of `rel_x` and `rel_y`.
|
36
|
-
* Add missing documentation in `TextHelper` methods.
|
34
|
+
* Added the `ignore_collision` option to `Movement#move_carrying`.
|
37
35
|
|
38
36
|
## Contributing
|
39
37
|
|
data/lib/minigl/movement.rb
CHANGED
@@ -365,11 +365,14 @@ module MiniGL
|
|
365
365
|
# +x+, +y+, +w+ and +h+.
|
366
366
|
# [obstacles] Obstacles that should be considered for collision checking
|
367
367
|
# with the carried objects, if they include the +Movement+
|
368
|
-
# module, and with this object too, if moving with forces
|
368
|
+
# module, and with this object too, if moving with forces and
|
369
|
+
# the +ignore_collision+ flag is false.
|
369
370
|
# [ramps] Ramps that should be considered for the carried objects, if they
|
370
371
|
# include the +Movement+ module, and for this object too, if moving
|
371
|
-
# with forces.
|
372
|
-
|
372
|
+
# with forces and +ignore_collision+ is false.
|
373
|
+
# [ignore_collision] Set to true to make this object ignore collision even
|
374
|
+
# when moving with forces.
|
375
|
+
def move_carrying(arg, speed, carried_objs, obstacles, ramps, ignore_collision = false)
|
373
376
|
if speed
|
374
377
|
x_d = arg.x - @x; y_d = arg.y - @y
|
375
378
|
distance = Math.sqrt(x_d**2 + y_d**2)
|
@@ -410,7 +413,7 @@ module MiniGL
|
|
410
413
|
@y = y_aim
|
411
414
|
end
|
412
415
|
else
|
413
|
-
move(arg, obstacles, ramps)
|
416
|
+
move(arg, ignore_collision ? [] : obstacles, ignore_collision ? [] : ramps)
|
414
417
|
end
|
415
418
|
|
416
419
|
forces = Vector.new @x - prev_x, @y - prev_y
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minigl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Victor David Santos
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gosu
|