chingu 0.7.7.4 → 0.7.7.5
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.
- data/chingu.gemspec +2 -2
- data/lib/chingu.rb +1 -1
- data/lib/chingu/animation.rb +2 -1
- data/lib/chingu/game_states/edit.rb +0 -2
- data/lib/chingu/simple_menu.rb +1 -1
- data/lib/chingu/traits/bounding_box.rb +2 -3
- data/lib/chingu/traits/timer.rb +3 -3
- metadata +5 -5
data/chingu.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{chingu}
|
8
|
-
s.version = "0.7.7.
|
8
|
+
s.version = "0.7.7.5"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["ippa"]
|
12
|
-
s.date = %q{2010-08-
|
12
|
+
s.date = %q{2010-08-23}
|
13
13
|
s.description = %q{OpenGL accelerated 2D game framework for Ruby. Builds on Gosu (Ruby/C++) which provides all the core functionality. Chingu adds simple yet powerful game states, prettier input handling, deployment safe asset-handling, a basic re-usable game object and stackable game logic.}
|
14
14
|
s.email = %q{ippa@rubylicio.us}
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/chingu.rb
CHANGED
data/lib/chingu/animation.rb
CHANGED
@@ -160,10 +160,11 @@ module Chingu
|
|
160
160
|
# Resets the animation, re-starts it at frame 0
|
161
161
|
# returns itself.
|
162
162
|
#
|
163
|
-
def reset
|
163
|
+
def reset
|
164
164
|
@index = 0
|
165
165
|
self
|
166
166
|
end
|
167
|
+
alias :reset! :reset
|
167
168
|
|
168
169
|
#
|
169
170
|
# Returns a new animation with the frames from the original animation.
|
@@ -655,8 +655,6 @@ END_OF_STRING
|
|
655
655
|
|
656
656
|
def create_new_game_object_from(template)
|
657
657
|
game_object = template.class.create(:parent => previous_game_state)
|
658
|
-
game_object.update
|
659
|
-
|
660
658
|
# If we don't create it from the toolbar, we're cloning another object
|
661
659
|
# When cloning we wan't the cloned objects attributes
|
662
660
|
game_object.attributes = template.attributes unless template.options[:toolbar]
|
data/lib/chingu/simple_menu.rb
CHANGED
@@ -62,7 +62,7 @@ module Chingu
|
|
62
62
|
@selected = options[:selected] || 0
|
63
63
|
step(0)
|
64
64
|
|
65
|
-
self.input = {:up => lambda{step(-1)}, :down => lambda{step(1)}, [:return, :space
|
65
|
+
self.input = {:up => lambda{step(-1)}, :down => lambda{step(1)}, [:return, :space] => :select}
|
66
66
|
end
|
67
67
|
|
68
68
|
def step(value)
|
@@ -59,9 +59,8 @@ module Chingu
|
|
59
59
|
width, height = self.size
|
60
60
|
|
61
61
|
if scale = trait_options[:bounding_box][:scale]
|
62
|
-
width_scale, height_scale = scale, scale
|
63
|
-
|
64
|
-
width *= width_scale
|
62
|
+
width_scale, height_scale = scale.is_a?(Array) ? [scale[0],scale[1]] : [scale,scale]
|
63
|
+
width *= width_scale
|
65
64
|
height *= height_scale
|
66
65
|
end
|
67
66
|
|
data/lib/chingu/traits/timer.rb
CHANGED
@@ -125,9 +125,9 @@ module Chingu
|
|
125
125
|
#
|
126
126
|
# Stop timer with name 'name'
|
127
127
|
#
|
128
|
-
def stop_timer(
|
129
|
-
@_timers.reject! { |name, start_time, end_time, block|
|
130
|
-
@_repeating_timers.reject! { |name, start_time, end_time, block|
|
128
|
+
def stop_timer(timer_name)
|
129
|
+
@_timers.reject! { |name, start_time, end_time, block| timer_name == name }
|
130
|
+
@_repeating_timers.reject! { |name, start_time, end_time, block| timer_name == name }
|
131
131
|
end
|
132
132
|
|
133
133
|
#
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chingu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 97
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 7
|
9
9
|
- 7
|
10
|
-
-
|
11
|
-
version: 0.7.7.
|
10
|
+
- 5
|
11
|
+
version: 0.7.7.5
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- ippa
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-08-
|
19
|
+
date: 2010-08-23 00:00:00 +02:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
requirements:
|
44
44
|
- - ">="
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
hash:
|
46
|
+
hash: -744372164
|
47
47
|
segments:
|
48
48
|
- 2
|
49
49
|
- 0
|