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
-- load the JSON library. | |
local Json = require("json") | |
local JsonStorage = {} | |
-- Function to save a table. Since game settings need to be saved from session to session, we will | |
-- use the Documents Directory | |
JsonStorage.saveTable = function(t, filename) | |
local path = system.pathForFile( filename, system.DocumentsDirectory) | |
local file = io.open(path, "w") |
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
import flixel.system.FlxAssets.FlxShader; | |
import flixel.util.FlxColor; | |
class Outline extends FlxShader | |
{ | |
@:glFragmentSource(' | |
#pragma header | |
uniform vec2 size; | |
uniform vec4 color; |
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
import flixel.FlxG; | |
import flixel.FlxObject; | |
import flixel.FlxSprite; | |
class Player extends FlxSprite { | |
var WALK_SPEED = 200; | |
var JUMP_POWER = 300; | |
var FRAME_WIDTH = 16; | |
var FRAME_HEIGHT = 16; |