initial commit

This commit is contained in:
armel committed 2026-09-07 20:37:40 +02:00
commit e8c3f9862a
193 files changed
+29795

No files matched your search

+44
View File
@@ -0,0 +1,44 @@
import { Zombie } from './Zombie.js';
export class MegaTank extends Zombie {
constructor(
x,
y,
target,
{
container,
viewport,
speed = 30,
size = 64,
color = [0.55, 0.28, 0.12, 1],
health = 18,
knockback = 90,
scoreValue = 15,
spawnOnDeath = () => {},
spawnCount = 3,
} = {},
) {
super(x, y, target, {
container,
viewport,
speed,
size,
color,
health,
knockback,
scoreValue,
onDeath: (mega) => {
for (let i = 0; i < spawnCount; i += 1) {
const angle = (i / spawnCount) * Math.PI * 2;
const offset = mega.size + 28;
spawnOnDeath(
mega.pos.x + Math.cos(angle) * offset,
mega.pos.y + Math.sin(angle) * offset,
target,
container,
);
}
},
});
}
}