This commit is contained in:
RandomityGuy 2021-07-08 21:17:08 +05:30
parent d82b49eefc
commit b224b1c262
4 changed files with 5 additions and 10 deletions

View file

@ -3,7 +3,7 @@
<html> <html>
<head> <head>
<meta charset="utf-8"/> <meta charset="utf-8"/>
<title>Hello Heaps</title> <title>Marble Blast Gold Haxe Port</title>
<style> <style>
body { body {
margin: 0; margin: 0;

View file

@ -1,5 +1,6 @@
package src; package src;
import js.Browser;
import h3d.col.Plane; import h3d.col.Plane;
import h3d.mat.Material; import h3d.mat.Material;
import h3d.prim.Cube; import h3d.prim.Cube;
@ -76,12 +77,7 @@ class CameraController extends Object {
// level.scene.addEventListener(onEvent); // level.scene.addEventListener(onEvent);
// Sdl.setRelativeMouseMode(true); // Sdl.setRelativeMouseMode(true);
level.scene.camera.fovY = 60; level.scene.camera.fovY = 60;
#if hlsdl
lockCursor(); lockCursor();
#end
#if hldx
Cursor.show(false);
#end
} }
public function lockCursor() { public function lockCursor() {

View file

@ -1029,12 +1029,8 @@ class MarbleWorld extends Scheduler {
this.cursorLock = enabled; this.cursorLock = enabled;
if (enabled) { if (enabled) {
this.marble.camera.lockCursor(); this.marble.camera.lockCursor();
#if hl
#end
} else { } else {
#if hl
this.marble.camera.unlockCursor(); this.marble.camera.unlockCursor();
#end
} }
} }

View file

@ -68,6 +68,9 @@ class Mission {
var path = StringTools.replace(rawElementPath.substring(rawElementPath.indexOf('data/')), "\"", ""); var path = StringTools.replace(rawElementPath.substring(rawElementPath.indexOf('data/')), "\"", "");
if (StringTools.contains(path, 'interiors_mbg/')) if (StringTools.contains(path, 'interiors_mbg/'))
path = StringTools.replace(path, 'interiors_mbg/', 'interiors/'); path = StringTools.replace(path, 'interiors_mbg/', 'interiors/');
#if js
path = StringTools.replace(path, "data/", "");
#end
if (ResourceLoader.fileSystem.exists(path)) if (ResourceLoader.fileSystem.exists(path))
return path; return path;
return ""; return "";