mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
added ragdoll with one limb
This commit is contained in:
parent
b55f6d58fc
commit
e488beb203
18 changed files with 511 additions and 132 deletions
|
|
@ -23,6 +23,9 @@ function (Parent, KeyboardInput, MouseInput, NotificationCenter) {
|
|||
s:83,
|
||||
d:68,
|
||||
|
||||
f:70,
|
||||
g:71,
|
||||
|
||||
up: 38,
|
||||
left: 37,
|
||||
down: 40,
|
||||
|
|
@ -51,6 +54,9 @@ function (Parent, KeyboardInput, MouseInput, NotificationCenter) {
|
|||
this.keyboardInput.registerKey(keys.space, 'jump');
|
||||
|
||||
this.keyboardInput.registerKey(keys.tab, 'showInfo', 'hideInfo');
|
||||
|
||||
this.keyboardInput.registerKey(keys.f, 'handActionLeft');
|
||||
this.keyboardInput.registerKey(keys.g, 'handActionRight');
|
||||
}
|
||||
|
||||
PlayerController.prototype.moveLeft = function () {
|
||||
|
|
@ -79,6 +85,14 @@ function (Parent, KeyboardInput, MouseInput, NotificationCenter) {
|
|||
NotificationCenter.trigger('sendGameCommand', 'lookAt', options);
|
||||
};
|
||||
|
||||
PlayerController.prototype.handActionLeft = function() {
|
||||
this.handActionRequest(-0.5, 0.5);
|
||||
};
|
||||
|
||||
PlayerController.prototype.handActionRight = function() {
|
||||
this.handActionRequest(0.5, 0.5);
|
||||
};
|
||||
|
||||
PlayerController.prototype.handActionRequest = function(x, y) {
|
||||
var options = {x:x, y:y};
|
||||
NotificationCenter.trigger("sendGameCommand", "handActionRequest", options);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue