feat: Add rabbit spawning logic to input handling

This commit is contained in:
Kacper Kostka (aider) 2025-04-05 17:23:35 +02:00
parent f1a18f9168
commit 5ac6d205ad

View File

@ -128,6 +128,11 @@ function draw(x, y) {
colorIndex: Math.floor(Math.random() * FIRE_COLORS.length) colorIndex: Math.floor(Math.random() * FIRE_COLORS.length)
}); });
} }
}
// Special handling for rabbits - create rabbit entity
else if (currentTool === RABBIT) {
createEntity(ENTITY_TYPES.RABBIT, pixelX, pixelY);
return; // Only create one rabbit per click
} else { } else {
setPixel(pixelX, pixelY, currentTool); setPixel(pixelX, pixelY, currentTool);