Search found 2 matches
- Wed Apr 24, 2024 5:49 am
- Forum: General
- Topic: Sprite speed
- Replies: 4
- Views: 2590
Re: Sprite speed
Hello, welcome to the forums. I may be wrong, but I think what's happening is that you have a single animation (animations.enemy) for all the enemies, and you update it once per enemy, therefore the more enemies you have, the more times in the same frame the animation will be updated. If you're OK ...
- Tue Apr 23, 2024 7:34 pm
- Forum: General
- Topic: Sprite speed
- Replies: 4
- Views: 2590
Sprite speed
I'm new in love2d and I had a problem. If I spawn more than one enemy, it multiplies the sprite's speed. Does anyone know why? Enemy code enemies = {} function spawnEnemy(x, y) local enemy = world:newRectangleCollider(x, y, 22, 32, {collision_class = "Danger"}) enemy.dir = 1 enemy.speed = ...