onsengame 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/NEWS.md +10 -0
- data/lib/onsengame/generator/template/new/NAME.gemspec.tt +1 -1
- data/lib/onsengame/generator/template/new/lib/NAME/command.tt +14 -2
- data/lib/onsengame/generator/template/new/lib/NAME/scene/title.tt +7 -2
- data/lib/onsengame/generator/template/new/lib/NAME/window.tt +6 -0
- data/lib/onsengame/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a875b7b4cd1e5df81cc3fd4ffa61eb159bc1909e
|
4
|
+
data.tar.gz: 9589a2444b2b9bc82455625811896c00572bacf4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f2f3f8b2a7039f42a82a4a91e899976a5882ba82e93d386a9ec807308dead7a8d9d263aa73a976589a6e5eb42f7699d38ab6fe89c8e04c66e125a98664bd014
|
7
|
+
data.tar.gz: 2001453583eeb7e4089e08430371b3a8e4b5d54eb646b19ffa56638544fe83a55140d994cfdae1b599c98197084cc20b310cc31fc61219063f9a23a5a0572e61
|
data/NEWS.md
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_runtime_dependency("onsengame")
|
21
|
+
spec.add_runtime_dependency("onsengame", ">= <%= Onsengame::VERSION %>")
|
22
22
|
|
23
23
|
spec.add_development_dependency("bundler")
|
24
24
|
spec.add_development_dependency("rake")
|
@@ -1,6 +1,18 @@
|
|
1
|
-
require "
|
1
|
+
require "thor"
|
2
|
+
require "<%= name %>"
|
2
3
|
|
3
4
|
module <%= name.capitalize %>
|
4
|
-
class Command <
|
5
|
+
class Command < Thor
|
6
|
+
desc "version", "Show version"
|
7
|
+
def version
|
8
|
+
puts(VERSION)
|
9
|
+
end
|
10
|
+
|
11
|
+
desc "start [OPTIONS]", "Run game"
|
12
|
+
option :fullscreen, type: :boolean
|
13
|
+
def start
|
14
|
+
@window = Window.new(options.dup)
|
15
|
+
@window.show
|
16
|
+
end
|
5
17
|
end
|
6
18
|
end
|
@@ -1,10 +1,15 @@
|
|
1
1
|
require "onsengame/scene/title"
|
2
|
-
require "<%= name %>/scene
|
3
|
-
require "<%= name %>/scene/main"
|
2
|
+
require "<%= name %>/scene"
|
4
3
|
|
5
4
|
module <%= name.capitalize %>
|
6
5
|
module Scene
|
7
6
|
class Title < Onsengame::Scene::Title
|
7
|
+
def button_down(id)
|
8
|
+
case id
|
9
|
+
when Gosu::KbReturn
|
10
|
+
@window.scenes.unshift(Main.new(@window))
|
11
|
+
end
|
12
|
+
end
|
8
13
|
end
|
9
14
|
end
|
10
15
|
end
|
data/lib/onsengame/version.rb
CHANGED