Skip to content

Instantly share code, notes, and snippets.

View NulllStack's full-sized avatar
👋

NulllStack

👋
  • Zhuhai
  • 06:44 (UTC +08:00)
View GitHub Profile
@NulllStack
NulllStack / jsonStorage.lua
Created May 28, 2020 00:32 — forked from jasonbradley/jsonStorage.lua
Lua read/write data in JSON format
-- 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")
@NulllStack
NulllStack / Outline.hx
Created May 24, 2020 16:27 — forked from AustinEast/Outline.hx
HaxeFlixel Outline Shader
import flixel.system.FlxAssets.FlxShader;
import flixel.util.FlxColor;
class Outline extends FlxShader
{
@:glFragmentSource('
#pragma header
uniform vec2 size;
uniform vec4 color;
@NulllStack
NulllStack / SimplePlayer.hx
Created January 21, 2020 16:21 — forked from 01010111/SimplePlayer.hx
Simplest Flixel Player
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;