29 lines
684 B
Haxe
Raw Normal View History

2025-01-22 16:18:30 +01:00
package;
import kha.Assets;
import kha.Framebuffer;
import kha.Scheduler;
import kha.System;
class Main {
static function update(): Void {
}
static function render(frames: Array<Framebuffer>): Void {
}
public static function main() {
System.start({title: "Test", width: 1024, height: 768}, function (_) {
// Just loading everything is ok for small projects
Assets.loadEverything(function () {
// Avoid passing update/render directly,
// so replacing them via code injection works
Scheduler.addTimeTask(function () { update(); }, 0, 1 / 60);
System.notifyOnFrames(function (frames) { render(frames); });
});
});
}
}