This file contains 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 Test { | |
static function main() { | |
var a = new SmartArray([1, 2, 3]); | |
for (e in a) { | |
trace(e); | |
if (e == 2) a.remove(1); | |
} | |
} | |
} | |
This file contains 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 Test { | |
static function main() { | |
var a = new Priority(); | |
a.add(3, 2); | |
a.add(1, 1); | |
trace(a.a); | |
} | |
} |
This file contains 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
var w = Config.width; | |
var h = Config.height; | |
var space:NapeSpaceView = new NapeSpaceView(new Point<Float>(0, 600)); | |
space.debugLines = {size: 3, color: 0xFFFFFF}; | |
c.addChild(space); | |
space.createStaticRect(new Rect<Float>(50, h - 50, w - 100, 1)); | |
space.createStaticRect(new Rect<Float>(w - 50, 50, 1, h - 100)); |
This file contains 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 haxe.macro.TypeTools; | |
import haxe.macro.Expr; | |
import haxe.macro.Context; | |
import haxe.macro.Type; | |
class GenericBuildMacro { | |
static public function build():ComplexType { |
This file contains 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
/** | |
* ParentClass | |
* @author AxGord <axgord@gmail.com> | |
*/ | |
@:assets_path('assets') | |
class ParentClass implements HasAsset { | |
@:asset public static var MY_ASSET = 'myasset3.png'; | |
static function main() { |
This file contains 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 pony.time.Tween; | |
class TweenExample { | |
static function main() { | |
var obj = new Sprite(); | |
new Tween(20...100, '3s').onUpdate << function(v:Float) obj.y = v; | |
} | |
} |
This file contains 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 LinkDemo implements pony.magic.HasLink { | |
static var index:Int = 5; | |
static var visualIndex(link, never):String = Std.string(index + 1); | |
static function main() { | |
trace(visualIndex);//=>6 | |
index = 10; | |
trace(visualIndex);//=>11 | |
} |
This file contains 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 pixi.core.graphics.Graphics; | |
import pixi.core.sprites.Sprite; | |
import pixi.core.textures.Texture; | |
import pony.time.DeltaTime; | |
class Container extends Sprite { | |
private var _bunny:Sprite; | |
public function new(width:Float, height:Float) { |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<config invertbar="true" mouseFilterWait="1000" mouseFilterCount="9"> | |
<work repeat="5000" sound="start.mp3">1</work> | |
<relax sound="start.mp3">1</relax> | |
<idle>10</idle> | |
</config> |
This file contains 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 neko.Lib; | |
using Main; | |
/** | |
* ... | |
* @author AxGord <axgord@gmail.com> | |
*/ | |
class Main { |