This commit is contained in:
jonathan santis 2024-11-27 09:39:11 +01:00
parent 47fefd70b9
commit 791d49aad9
2 changed files with 4 additions and 12 deletions

View File

@ -124,18 +124,10 @@ const Emitter = struct
{ {
p.update(); p.update();
p.applyGravity(2); p.applyGravity(2);
if(p.position.a.x >= -(screenWidth/2)){ posx = @intFromFloat(screenWidth / 2 + p.position.a.x);
posx = @intFromFloat(screenWidth / 2 + p.position.a.x); posy = @intFromFloat(screenHeight / 2 + p.position.a.y);
} else { //rl.drawRectangle(posx,posy,2,2,rl.Color{.r=p.position.a.color.r,.g=p.position.a.color.g,.b=p.position.a.color.b,.a=255});
posx = 0; rl.drawTexture(texture,posx,posy,rl.Color.white);
}
if(p.position.a.y >= -(screenHeight/2)){
posy = @intFromFloat(screenHeight / 2 + p.position.a.y);
} else {
posy = 0;
}
//rl.drawRectangle(posx,posy,2,2,rl.Color{.r=p.position.a.color.r,.g=p.position.a.color.g,.b=p.position.a.color.b,.a=255});
rl.drawTexture(texture,posx,posy,rl.Color.white);
} }
} }

Binary file not shown.