Update destructibleEntity to also be growable

This commit is contained in:
Ryan Huffman 2016-12-21 10:43:46 -08:00
parent 3cddf65ba1
commit 83ec0063c0

View file

@ -146,13 +146,17 @@ var TEXTURE_NAME = "tex.health1";
props.position.y += props.dimensions.y;
Entities.addEntity(props);
},
startNearTrigger: function () {
print("launch.js | got start near trigger");
this.growBlock();
startDistanceGrab: function () {
print("launch.js | got start distance grab");
this.startGrabTime = Date.now();
},
startFarTrigger: function () {
print("launch.js | got start far trigger");
this.growBlock();
releaseGrab: function() {
print("launch.js | release grab");
var grabbedForMs = Date.now() - this.startGrabTime;
print("launch.js | grab time:", grabbedForMs);
if (grabbedForMs < 300) {
this.growBlock();
}
},
clickDownOnEntity: function () {
print("launch.js | got click down");