chichilku3 5.0.0 → 5.0.1

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/client/gui.rb +20 -16
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e90a2851bf8d4a37c61c581919708cd7fc75c8592291755c0281e090e03e5d84
4
- data.tar.gz: 10e3825729ef2c5a0f17543a8c4519cbbf61f021805d624b54a8f79e314db898
3
+ metadata.gz: 6eb2d898a5e9000e8d403b3095dc0f11b32ffcf6299636cce5f5ecbf0986e4d1
4
+ data.tar.gz: 65a511ba7ef525ca52f9ee961d9478bd2aa15b8a0ee0078bcd5e1535460a917e
5
5
  SHA512:
6
- metadata.gz: 2452e5c7f2764142ea99f151828994b6c163d301370835558a464c8215c6f1689036a2de9ed681b7d937d90787a8f1d124c241848e63a7d79e3f0fc3c40937be
7
- data.tar.gz: 610086071507b30d4acdaaefdb029f485d1c2696c3df1a36369e224f14a9afe67dbc7454affbb3c0d968d47bbd3eeef323223e7f9530924cea85c0e14ecc6399
6
+ metadata.gz: 1f3c0294308be6d225b4a823d0cfffab0e669be8dab873da74517921bff83e453c1375d9dfe14ff254ff418109b45f4fe4a9d5d9ae88058258ff61a22c3eaddb
7
+ data.tar.gz: f83514aa1de0afdce1880e3ed72294aa2f79a5ff605de76627b70d6a87430bd973dddcf665ef19b5b1314f561d963a5adb00e7499297e455b22c87173e2bf839
data/lib/client/gui.rb CHANGED
@@ -42,24 +42,24 @@ class Gui < Gosu::Window
42
42
  self.caption = 'chichilku3'
43
43
  self.fullscreen = true if cfg.data['fullscreen']
44
44
  # images
45
- @background_image = Gosu::Image.new("lib/client/img/battle1024x576.png")
46
- @connecting_image = Gosu::Image.new("lib/client/img/connecting1024x512.png")
47
- @menu_image = Gosu::Image.new("lib/client/img/menu1920x1080.png")
48
- @stick = Gosu::Image.new("lib/client/img/stick128/stick0.png")
45
+ @background_image = Gosu::Image.new(img("battle1024x576.png"))
46
+ @connecting_image = Gosu::Image.new(img("connecting1024x512.png"))
47
+ @menu_image = Gosu::Image.new(img("menu1920x1080.png"))
48
+ @stick = Gosu::Image.new(img("stick128/stick0.png"))
49
49
  @stick_crouching = []
50
- @stick_crouching << Gosu::Image.new("lib/client/img/stick128/stick_crouching0.png")
51
- @stick_crouching << Gosu::Image.new("lib/client/img/stick128/stick_crouching1.png")
52
- @stick_crouching << Gosu::Image.new("lib/client/img/stick128/stick_crouching2.png")
53
- @stick_crouching << Gosu::Image.new("lib/client/img/stick128/stick_crouching3.png")
54
- @stick_crouching << Gosu::Image.new("lib/client/img/stick128/stick_crouching4.png")
55
- @stick_crouching << Gosu::Image.new("lib/client/img/stick128/stick_crouching5.png")
50
+ @stick_crouching << Gosu::Image.new(img("stick128/stick_crouching0.png"))
51
+ @stick_crouching << Gosu::Image.new(img("stick128/stick_crouching1.png"))
52
+ @stick_crouching << Gosu::Image.new(img("stick128/stick_crouching2.png"))
53
+ @stick_crouching << Gosu::Image.new(img("stick128/stick_crouching3.png"))
54
+ @stick_crouching << Gosu::Image.new(img("stick128/stick_crouching4.png"))
55
+ @stick_crouching << Gosu::Image.new(img("stick128/stick_crouching5.png"))
56
56
  @stick_images = []
57
- @stick_images << Gosu::Image.new("lib/client/img/stick128/stick0.png")
58
- @stick_images << Gosu::Image.new("lib/client/img/stick128/stick1.png")
59
- @stick_images << Gosu::Image.new("lib/client/img/stick128/stick2.png")
60
- @stick_images << Gosu::Image.new("lib/client/img/stick128/stick3.png")
61
- @stick_images << Gosu::Image.new("lib/client/img/stick128/stick4.png")
62
- @stick_images << Gosu::Image.new("lib/client/img/stick128/stick5.png")
57
+ @stick_images << Gosu::Image.new(img("stick128/stick0.png"))
58
+ @stick_images << Gosu::Image.new(img("stick128/stick1.png"))
59
+ @stick_images << Gosu::Image.new(img("stick128/stick2.png"))
60
+ @stick_images << Gosu::Image.new(img("stick128/stick3.png"))
61
+ @stick_images << Gosu::Image.new(img("stick128/stick4.png"))
62
+ @stick_images << Gosu::Image.new(img("stick128/stick5.png"))
63
63
  @x = 0
64
64
  @y = 0
65
65
  @players = []
@@ -95,6 +95,10 @@ class Gui < Gosu::Window
95
95
  init_menu()
96
96
  end
97
97
 
98
+ def img(path)
99
+ File.join(File.dirname(__FILE__), "../../lib/client/img/", path)
100
+ end
101
+
98
102
  def button_press?(button)
99
103
  last_btn = @last_pressed_button[button]
100
104
  @last_pressed_button[button] = button_down?(button)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chichilku3
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 5.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ChillerDragon