| 2826 |
for (var _i = 0; _i < (arguments.length - 2); _i++) { |
for (var _i = 0; _i < (arguments.length - 2); _i++) { |
| 2827 |
args[_i] = arguments[_i + 2]; |
args[_i] = arguments[_i + 2]; |
| 2828 |
} |
} |
| 2829 |
|
var _this = this; |
| 2830 |
this._exit = false; |
this._exit = false; |
| 2831 |
this.id = jg.JGUtil.generateId(); |
this.id = jg.JGUtil.generateId(); |
| 2832 |
this.width = width; |
this.width = width; |
| 2884 |
if (document.getElementById("fps_show")) |
if (document.getElementById("fps_show")) |
| 2885 |
this.fps = document.getElementById("fps_show"); |
this.fps = document.getElementById("fps_show"); |
| 2886 |
|
|
| 2887 |
|
this.renderer.handler.addEventListener("focus", function () { |
| 2888 |
|
_this.focus = true; |
| 2889 |
|
}, false); |
| 2890 |
|
this.renderer.handler.addEventListener("blur", function () { |
| 2891 |
|
_this.focus = false; |
| 2892 |
|
}, false); |
| 2893 |
|
this.focus = true; |
| 2894 |
|
|
| 2895 |
this.setSeed(); |
this.setSeed(); |
| 2896 |
|
|
| 2897 |
this.main(); |
this.main(); |
| 2970 |
Game.prototype.onmousedown = function (e) { |
Game.prototype.onmousedown = function (e) { |
| 2971 |
this.isPointDown = true; |
this.isPointDown = true; |
| 2972 |
this.eventQueue.push(new jg.InputPointEvent(jg.InputEventAction.Down, e, this.getOffsetByEvent(e))); |
this.eventQueue.push(new jg.InputPointEvent(jg.InputEventAction.Down, e, this.getOffsetByEvent(e))); |
| 2973 |
|
if (!this.focus) |
| 2974 |
|
this.renderer.handler.focus(); |
| 2975 |
e.preventDefault(); |
e.preventDefault(); |
| 2976 |
}; |
}; |
| 2977 |
|
|
| 2981 |
for (var i = 0, l = touches.length; i < l; i++) |
for (var i = 0, l = touches.length; i < l; i++) |
| 2982 |
this.eventQueue.push(new jg.InputPointEvent(jg.InputEventAction.Down, touches[i], this.getOffsetByEvent(touches[i]))); |
this.eventQueue.push(new jg.InputPointEvent(jg.InputEventAction.Down, touches[i], this.getOffsetByEvent(touches[i]))); |
| 2983 |
|
|
| 2984 |
|
if (!this.focus) |
| 2985 |
|
this.renderer.handler.focus(); |
| 2986 |
|
|
| 2987 |
e.preventDefault(); |
e.preventDefault(); |
| 2988 |
}; |
}; |
| 2989 |
|
|