From b8d881eb60991e937ba807512c4800b295b05cd3 Mon Sep 17 00:00:00 2001 From: -=yb4f3410 Date: Thu, 29 Nov 1973 22:33:09 +0100 Subject: [PATCH] Initial Commit: Custom Code - BK Flame - Entity Loaded (mccud019kb.js) --- 1cs8fm87ty.js | 28 ++++++++++++++++++++++++++++ mccud019kb.js | 41 +++++++++++++++++++++++++++++++++++++++++ n3ehhvglar.js | 8 -------- ongcnzdgae.js | 10 ++++++++++ ot5qabk55a.js | 13 ------------- 5 files changed, 79 insertions(+), 21 deletions(-) create mode 100644 1cs8fm87ty.js create mode 100644 mccud019kb.js delete mode 100644 n3ehhvglar.js create mode 100644 ongcnzdgae.js delete mode 100644 ot5qabk55a.js diff --git a/1cs8fm87ty.js b/1cs8fm87ty.js new file mode 100644 index 0000000..6c559ef --- /dev/null +++ b/1cs8fm87ty.js @@ -0,0 +1,28 @@ +//console.log(data); + +this.camera = GameLib.EntityManager.Instance.findComponentById('yv62w8sx9r'); + +var vector = new THREE.Vector3(); + +vector.set( + ( event.clientX / window.innerWidth ) * 2 - 1, + - ( event.clientY / window.innerHeight ) * 2 + 1, + 0.5 ); + +vector.unproject( this.camera.instance ); + +vector.x = -1 * ((window.innerWidth / 2) - (data.event.clientX)); +vector.y = 1 * ((window.innerHeight / 2) - (data.event.clientY)); +vector.z = 0; + +this.camera.lookAt.x = vector.x; +this.camera.lookAt.y = vector.y; +this.camera.lookAt.z = vector.z; + +this.camera.updateInstance(); + +//console.log(vector.x); + +return null; + +//@ sourceURL=mouseMove.js \ No newline at end of file diff --git a/mccud019kb.js b/mccud019kb.js new file mode 100644 index 0000000..ce161a2 --- /dev/null +++ b/mccud019kb.js @@ -0,0 +1,41 @@ +if (this.parentEntity === data.entity) { + console.log('my entity loaded :)'); +} else { + return; +} + +this.enemies = []; + +/** + * Min and max spawn time is in seconds + */ +GameLib.D3.CustomCode.MIN_SPAWN_TIME = 1; +GameLib.D3.CustomCode.MAX_SPAWN_TIME = 4; + +this.beforeRender = GameLib.EntityManager.Instance.findComponentById('dywmtohrda'); +//this.materialRusted = GameLib.EntityManager.Instance.findComponentById('0mrd2dx5np'); + +GameLib.Event.Emit( + GameLib.Event.GET_GRAPHICS_IMPLEMENTATION, + null, + function(graphics) { + this.graphics = graphics + }.bind(this) +); + +if ( + !this.beforeRender +) { + console.error('components not available at runtime', this); +} + +/** + * Updates the displacement scale of materialRusted + */ +//this.updateMaterialRusted = function(totalTime) { +// this.materialRusted.displacementScale = Math.sin(totalTime); +// this.materialRusted.updateInstance(); +//} + +return null; +//# sourceURL=entityLoaded.js \ No newline at end of file diff --git a/n3ehhvglar.js b/n3ehhvglar.js deleted file mode 100644 index 1072394..0000000 --- a/n3ehhvglar.js +++ /dev/null @@ -1,8 +0,0 @@ -this.beforeRender = GameLib.EntityManager.Instance.findComponentById('dywmtohrda'); -this.entityLoaded = GameLib.EntityManager.Instance.findComponentById('mccud019kb'); - -this.beforeRender.entityLoaded = this.entityLoaded; - -return null; - -//@ sourceURL=gameStart.js \ No newline at end of file diff --git a/ongcnzdgae.js b/ongcnzdgae.js new file mode 100644 index 0000000..ef15bba --- /dev/null +++ b/ongcnzdgae.js @@ -0,0 +1,10 @@ +this.stopSpawnBullet = function() { + this.beforeRender = GameLib.EntityManager.Instance.findComponentById('dywmtohrda'); + this.beforeRender.spawningBullets = false; +} + +this.stopSpawnBullet(); + +return null; + +//@ sourceURL=mouseUp.js \ No newline at end of file diff --git a/ot5qabk55a.js b/ot5qabk55a.js deleted file mode 100644 index 5e872b3..0000000 --- a/ot5qabk55a.js +++ /dev/null @@ -1,13 +0,0 @@ -if (GameLib.Utils.UndefinedOrNull(this.camera)) { - this.camera = GameLib.EntityManager.Instance.findComponentById('yv62w8sx9r'); -} - -if (data.event.deltaY < 0 && this.camera.fov > 30) { - this.camera.fov -= 30; - this.camera.updateInstance(); -} else if (data.event.deltaY > 0 && this.camera.fov < 90) { - this.camera.fov += 30; - this.camera.updateInstance(); -} - -//@ sourceURL=mouseWheel.js \ No newline at end of file