bestguigui_lab 0.7.0 → 0.10.0
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 794326e97286d25be2eee9a66e661f554bba438bca9e595a93b76a74e54031c1
|
|
4
|
+
data.tar.gz: b5544628293217d602f842f3f0151622f7b16ef9a9cfab0b25eed29954d3ca06
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 192b71239f32d5f09ebe0bc993edde160aaeaf18bb0539a25e134bff220f5e2c24f0c165a7de4fb9baf351698e3888aa582ef8cf70a4a6775c7fc43794949615
|
|
7
|
+
data.tar.gz: 3b8a34f3e8a72458d9d705ed4dadac63c779cc3faf5037b12710f3e54705905821275fe5fc0f243959943422a93d59b308a2e6775fa47339fe0dcb8288fbb10a
|
|
Binary file
|
|
@@ -4,6 +4,7 @@ module Bestguigui
|
|
|
4
4
|
# Charge et met en cache les assets (images, sons, modèles 3D...) pour éviter de les recharger plusieurs fois.
|
|
5
5
|
class Assets
|
|
6
6
|
@root = Dir.pwd
|
|
7
|
+
@gem_root = __dir__ # lib/bestguigui_lab, pour les ressources embarquees dans le kit
|
|
7
8
|
|
|
8
9
|
@images = Hash.new { |cache, path| cache[path] = Gosu::Image.new(path, retro: true) }
|
|
9
10
|
@sounds = Hash.new { |cache, path| cache[path] = Gosu::Sample.new(path) }
|
|
@@ -16,6 +17,10 @@ module Bestguigui
|
|
|
16
17
|
def self.resolve(name) = File.expand_path(name, @root)
|
|
17
18
|
def self.image(name) = @images[resolve(name)]
|
|
18
19
|
def self.sound(name) = @sounds[resolve(name)]
|
|
20
|
+
|
|
21
|
+
# Pour un fichier livre avec le kit (lib/bestguigui_lab/...), pas avec
|
|
22
|
+
# le projet de l'utilisateur : resout par rapport a la gem, pas Dir.pwd.
|
|
23
|
+
def self.gem_sound(*relative_parts) = @sounds[File.join(@gem_root, *relative_parts)]
|
|
19
24
|
def self.song(name) = @songs[resolve(name)]
|
|
20
25
|
|
|
21
26
|
def self.font(name = Gosu.default_font_name, size: 20)
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bestguigui_lab
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.10.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Bestguigui
|
|
@@ -44,6 +44,7 @@ files:
|
|
|
44
44
|
- lib/bestguigui_lab.rb
|
|
45
45
|
- lib/bestguigui_lab/animation.rb
|
|
46
46
|
- lib/bestguigui_lab/assets.rb
|
|
47
|
+
- lib/bestguigui_lab/assets/splash_jingle.wav
|
|
47
48
|
- lib/bestguigui_lab/gl_texture.rb
|
|
48
49
|
- lib/bestguigui_lab/helpers.rb
|
|
49
50
|
- lib/bestguigui_lab/image_pixels.rb
|