gamebox 0.4.0.rc5 → 0.4.0.rc11
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +205 -127
- data/bin/gamebox +49 -3
- data/bin/gb +87 -0
- data/gamebox.gemspec +4 -3
- data/lib/gamebox.rb +1 -1
- data/lib/gamebox/actors/collidable_debugger.rb +4 -4
- data/lib/gamebox/actors/icon.rb +7 -0
- data/lib/gamebox/actors/label.rb +41 -42
- data/lib/gamebox/behaviors/animated.rb +6 -0
- data/lib/gamebox/behaviors/audible.rb +1 -2
- data/lib/gamebox/behaviors/collidable.rb +1 -1
- data/lib/gamebox/behaviors/graphical.rb +8 -4
- data/lib/gamebox/behaviors/physical.rb +6 -1
- data/lib/gamebox/behaviors/positioned.rb +4 -11
- data/lib/gamebox/behaviors/projectile.rb +8 -0
- data/lib/gamebox/behaviors/visible.rb +3 -3
- data/lib/gamebox/core/aabb_tree.rb +1 -1
- data/lib/gamebox/core/actor.rb +37 -50
- data/lib/gamebox/core/actor_definition.rb +41 -0
- data/lib/gamebox/core/actor_view.rb +6 -21
- data/lib/gamebox/core/actor_view_definition.rb +19 -0
- data/lib/gamebox/core/actor_view_factory.rb +9 -3
- data/lib/gamebox/core/behavior.rb +8 -27
- data/lib/gamebox/core/behavior_definition.rb +24 -0
- data/lib/gamebox/core/config_manager.rb +45 -30
- data/lib/gamebox/core/configuration.rb +5 -0
- data/lib/gamebox/core/core.rb +4 -0
- data/lib/gamebox/core/debug_helpers.rb +46 -0
- data/lib/gamebox/core/director.rb +32 -5
- data/lib/gamebox/core/event_symbols.rb +214 -0
- data/lib/gamebox/core/game.rb +1 -1
- data/lib/gamebox/core/input_manager.rb +1 -4
- data/lib/gamebox/core/input_mapper.rb +85 -0
- data/lib/gamebox/core/physics.rb +7 -3
- data/lib/gamebox/core/physics_manager.rb +5 -1
- data/lib/gamebox/core/renderer.rb +72 -0
- data/lib/gamebox/core/stage.rb +25 -81
- data/lib/gamebox/core/stage_definition.rb +60 -0
- data/lib/gamebox/core/stage_factory.rb +56 -0
- data/lib/gamebox/core/stage_manager.rb +5 -11
- data/lib/gamebox/core/timer_manager.rb +6 -2
- data/lib/gamebox/core/viewport.rb +12 -5
- data/lib/gamebox/core/wrapped_screen.rb +8 -5
- data/lib/gamebox/gamebox_application.rb +21 -19
- data/lib/gamebox/lib/array_ext.rb +9 -0
- data/lib/gamebox/lib/observable_attributes.rb +24 -0
- data/lib/gamebox/lib/vector2.rb +432 -0
- data/lib/gamebox/post_setup_handlers/file_watcher.rb +37 -0
- data/lib/gamebox/post_setup_handlers/gamebox_debug_helpers.rb +13 -0
- data/lib/gamebox/post_setup_handlers/pry_remote_server.rb +29 -0
- data/lib/gamebox/spec/helper.rb +165 -17
- data/lib/gamebox/tasks/gamebox_tasks.rake +27 -12
- data/lib/gamebox/version.rb +1 -1
- data/lib/gamebox/views/graphical_actor_view.rb +4 -5
- data/script/perf_aabb.rb +13 -8
- data/spec/acceptance/animation_spec.rb +1 -3
- data/spec/acceptance/basic_actor_lifecycle_spec.rb +1 -1
- data/spec/acceptance/fps_actor_spec.rb +8 -12
- data/spec/acceptance/input_mapper_spec.rb +17 -24
- data/spec/acceptance/update_ordering_spec.rb +64 -0
- data/spec/actors/label_spec.rb +90 -5
- data/spec/behaviors/animated_spec.rb +1 -1
- data/spec/behaviors/collidable_spec.rb +7 -15
- data/spec/behaviors/positioned_spec.rb +12 -5
- data/spec/core/actor_spec.rb +31 -3
- data/spec/core/actor_view_spec.rb +1 -1
- data/spec/core/behavior_spec.rb +3 -0
- data/spec/core/configuration_spec.rb +49 -2
- data/spec/core/input_mapper_spec.rb +7 -0
- data/spec/core/renderer_spec.rb +89 -0
- data/spec/core/stage_definition_spec.rb +41 -0
- data/spec/core/stage_manager_spec.rb +11 -11
- data/spec/core/stage_spec.rb +38 -78
- data/spec/core/viewport_spec.rb +5 -2
- data/spec/core/wrapped_screen_spec.rb +18 -12
- data/spec/views/graphical_actor_view_spec.rb +33 -62
- data/templates/actor_template.erb +11 -0
- data/templates/app/README.md +1 -0
- data/templates/app/src/actors/{player.rb → player_actor.rb} +3 -1
- data/templates/app/src/behaviors/.gitkeep +0 -0
- data/templates/app/src/stages/demo_stage.rb +14 -0
- data/templates/behavior_template.erb +13 -0
- data/templates/stage_template.erb +13 -0
- metadata +60 -21
- data/component_generators/actor_generator.rb +0 -17
- data/lib/gamebox/actors/emitter.rb +0 -12
- data/lib/gamebox/behaviors/emitting.rb +0 -48
- data/lib/gamebox/behaviors/input_mapper.rb +0 -11
- data/lib/gamebox/lib/ftor.rb +0 -372
- data/spec/actors/emitter_spec.rb +0 -5
- data/templates/app/NEXT_STEPS.txt +0 -1
- data/templates/app/README.rdoc +0 -24
- data/templates/app/src/demo_stage.rb +0 -7
data/README.md
CHANGED
@@ -1,174 +1,252 @@
|
|
1
1
|
# Gamebox
|
2
|
-
![http://travis-ci.org/shawn42/gamebox](https://secure.travis-ci.org/shawn42/gamebox.png)
|
3
|
-
![https://gemnasium.com/shawn42/gamebox](https://gemnasium.com/shawn42/gamebox.png)
|
4
2
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
* Facilitate quickly building distributable artifacts.
|
9
|
-
* http://shawn42.github.com/gamebox/
|
10
|
-
* see [gamebox on rubygems.org](https://rubygems.org/gems/gamebox) for the list of requirements
|
3
|
+
[![Gamebox Build Status](https://secure.travis-ci.org/shawn42/gamebox.png)](http://travis-ci.org/shawn42/gamebox)
|
4
|
+
[![Gamebox Deps Status](https://gemnasium.com/shawn42/gamebox.png)](https://gemnasium.com/shawn42/gamebox)
|
5
|
+
[![Code Climate](https://codeclimate.com/github/shawn42/gamebox.png)](https://codeclimate.com/github/shawn42/gamebox)
|
11
6
|
|
7
|
+
* A **game template** for building and distributing Gosu games.
|
8
|
+
* Quickly **generate a game** and have it **up and running**.
|
9
|
+
* Provide **conventions and DSL** for building your game.
|
10
|
+
* Facilitate quickly building **distributable artifacts**.
|
11
|
+
* http://shawn42.github.com/gamebox/
|
12
|
+
* see [gamebox on rubygems.org](https://rubygems.org/gems/gamebox) for the list of requirements
|
12
13
|
|
13
|
-
|
14
|
+
## Getting started with Gamebox
|
14
15
|
|
15
|
-
|
16
|
+
### Purpose
|
16
17
|
|
17
|
-
Why use Gamebox
|
18
|
+
**Why use Gamebox?** Gamebox was designed to spring board game development. It allows the developer to define business rules about a game very quickly without having to worry about resource loading, sound/music management, creating windows, or messing with viewports. Gamebox allows you to define a game's business rules within minutes, using the metaphor of a 5th grade play.
|
18
19
|
|
19
|
-
The driving idea behind Gamebox is to provide the ability to have as many of the basic common pieces of a 2D game at the developers disposal from the beginning.
|
20
|
+
The driving idea behind Gamebox is to provide the ability to have as many of the basic common pieces of a **2D game** at the developers disposal from the beginning.
|
20
21
|
|
21
22
|
The reason I wrote Gamebox is twofold: first, to aid in 48 hour game writing competitions and second, to allow me to write simple educational games for my kids.
|
22
23
|
|
23
|
-
|
24
|
+
### Installation
|
24
25
|
|
25
|
-
|
26
|
-
|
27
|
-
* or git clone git://github.com/shawn42/gamebox.git
|
26
|
+
* `gem install gamebox`
|
27
|
+
* `git clone git://github.com/shawn42/gamebox.git && cd gamebox && bundle && rake install`
|
28
28
|
|
29
|
-
|
29
|
+
### Game Creation
|
30
30
|
|
31
|
-
|
31
|
+
To create a new Gamebox project run:
|
32
32
|
|
33
|
-
|
33
|
+
```bash
|
34
|
+
gamebox zapper
|
35
|
+
```
|
34
36
|
|
37
|
+
This will create the directory structure and needed files to get a basic actor up on the screen:
|
38
|
+
|
39
|
+
```
|
35
40
|
zapper
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
└──
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
This call will return an instance of a score (the first arg is the symbolized version of the actor type). It will also create the view for the actor and register it to be drawn. Which view is instantiated depends on the actor requested. The factory will always look for a view named the same as the actor with _view on the end. So the actor score will look for score_view. If score_view does not exist, a generic view class will be used based on the behaviors of the actor. Each view is constructed with a reference to the actor it is displaying. See ActorFactor#build for more details.
|
75
|
-
|
76
|
-
That's great, but how do I tell my actors what to do? By defining their behaviors!
|
77
|
-
`
|
78
|
-
`define_actor :score do
|
79
|
-
has_behaviors :positioned, :score_keeping
|
41
|
+
├── Gemfile
|
42
|
+
├── README.rdoc
|
43
|
+
├── Rakefile
|
44
|
+
├── config
|
45
|
+
│ ├── boot.rb
|
46
|
+
│ ├── environment.rb
|
47
|
+
│ └── game.yml
|
48
|
+
├── data
|
49
|
+
│ ├── fonts
|
50
|
+
│ ├── graphics
|
51
|
+
│ ├── music
|
52
|
+
│ └── sounds
|
53
|
+
├── spec
|
54
|
+
│ └── helper.rb
|
55
|
+
└── src
|
56
|
+
├── actors
|
57
|
+
│ └── player.rb
|
58
|
+
├── app.rb
|
59
|
+
└── demo_stage.rb
|
60
|
+
```
|
61
|
+
|
62
|
+
To run your game:
|
63
|
+
|
64
|
+
```bash
|
65
|
+
cd zapper
|
66
|
+
bundle
|
67
|
+
rake
|
68
|
+
```
|
69
|
+
|
70
|
+
## Stages
|
71
|
+
|
72
|
+
A stage is where all the magic happens. Each new play type in your game will use a different stage. An example game may have a number of stages such as: `main_menu`, `play`, or `credits`. A `demo_stage.rb` is created for you by using the `gamebox new` command.
|
73
|
+
|
74
|
+
```ruby
|
75
|
+
define_stage :demo do
|
76
|
+
curtain_up do
|
77
|
+
...
|
78
|
+
end
|
80
79
|
end
|
80
|
+
```
|
81
81
|
|
82
|
+
## Actors
|
82
83
|
|
83
|
-
|
84
|
+
Actors are the basic building blocks of games in Gamebox. Everything in the game is an actor: the player, an alien, the bullet, even the score on the screen. Internally, actors are just named collections of behaviors and observable attributes.
|
84
85
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
sound_manager.play_sound :death
|
86
|
+
```ruby
|
87
|
+
define_actor :player do
|
88
|
+
has_behaviors do
|
89
|
+
shooter recharge_time: 4_000, shot_power: 15, kickback: 0.7
|
90
|
+
shielded
|
91
|
+
bomber kickback: 5
|
92
92
|
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
actor.react_to :play_sound, :jump
|
93
|
+
die_by_sword
|
94
|
+
die_by_bullet
|
95
|
+
die_by_bomb
|
96
|
+
blasted_by_bomb
|
98
97
|
|
99
|
-
|
98
|
+
jumper
|
99
|
+
end
|
100
|
+
end
|
101
|
+
```
|
100
102
|
|
101
|
-
|
102
|
-
`
|
103
|
-
` font # @mode.resource_manager.load_font 'Asimov.ttf', 30
|
103
|
+
### Behaviors
|
104
104
|
|
105
|
-
|
105
|
+
Behaviors are what bring life to actors. They interact interact with the actor's internal data, input, audio, etc.
|
106
106
|
|
107
|
-
|
108
|
-
|
109
|
-
` define_behavior :shooting do
|
110
|
-
requires :input_manager
|
111
|
-
setup do
|
112
|
-
input_manager.reg :down, KbSpace do
|
113
|
-
shoot
|
114
|
-
end
|
115
|
-
end
|
107
|
+
```ruby
|
108
|
+
define_behavior :projectile do
|
116
109
|
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
110
|
+
requires :director
|
111
|
+
requires_behaviors :positioned
|
112
|
+
setup do
|
113
|
+
actor.has_attributes vel_x: 0,
|
114
|
+
vel_y: 0
|
115
|
+
|
116
|
+
director.when :update do |delta_ms, delta_secs|
|
117
|
+
actor.x += (actor.vel_x * delta_secs)
|
118
|
+
actor.y += (actor.vel_y * delta_secs)
|
121
119
|
end
|
122
120
|
end
|
121
|
+
end
|
122
|
+
```
|
123
123
|
|
124
|
+
### Views
|
124
125
|
|
125
|
-
|
126
|
-
`
|
127
|
-
` zapper/
|
128
|
-
`-- data
|
129
|
-
`-- graphics
|
130
|
-
`-- super_hero
|
131
|
-
|-- flying
|
132
|
-
| |-- 1.png
|
133
|
-
| |-- 2.png
|
134
|
-
| |-- ...
|
135
|
-
| `-- 8.png
|
136
|
-
|-- idle.png
|
137
|
-
`-- walking
|
138
|
-
|-- 1.png
|
139
|
-
`-- 2.png
|
140
|
-
|
141
|
-
Here we can see that the SuperHere class has three actions (flying, walking, idle). These actions will be set by calling action# on your Actor.
|
126
|
+
Actor views are the mechanism for drawing an actor in Gamebox. When an actor is created, Gamebox will see if there is a matching actor view by name. It will register the view to be drawn by the renderer. The draw callback is called with the rendering target, the x and y offsets based on the viewport, and the z layer to be used for drawing this actor (see the section on parallax layers for more on z layers).
|
142
127
|
|
143
|
-
|
144
|
-
|
128
|
+
```ruby
|
129
|
+
define_actor_view :label_view do
|
130
|
+
draw do |target, x_off, y_off, z|
|
131
|
+
target.print actor.text, actor.x, actor.y, z, actor.font_style
|
132
|
+
end
|
133
|
+
end
|
134
|
+
```
|
145
135
|
|
146
|
-
|
136
|
+
### Getting actors on stage
|
147
137
|
|
148
|
-
|
138
|
+
To get an actor on the stage, use the `create_actor` method on stage. This can be done directly from a stage or from a behavior that has required stage via `requires :stage`.
|
149
139
|
|
140
|
+
```ruby
|
141
|
+
curtain_up do
|
142
|
+
@player = create_actor :label, x: 20, y: 30, text: "Hello World!"
|
143
|
+
end
|
150
144
|
|
151
|
-
|
145
|
+
# or
|
146
|
+
stage.create_actor ..
|
147
|
+
```
|
152
148
|
|
153
|
-
##
|
149
|
+
## Input
|
150
|
+
|
151
|
+
Input comes from the InputManager. The stage has direct access via the `input_manager` method. Behaviors can request that they get the `input_manager` via `requires :input_manager`. The preferred way of getting input to your actors is via the actor's `input` method. It returns an InputMapper that can be built with a hash of events. Behaviors then subscribe for those events from the actor's input, or ask for it during updates.
|
152
|
+
|
153
|
+
```ruby
|
154
|
+
actor.input.map_input '+space' => :shoot,
|
155
|
+
'+w' => :jump,
|
156
|
+
'+a' => :walk_left
|
157
|
+
'+s' => :duck
|
158
|
+
'+d' => :walk_right
|
159
|
+
|
160
|
+
actor.input.when :shoot do
|
161
|
+
# shoot code
|
162
|
+
end
|
163
|
+
|
164
|
+
# or
|
165
|
+
if actor.input.walk_left?
|
166
|
+
# walk left
|
167
|
+
end
|
168
|
+
```
|
169
|
+
|
170
|
+
## Updates
|
171
|
+
|
172
|
+
Updates all come from the Director. Again, the stage has direct access via `director` and behaviors must `requires :director`.
|
154
173
|
|
155
|
-
|
174
|
+
```ruby
|
175
|
+
director.when :update do |t_ms, t_sec|
|
176
|
+
# update something
|
177
|
+
end
|
178
|
+
```
|
179
|
+
|
180
|
+
## Sound and Music
|
181
|
+
|
182
|
+
SoundManager handles the autoloading of sounds from `data/sounds` and `data/music`. The stage has direct access via `sound_manager`. To allow an actor to emit sounds or music, give them the `audible` behavior. See Reactions below for usage from actors.
|
183
|
+
|
184
|
+
```ruby
|
185
|
+
# music
|
186
|
+
sound_manager.play_music :overworld
|
187
|
+
|
188
|
+
# sounds
|
189
|
+
sound_manager.play_sound :death
|
190
|
+
```
|
191
|
+
|
192
|
+
## Reactions
|
156
193
|
|
157
|
-
|
194
|
+
To ask to react to something we use the `react_to` method. It sends your message to all of the actors behaviors, giving them a chance to (you guessed it), react.
|
158
195
|
|
159
|
-
|
196
|
+
```ruby
|
197
|
+
actor.react_to :play_sound, :jump
|
198
|
+
```
|
160
199
|
|
161
|
-
|
200
|
+
If the actor has an audible behavior listening, he'll play the jump sound. But what if something else wants to know about playing sounds. Maybe the actor triggers an effect by making sound. If the actor had a `noise_alert` behavior, it too would be notified of the `:play_sound` event.
|
201
|
+
|
202
|
+
```ruby
|
203
|
+
define_behavior :noise_alert do
|
204
|
+
setup do
|
205
|
+
reacts_with :play_sound
|
206
|
+
end
|
207
|
+
|
208
|
+
helpers do
|
209
|
+
def play_sound(*args)
|
210
|
+
# react here
|
211
|
+
end
|
212
|
+
end
|
213
|
+
end
|
214
|
+
```
|
162
215
|
|
163
|
-
|
216
|
+
The `reacts_with` helper takes a list of events that your behavior is interested in, and maps them to helper methods.
|
164
217
|
|
218
|
+
## TODO
|
165
219
|
|
166
|
-
|
167
|
-
## Physics
|
168
|
-
## SVG Levels
|
220
|
+
### Configuration
|
169
221
|
|
170
|
-
|
222
|
+
1. `Gamebox.configuration`
|
171
223
|
|
172
|
-
|
224
|
+
### Resources
|
225
|
+
|
226
|
+
1. load paths
|
227
|
+
2. fonts
|
228
|
+
3. graphics (caching)
|
229
|
+
4. sounds
|
230
|
+
|
231
|
+
### Stages
|
232
|
+
|
233
|
+
1. configuring stages
|
234
|
+
1. changing stages
|
235
|
+
|
236
|
+
### Physics
|
237
|
+
|
238
|
+
## Links
|
239
|
+
|
240
|
+
[Frequently Asked Questions](https://github.com/shawn42/gamebox/wiki/Frequently-Asked-Questions)
|
241
|
+
|
242
|
+
## License
|
243
|
+
|
244
|
+
The MIT License (MIT)
|
173
245
|
|
174
246
|
Copyright © 2012 Shawn Anderson
|
247
|
+
|
248
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
249
|
+
|
250
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
251
|
+
|
252
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/bin/gamebox
CHANGED
@@ -1,12 +1,20 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
|
2
|
+
require 'rake'
|
3
3
|
require 'thor'
|
4
4
|
require 'gamebox'
|
5
|
+
include Rake::DSL
|
6
|
+
|
7
|
+
DIST_TYPES = %w(mac win linux)
|
8
|
+
load File.expand_path(File.join(File.dirname(__FILE__), "..", "/lib/gamebox/tasks/gamebox_tasks.rake"))
|
5
9
|
|
6
10
|
def print_version
|
7
11
|
puts "Gamebox #{Gamebox::VERSION::STRING}"
|
8
12
|
end
|
9
13
|
|
14
|
+
def run_rake_task(*args)
|
15
|
+
sh "rake #{args.shift}[#{args.join(',')}]"
|
16
|
+
end
|
17
|
+
|
10
18
|
if ARGV.include?('-v') || ARGV.include?('--version')
|
11
19
|
print_version
|
12
20
|
exit 0
|
@@ -31,11 +39,49 @@ class GameboxThorCommand < Thor
|
|
31
39
|
end
|
32
40
|
|
33
41
|
directory "app", "."
|
42
|
+
end
|
43
|
+
desc "n PATH", "Generates a new gamebox game at PATH."
|
44
|
+
alias_method :n, :new
|
45
|
+
|
46
|
+
desc "start", "starts the application"
|
47
|
+
def start
|
48
|
+
print_version
|
49
|
+
run_rake_task("run")
|
50
|
+
end
|
34
51
|
|
52
|
+
desc "s", "starts the application"
|
53
|
+
alias_method :s, :start
|
54
|
+
|
55
|
+
desc "debug", "starts the application in debug"
|
56
|
+
def debug
|
57
|
+
print_version
|
58
|
+
run_rake_task("debug")
|
35
59
|
end
|
36
|
-
|
37
60
|
|
61
|
+
desc "d", "starts the application in debug"
|
62
|
+
alias_method :d, :debug
|
63
|
+
|
64
|
+
desc "dist [mac|linux|win|all]", "Build an executable for your app"
|
65
|
+
def dist(*args)
|
66
|
+
dist_type = args[0]
|
67
|
+
if DIST_TYPES.include?(dist_type)
|
68
|
+
run_rake_task("dist:#{dist_type}")
|
69
|
+
elsif dist_type == "all"
|
70
|
+
DIST_TYPES.each do |type|
|
71
|
+
run_rake_task("dist:#{type}")
|
72
|
+
end
|
73
|
+
else
|
74
|
+
p "Unrecognized dist type"
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
desc "generate [actor|behavior|stage] NAME", "Gamebox generator, this will generate templated files for you for quicker development"
|
79
|
+
def generate(*args)
|
80
|
+
run_rake_task("generate:#{args.shift}", *args)
|
81
|
+
end
|
82
|
+
desc "g [actor|behavior|stage] NAME", "Gamebox generator, this will generate templated files for you for quicker development"
|
83
|
+
alias_method :g, :generate
|
38
84
|
|
39
85
|
end
|
40
86
|
|
41
|
-
GameboxThorCommand.start
|
87
|
+
GameboxThorCommand.start
|