a
This commit is contained in:
parent
d163ceb291
commit
f6d7412744
94 changed files with 3836 additions and 1226 deletions
|
|
@ -30,7 +30,8 @@
|
|||
resolveObstacleCollisions(item, dt, worldRef);
|
||||
item.x = clamp(item.x, p, worldRef.w - p);
|
||||
item.y = clamp(item.y, p, worldRef.h - p);
|
||||
const groundFriction = Math.pow(0.72, dt);
|
||||
const oilMul = global.TarinaiItemEnvironmentHazardSystem?.groundFrictionMultiplier?.(worldRef, item.x, item.y) ?? 1;
|
||||
const groundFriction = Math.pow(1 - (1 - 0.72) * oilMul, dt);
|
||||
item.vx *= groundFriction;
|
||||
item.vy *= groundFriction;
|
||||
}
|
||||
|
|
@ -216,7 +217,7 @@
|
|||
const now = worldRef?.time || 0;
|
||||
if ((item.lastObstacleBounceAt || -999) + 0.08 > now) return;
|
||||
item.lastObstacleBounceAt = now;
|
||||
const color = item.type === "balloon" ? "rgba(248,122,166,0.36)" : ((obstacle?.type === "bounce_fence" || obstacle?.type === "bounce_fence_v") ? "rgba(82,153,230,0.46)" : (obstacle?.type === "stone" ? "rgba(165,165,150,0.45)" : "rgba(160,116,64,0.42)"));
|
||||
const color = item.type === "balloon" ? "rgba(248,122,166,0.36)" : ((obstacle?.type === "bounce_fence" || obstacle?.type === "bounce_fence_v") ? "rgba(235,104,165,0.50)" : (obstacle?.type === "stone" ? "rgba(165,165,150,0.45)" : "rgba(160,116,64,0.42)"));
|
||||
worldRef?.queueEffect?.("ring", item.x, item.y, { size: Math.max(13, (item.r || 18) * 0.82), life: 0.18, color });
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue