forked from LeenkxTeam/LNXSDK
Update Files
This commit is contained in:
28
Kha/Tests/Empty/Sources/Main.hx
Normal file
28
Kha/Tests/Empty/Sources/Main.hx
Normal file
@ -0,0 +1,28 @@
|
||||
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); });
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user