mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
added pointer locking and viewport moving
This commit is contained in:
parent
072e984215
commit
6d9d02615a
12 changed files with 236 additions and 141 deletions
21
app/Game/Client/Control/Input.js
Executable file
21
app/Game/Client/Control/Input.js
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
define([
|
||||
"Lib/Utilities/NotificationCenter"
|
||||
],
|
||||
|
||||
function (Nc) {
|
||||
|
||||
function Input(playerController) {
|
||||
this.playerController = playerController;
|
||||
this.x = null;
|
||||
this.y = null
|
||||
}
|
||||
|
||||
Input.prototype.onXyChange = function(x, y) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.playerController.setXY(this.x, this.y);
|
||||
}
|
||||
|
||||
return Input;
|
||||
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue