Update: CC - Entity Loaded - AR Football 3 (ff0fsum4zx.js) 948 bytes modified

beta.r3js.org
Theunis Johannes Botha 2018-05-28 17:54:15 +02:00
parent f033817d25
commit b798eee9d2
1 changed files with 38 additions and 0 deletions

View File

@ -10,6 +10,8 @@ if (data.entity === this.parentEntity) {
this.mouseMove = R3.EntityManager.Instance.findComponentById('dwxvtxzrun');
this.touchMove = R3.EntityManager.Instance.findComponentById('p49pad0i7l');
this.beforeRender = R3.EntityManager.Instance.findComponentById('7l8ar325qf');
this.keyDown = R3.EntityManager.Instance.findComponentById('905x4c8pna');
this.keyUp = R3.EntityManager.Instance.findComponentById('r5kzahijoq');
/**
* Meshes
@ -497,6 +499,40 @@ R3.Event.Subscribe(
this.mouseMove.entityLoaded = null;
this.touchMove.entityLoaded = null;
this.beforeRender.entityLoaded = null;
this.keyDown.entityLoaded = null;
this.keyUp.entityLoaded = null;
}.bind(this)
);
R3.Event.Subscribe(
R3.Event.GAME_DATA,
function(data) {
if (data.type === 'shoot_start') {
console.log('shoot start');
}
if (data.type === 'shoot_release') {
console.log('shoot release');
}
if (data.type === 'look_left') {
this.move(
{
x : -10,
y : 0
}
)
}
if (data.type === 'look_right') {
this.move(
{
x : 10,
y : 0
}
)
}
}.bind(this)
);
@ -586,6 +622,8 @@ R3.Event.Subscribe(
this.mouseMove.entityLoaded = this;
this.touchMove.entityLoaded = this;
this.beforeRender.entityLoaded = this;
this.keyDown.entityLoaded = this;
this.keyUp.entityLoaded = this;
}.bind(this)
);