Make collectibles grabbable by touch

This commit is contained in:
RedEnchilada 2016-05-09 21:41:20 -05:00
parent b318f28365
commit 6e253ba40d
2 changed files with 9 additions and 3 deletions

View file

@ -2,9 +2,9 @@ Collectible = function(level, x, y, z) {
var collectible = Entity(level, x, y, z);
collectible.bbox = {
x: 12,
y: 12,
z: 12,
x: 15,
y: 15,
z: 15,
tag: "collectible"
};

View file

@ -58,6 +58,12 @@ Dolphin = function(level, axis, position, z) {
axisMove();
vMove();
var collectible;
if (collectible = dolphin.colliding("collectible")) {
collectible.think = collectible.attract;
collectible.attractTarget = dolphin;
}
};
dolphin.fliptimer = 0;