[Mobile] Add mobile controls.
They're invisible. Dpad on left, drift button on right, reverse button above it. Pressing the dpad starts holding an item - releasing touch releases the item. Flick forward or back to choose item direction.
This commit is contained in:
1 parent
a773b60b95
commit
446d07f1b4
6 files changed
+105
-6
No files matched your search
@@ -120,7 +120,7 @@ window.BombC = function(item, scene, type) {
|
||||
this.canBeDropped = true;
|
||||
this.isDestructive = true;
|
||||
|
||||
this.isExploding = false;
|
||||
this.explodeTime = 0;
|
||||
|
||||
this.collideKart = collideKart;
|
||||
this.onRest = onRest;
|
||||
@@ -135,6 +135,10 @@ window.BombC = function(item, scene, type) {
|
||||
}
|
||||
|
||||
function update(argument) {
|
||||
if (item.deadTimer > 0 && t.explodeTime == 0) {
|
||||
//begin explosion
|
||||
t.explodeTime = 1;
|
||||
}
|
||||
if (!item.held && item.colRadius < 6) {
|
||||
item.colRadius += 0.2;
|
||||
if (item.colRadius > 6) item.colRadius = 6;
|
||||
|
||||
@@ -79,6 +79,7 @@ window.GreenShellC = function(item, scene) {
|
||||
//sliding plane
|
||||
var proj = vec3.dot(item.vel, n);
|
||||
vec3.sub(item.vel, item.vel, vec3.scale(vec3.create(), n, proj));
|
||||
item.stuckTo = dat.object;
|
||||
} else {
|
||||
adjustPos = false;
|
||||
ignoreList.push(plane);
|
||||
|
||||
Reference in new issue
Block a user