feat: Add rabbit spawning logic to input handling
This commit is contained in:
parent
f1a18f9168
commit
5ac6d205ad
@ -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);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user