chingu 0.7.7.4 → 0.7.7.5

Sign up to get free protection for your applications and to get access to all the features.
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.4"
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-22}
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
@@ -33,7 +33,7 @@ require_all "#{CHINGU_ROOT}/chingu/traits"
33
33
  require_all "#{CHINGU_ROOT}/chingu"
34
34
 
35
35
  module Chingu
36
- VERSION = "0.7.7.4"
36
+ VERSION = "0.7.7.5"
37
37
 
38
38
  DEBUG_COLOR = Gosu::Color.new(0xFFFF0000)
39
39
  DEBUG_ZORDER = 9999
@@ -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]
@@ -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, :right] => :select}
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
- width_scale, height_scale = scale[0], scale[1] if scale.is_a? Array
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
 
@@ -125,9 +125,9 @@ module Chingu
125
125
  #
126
126
  # Stop timer with name 'name'
127
127
  #
128
- def stop_timer(name)
129
- @_timers.reject! { |name, start_time, end_time, block| name == name }
130
- @_repeating_timers.reject! { |name, start_time, end_time, block| name == name }
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: 99
4
+ hash: 97
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 7
9
9
  - 7
10
- - 4
11
- version: 0.7.7.4
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-22 00:00:00 +02:00
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: 859163661
46
+ hash: -744372164
47
47
  segments:
48
48
  - 2
49
49
  - 0