Top Level Namespace
- Includes:
- ShatteredModel, ShatteredState, ShatteredView
Defined Under Namespace
Modules: Rails, Shatter
Classes: ActorGenerator, ModelGenerator, Object, StateGenerator, ViewGenerator
Constant Summary
collapse
- SHATTERED_ROOT =
root_path
Instance Method Summary
collapse
Instance Method Details
#load_plugins(path) ⇒ Object
21
22
23
24
25
26
27
28
|
# File 'lib/templates/configs/boot.rb', line 21
def load_plugins(path)
Dir.foreach(path) do |plugin|
next if plugin == ".." || plugin == "."
plugin_file = "#{path}/#{plugin}/init"
require plugin_file if File.exists? "#{plugin_file}.rb"
end
end
|
#load_shattered_edge(path) ⇒ Object
14
15
16
17
18
19
|
# File 'lib/templates/configs/boot.rb', line 14
def load_shattered_edge(path)
shatter_path = "#{path}/shatter/lib"
$: << shatter_path if File.directory? shatter_path
require 'rubygems'
require 'shatter'
end
|
#start_game ⇒ Object
1
2
3
4
5
|
# File 'lib/templates/configs/runner.rb', line 1
def start_game
require File.dirname(__FILE__) + "/../config/boot"
require File.dirname(__FILE__) + "/../config/environment"
Shatter::GameLoader.instance.run
end
|