Last active
October 24, 2016 04:00
-
-
Save okabsd/7281c8ba2b3cd152328f769612d935c3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -eq 0 ] || [ "$1" == "" ]; then | |
echo 'Game name required.' | |
exit 1 | |
fi | |
mkdir -p $1/clones | |
git clone https://github.com/Okahyphen/base $1/clones/base | |
git clone https://github.com/Okahyphen/construct $1/clones/construct | |
git clone https://github.com/Okahyphen/screenplay $1/clones/screenplay | |
mkdir $1/construct $1/screenplay | |
mv $1/clones/base/src/base.lua $1/base.lua | |
mv $1/clones/construct/src/* $1/construct | |
mv $1/construct/construct.lua $1/construct/main.lua | |
mv $1/clones/screenplay/src/* $1/screenplay | |
touch $1/conf.lua $1/main.lua | |
echo "For the `base', `construct', and `screenplay' libraries:\n" >> $1/LICENSE | |
cat $1/clones/screenplay/LICENSE >> $1/LICENSE | |
mkdir -p $1/assets/sounds $1/assets/sprites | |
mkdir $1/data $1/game $1/scenes | |
# Cleanup | |
rm -rf $1/clones |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Fill in the blanks | |
local gfx, win, time = | |
love.graphics, love.window, love.timer.getTime | |
local director = require 'screenplay.Director' () | |
function love.load () | |
director:register_set { | |
[''] = require 'scenes.' -- Scenes | |
} :mount -- Default scene | |
end | |
function love.update (dt) | |
director:process(dt, time()) | |
end | |
function love.draw () | |
director:render(gfx, win) | |
end | |
function love.keypressed (k, s, r) | |
director:handle { | |
type = 'keypress', | |
data = { | |
key = k, | |
scancode = s, | |
is_repeat = r | |
} | |
} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment