THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
| class Main { | |
| static function main() { | |
| var signal = new Signal<Int,String>(); | |
| var conn = signal.connect(function(a, b) { | |
| trace('Well done $a $b'); | |
| }); | |
| signal.dispatch(10, "lol"); | |
| } | |
| } |
| import haxe.macro.Context; | |
| import haxe.macro.Expr; | |
| import haxe.macro.ExprTools; | |
| class ClassBuild{ | |
| //the entire contents of a class is contained in the class's fields | |
| //a class-building-macro's job is to return an array of fields | |
| static function saveClass():Array<Field>{ |
| package; | |
| import flash.geom.Rectangle; | |
| import flixel.FlxSprite; | |
| import flixel.text.FlxText; | |
| import flixel.util.FlxColor; | |
| import flixel.util.FlxDestroyUtil; | |
| class CrookedText extends FlxSprite | |
| { |
| import haxe.macro.Context; | |
| import haxe.macro.Expr; | |
| import haxe.macro.TypeTools; | |
| #if !macro | |
| @:genericBuild(PartialMacro.build()) | |
| #end | |
| class Partial<T> {} | |
| class PartialMacro { |
| using WithMacro; | |
| typedef Player = { | |
| final name:String; | |
| final level:Int; | |
| } | |
| class Main { | |
| static function main() { | |
| var player = {name: "Dan", level: 15}; |
Pretty much out of date; see https://github.com/kLabz/haxe.vim
| package fx; | |
| class Dither extends flixel.system.FlxAssets.FlxShader | |
| { | |
| @:glFragmentSource(' | |
| #pragma header | |
| const float scale = 2.0; | |
| float checker(vec2 coord) |