We'll make a project. Make a new directory somewhere Put:
# mruby-moon load
engine = Moon::Engine.new do |e, delta|
step e, delta
end
engine.setup
require 'core/load'
require 'scripts/load'
engine.main
Into a file, (call it main or something)
and then run the mruby interpter from moon
mruby main.rb
It should try to load a Moon like project.
Create a scripts
and core
directory each with a load.rb
for now.
In the scripts/load.rb
def step(engine, delta)
do_step_stuff_here
end
Normally if you have all the basalt packages installed you can do stuff like this:
def step(engine, delta)
@state_manager ||= Moon::StateManager.new(engine).tap do |s|
s.push States::Title
end
@state_manager.step delta
end