okami 0.0.97 → 0.0.98
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/okami/hit_mask.rb +0 -2
- data/lib/okami/sprite.rb +2 -2
- data/lib/okami/window.rb +8 -3
- metadata +59 -42
data/lib/okami/hit_mask.rb
CHANGED
data/lib/okami/sprite.rb
CHANGED
@@ -38,8 +38,8 @@ class Okami::Sprite
|
|
38
38
|
|
39
39
|
def update
|
40
40
|
case @direction
|
41
|
-
when :forward then @frame_index += @add
|
42
|
-
when :backward then @frame_index -= @add
|
41
|
+
when :forward then @frame_index += @add*$window.dt*60.0
|
42
|
+
when :backward then @frame_index -= @add*$window.dt*60.0
|
43
43
|
end
|
44
44
|
|
45
45
|
@update_method.call
|
data/lib/okami/window.rb
CHANGED
@@ -2,6 +2,7 @@ module Okami
|
|
2
2
|
class Window < Gosu::Window
|
3
3
|
include Gosu
|
4
4
|
include Okami
|
5
|
+
attr_reader :dt, :current_time
|
5
6
|
attr_accessor :cursor_visible
|
6
7
|
|
7
8
|
def initialize *args
|
@@ -36,10 +37,14 @@ module Okami
|
|
36
37
|
z, mode = :default
|
37
38
|
end
|
38
39
|
|
40
|
+
def current_time
|
41
|
+
|
42
|
+
end
|
43
|
+
|
39
44
|
def calculate_dt
|
40
|
-
@
|
41
|
-
@dt
|
42
|
-
@
|
45
|
+
@current_time = Gosu::milliseconds/1000.0
|
46
|
+
@dt = @current_time - @previous_time
|
47
|
+
@previous_time = @current_time
|
43
48
|
end
|
44
49
|
|
45
50
|
def self.inherited(subclass)
|
metadata
CHANGED
@@ -1,44 +1,55 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: okami
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 0
|
8
|
+
- 98
|
9
|
+
version: 0.0.98
|
6
10
|
platform: ruby
|
7
|
-
authors:
|
8
|
-
- Bue
|
11
|
+
authors:
|
12
|
+
- "Bue Gr\xC3\xB8nlund"
|
9
13
|
autorequire:
|
10
14
|
bindir: bin
|
11
15
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
16
|
+
|
17
|
+
date: 2013-03-12 00:00:00 +01:00
|
18
|
+
default_executable:
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
15
21
|
name: gosu
|
16
|
-
requirement: &70258383655520 !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
|
-
requirements:
|
19
|
-
- - ! '>='
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: '0'
|
22
|
-
type: :runtime
|
23
22
|
prerelease: false
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: '0'
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 0
|
29
|
+
version: "0"
|
33
30
|
type: :runtime
|
31
|
+
version_requirements: *id001
|
32
|
+
- !ruby/object:Gem::Dependency
|
33
|
+
name: texplay
|
34
34
|
prerelease: false
|
35
|
-
|
35
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
segments:
|
40
|
+
- 0
|
41
|
+
version: "0"
|
42
|
+
type: :runtime
|
43
|
+
version_requirements: *id002
|
36
44
|
description: Gosu Interface with fancy functionality for simplicity.
|
37
45
|
email: aerotune@gmail.com
|
38
46
|
executables: []
|
47
|
+
|
39
48
|
extensions: []
|
49
|
+
|
40
50
|
extra_rdoc_files: []
|
41
|
-
|
51
|
+
|
52
|
+
files:
|
42
53
|
- lib/okami.rb
|
43
54
|
- lib/okami/window.rb
|
44
55
|
- lib/okami/keyboard.rb
|
@@ -48,29 +59,35 @@ files:
|
|
48
59
|
- lib/okami/hit_mask.rb
|
49
60
|
- lib/okami/sprite.rb
|
50
61
|
- lib/okami/os.rb
|
62
|
+
has_rdoc: true
|
51
63
|
homepage: https://github.com/Aerotune/Okami
|
52
64
|
licenses: []
|
65
|
+
|
53
66
|
post_install_message:
|
54
67
|
rdoc_options: []
|
55
|
-
|
68
|
+
|
69
|
+
require_paths:
|
56
70
|
- lib
|
57
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
requirements:
|
66
|
-
- -
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
|
71
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
segments:
|
76
|
+
- 0
|
77
|
+
version: "0"
|
78
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
segments:
|
83
|
+
- 0
|
84
|
+
version: "0"
|
69
85
|
requirements: []
|
86
|
+
|
70
87
|
rubyforge_project:
|
71
|
-
rubygems_version: 1.
|
88
|
+
rubygems_version: 1.3.6
|
72
89
|
signing_key:
|
73
90
|
specification_version: 3
|
74
91
|
summary: Okami minimal Gosu!
|
75
92
|
test_files: []
|
76
|
-
|
93
|
+
|