Gosuplus 1.0.19 → 1.0.20

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.
@@ -1,5 +1,11 @@
1
1
  module Gosuplus
2
- module Entity
2
+ class Entity
3
3
  attr_accessor :id
4
+ include DrawableRot
5
+
6
+ def initialize(pos, image)
7
+ @body = Body.new(pos, image.width, image.height)
8
+ @image = image
9
+ end
4
10
  end
5
11
  end
@@ -23,5 +23,8 @@ module Gosuplus
23
23
  def load; end
24
24
  def on_load; @rm.load_resources(self.class.name); load; end
25
25
  def on_exit; end
26
+
27
+ private
28
+ def add_entity(entity); @objects << entity; end
26
29
  end
27
30
  end
@@ -1,34 +1,8 @@
1
1
  module Gosuplus
2
2
  class ExampleState < State
3
- def load
4
- button = GUI::Button.new(Vec2.new(50, 50), @rm[:background], @input_handler,
5
- 256,'Calculate', @rm[:font_default])
6
-
7
- button_2 = GUI::Button.new(Vec2.new(250, 50), @rm[:background], @input_handler,
8
- 256,'Calculate', @rm[:font_default])
9
-
10
- checkbox = GUI::Toggleable.new(Vec2.new(50, 100), @rm[:background], @rm[:checkbox],
11
- @rm[:checkmark], @input_handler, 256)
12
-
13
- checkbox_2 = GUI::Toggleable.new(Vec2.new(50, 150), @rm[:background], @rm[:checkbox],
14
- @rm[:checkmark], @input_handler, 256)
15
-
16
- button.timer = Timer.new(120)
17
- button_2.timer = Timer.new(120)
18
- checkbox.timer = Timer.new(30)
19
- checkbox_2.timer = Timer.new(30, 0)
20
-
21
- @GUI.add_button(:default, button)
22
- @GUI.add_button(:button_2, button_2)
23
- @GUI.add_button(:checkbox, checkbox)
24
- @GUI.add_button(:checkbox_2, checkbox_2)
25
- end
26
-
27
3
  def update
28
4
  super
29
- puts "CLICKED 2" if @GUI.get_button(:button_2).active?
30
- puts "clicked" if @GUI.get_button(:default).active?
31
- puts "CHECKED" if @GUI.get_button(:checkbox).active?
5
+
32
6
  end
33
7
  end
34
8
  end
@@ -1,4 +1,2 @@
1
- image background background.png
2
- font font_default arial.ttf 32
3
- image checkbox checkbox.png
4
- image checkmark checkmark.png
1
+ image ball ball.png
2
+ font font_default arial.ttf 32
@@ -1,3 +1,3 @@
1
1
  module Gosuplus
2
- VERSION = "1.0.19"
2
+ VERSION = "1.0.20"
3
3
  end
data/lib/Gosuplus.rb CHANGED
@@ -32,10 +32,4 @@ require_relative 'Gosuplus/gui/form/base'
32
32
  require_relative 'Gosuplus/gui/form/renderer'
33
33
  require_relative 'Gosuplus/gui/form/text'
34
34
 
35
- require_relative 'Gosuplus/states/example_state'
36
-
37
- module Gosuplus
38
- def self.test
39
- puts "TEST"
40
- end
41
- end
35
+ require_relative 'Gosuplus/states/example_state'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Gosuplus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.19
4
+ version: 1.0.20
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-02-15 00:00:00.000000000 Z
12
+ date: 2015-02-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler