Virtually adds this property to a class:
public function myVar(get, null):Float;
private inline function get_myVar():Float {
return 1.5;
}
package temple.components; | |
import flambe.Component; | |
/** | |
Dispose its owner entity after a given delay. | |
Example: | |
`myEntity.add(new AutoDisposer(5);` | |
Example with callback: |
package; | |
import haxe.web.Dispatch; | |
import haxe.web.Request; | |
import php.Lib; | |
/** | |
Dispatch Example | |
* Make sure `mod_rewrite` is enabled | |
* You can add any `doBla` in Routes and it becomes an url /bla | |
/** | |
* Custom flambe embed for JavaScript-target only. | |
* Author: Mark Knol - http://blog.stroep.nl | |
*/ | |
var flambe = {}; | |
/** | |
* Embed a Flambe game into the page. | |
* | |
* @return True if the game was successfully embedded. |
package urgame; | |
import flambe.animation.Sine; | |
import flambe.asset.Manifest; | |
import flambe.Entity; | |
import flambe.System; | |
class MainTest { | |
private static function main () { | |
System.init(); |
/** | |
* @author Mark Knol | |
*/ | |
class MacroJsonValidator { | |
public static macro function validateJson(path:String) { | |
if (sys.FileSystem.exists(path)) { | |
var content = sys.io.File.getContent(path); | |
try { | |
// Test the json by parsing it. | |
// It will throw an error when you made a mistake. |
// open F12, paste this in the console. screenshakes!! | |
window.oldJump = Runner.instance_.tRex.startJump | |
Runner.instance_.tRex.startJump = function() { | |
window.oldJump.call(Runner.instance_.tRex, null); | |
for(i=0;i<30;i++) { | |
setTimeout(function() { | |
Runner.instance_.tRex.canvas.style.marginTop = (-10+Math.random()*20) + "px"; | |
Runner.instance_.tRex.canvas.style.marginLeft = (-10+Math.random()*20) + "px"; | |
}, 500 + i * 10); | |
} |
Latest ✔ | Latest ✔ | 10+ ✔ | Latest ✔ | 6.1+ ✔ |
![Chrome](https://raw.github.com/alrra/browser-logos/master/chrome/chrome_48x48.png) | ![Firefox](https://raw.github.com/alrra/browser-logos/master/firefox/firefox_48x48.png) | ![IE](https://raw.github.com/alrra/browser-logos/master/internet-explorer/internet-explorer_48x48.png) | ![Opera](https://raw.github.com/alrra/browser-logos/master/opera/opera_48x48.png) | ![Safari](https://raw.github.com/alrra/browser-logos/master/safari/safari_48x48.png)
var palette = [["#69D2E7","#A7DBD8","#E0E4CC","#F38630","#FA6900"], | |
["#FE4365","#FC9D9A","#F9CDAD","#C8C8A9","#83AF9B"], | |
["#ECD078","#D95B43","#C02942","#542437","#53777A"], | |
["#556270","#4ECDC4","#C7F464","#FF6B6B","#C44D58"], | |
["#774F38","#E08E79","#F1D4AF","#ECE5CE","#C5E0DC"], | |
["#E8DDCB","#CDB380","#036564","#033649","#031634"], | |
["#490A3D","#BD1550","#E97F02","#F8CA00","#8A9B0F"], | |
["#594F4F","#547980","#45ADA8","#9DE0AD","#E5FCC2"], | |
["#00A0B0","#6A4A3C","#CC333F","#EB6841","#EDC951"], | |
["#E94E77","#D68189","#C6A49A","#C6E5D9","#F4EAD5"], |