Make collectibles grabbable by touch
This commit is contained in:
parent
b318f28365
commit
6e253ba40d
2 changed files with 9 additions and 3 deletions
|
@ -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"
|
||||
};
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue