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
package zsynth; | |
import lime.utils.Float32Array; | |
import lime.media.openal.*; | |
using Math; | |
class ZSynth | |
{ |
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 h2d.Anim; | |
import h2d.Tile; | |
class Animation extends Anim | |
{ | |
var anims:Map<String, AnimData> = new Map(); | |
var tiles:Array<Tile>; | |
var current_anim:String = ''; |
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
class Lottery | |
{ | |
var entries:Array<{ name:String, chance:Float }> = []; | |
var lots_total:Float = 0; | |
public function new() { } | |
public function add_entry(participant:String, chance:Float = 1) | |
{ |
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
package; | |
import flixel.FlxState; | |
import flixel.math.FlxPoint; | |
import flixel.FlxG; | |
import flixel.FlxCamera; | |
import flixel.FlxSprite; | |
import flixel.group.FlxGroup.FlxTypedGroup; | |
using Math; |
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
package; | |
import flixel.system.FlxAssets; | |
import flixel.util.FlxColor; | |
class Shader extends FlxShader | |
{ | |
@:glFragmentSource(' | |
#pragma header |
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 h2d.Scene; | |
import h2d.Graphics; | |
import hxd.App; | |
import hxd.Key; | |
class Game extends App | |
{ | |
static function main() new Game(); |
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
pico-8 cartridge // http://www.pico-8.com | |
version 16 | |
__lua__ | |
--pecs - pico-8 ecs | |
--01010111 | |
function _init() | |
local rect = get_id() | |
add_component(rect, 'position', { x=60, y=60 }) | |
add_component(rect, 'physics', { vx=2, vy=0, ax=0, ay=2, dx=0.9, dy=1.0 }) |
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
using haxe.Json; | |
class OgmoUtils | |
{ | |
// region PARSING | |
/** | |
* Parse OGMO Editor level .json text | |
* @param json | |
* @return LevelData |
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
using OgmoUtils; | |
class OgmoExample | |
{ | |
public function new(level_json:String) | |
{ | |
var data = level_json.parse_level_json(); | |
var tile_layer = data.get_tile_layer('tiles'); | |
trace(tile_layer.data2D); |
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
using Math; | |
abstract Vec2(Array<Float>) | |
{ | |
public static var UP (default, never):Vec2 = [0, -1]; | |
public static var DOWN (default, never):Vec2 = [0, 1]; | |
public static var LEFT (default, never):Vec2 = [-1, 0]; | |
public static var RIGHT (default, never):Vec2 = [1, 0]; |