Update: CC - Snake FS - Mouse Down (gzewp2awcf.js) 690 bytes modified

beta.r3js.org
-=yb4f310 2018-03-24 19:27:18 +01:00
parent 4ab424a252
commit 51b83e7667
1 changed files with 37 additions and 0 deletions

View File

@ -40,8 +40,45 @@ intersects.map(
var pixel = intersect.mesh.materials[0].diffuseMap.image.alphas[(256 * y) + x];
if (pixel > 0) {
intersect.mesh.materials[0].visible = true;
intersect.mesh.materials[0].updateInstance('visible');
if (intersect.mesh.id === 'e69gb1028e') {
GameLib.Event.Emit(
GameLib.Event.KEY_DOWN,
{
keyCode : GameLib.System.Input.KEY_LEFT
}
);
}
if (intersect.mesh.id === 'z0gwmplslj') {
GameLib.Event.Emit(
GameLib.Event.KEY_DOWN,
{
keyCode : GameLib.System.Input.KEY_RIGHT
}
);
}
if (intersect.mesh.id === 'q3ra6x84d8') {
GameLib.Event.Emit(
GameLib.Event.KEY_DOWN,
{
keyCode : GameLib.System.Input.KEY_UP
}
);
}
if (intersect.mesh.id === '2eva6brga6') {
GameLib.Event.Emit(
GameLib.Event.KEY_DOWN,
{
keyCode : GameLib.System.Input.KEY_DOWN
}
);
}
}
}