play dummy audio for touch devices

beta.r3js.org
-=yb4f310 2018-04-03 21:03:35 +02:00
parent 87e9753e1c
commit 102bf7fc6a
1 changed files with 14 additions and 0 deletions

View File

@ -21,6 +21,8 @@ GameLib.System.Input = function(
this.sensitivityCounter = 0;
this.playAudio = true;
this.editorControls = [];
this.orbitControls = [];
this.firstPersonControls = [];
@ -978,6 +980,18 @@ GameLib.System.Input.prototype.onKeyboardKeyDown = function(event) {
GameLib.System.Input.prototype.onTouchStart = function(event) {
if (this.playAudio) {
GameLib.Event.Emit(
GameLib.Event.PLAY_AUDIO,
{
name : 'Audio - Dummy'
}
);
this.playAudio = false;
}
this.sensitivityCounter = 0;
this.touches = {};