Gating network behind compile flag

This commit is contained in:
2026-08-11 12:52:38 -05:00
parent 5f34cb34b2
commit 830864aa8a
281 changed files with 334 additions and 13204 deletions
+31 -21
View File
@@ -1,26 +1,36 @@
// Copyright (c) 2026 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
var Player = require('./Player.js');
var PlayerCamera = require('./PlayerCamera.js');
var TestPlane = require('./TestPlane.js');
var camera = null;
module.exports = {
init: function() {
var player = new Player();
new TestPlane();
camera = new PlayerCamera(player);
},
update: function() {
if(camera) camera.update();
},
dispose: function() {
camera = null;
class OverworldScene {
constructor() {
this.time = 0;
}
};
init() {
this.player = new Player();
this.plane = new TestPlane();
this.camera = new PlayerCamera(this.player);
}
update() {
this.camera.update();
this.time += Time.delta;
if(this.time > 3.0) {
Scene.set(new OverworldScene());
}
}
dispose() {
this.camera.dispose();
this.player.dispose();
this.plane.dispose();
this.camera = null;
this.player = null;
this.plane = null;
}
}
module.exports = OverworldScene;