added ragdoll with one limb

This commit is contained in:
Jeena 2014-02-12 00:30:09 +01:00
parent b55f6d58fc
commit e488beb203
18 changed files with 511 additions and 132 deletions

View file

@ -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);