26 float y,
float velocityX,
float velocityY)
28 using namespace GameConfig::Projectile;
34 .with<ecs::Velocity>(
"projectile_velocity", velocityX, velocityY)
35 .with<
ecs::Rect>(
"projectile_rect", 0.F, 0.F,
static_cast<int>(Basic::SPRITE_WIDTH),
36 static_cast<int>(Basic::SPRITE_HEIGHT))
37 .with<ecs::Scale>(
"projectile_scale", Basic::SCALE, Basic::SCALE)
39 .with<ecs::Projectile>(
"projectile", type, Basic::DAMAGE, Basic::LIFETIME, 0.0f)
47 .with<ecs::Velocity>(
"projectile_velocity", velocityX, velocityY)
48 .with<
ecs::Rect>(
"projectile_rect", 0.F, 0.F,
static_cast<int>(Supercharged::SPRITE_WIDTH),
49 static_cast<int>(Supercharged::SPRITE_HEIGHT))
50 .with<ecs::Scale>(
"projectile_scale", Supercharged::SCALE, Supercharged::SCALE)
52 .with<ecs::Projectile>(
"projectile", type, Supercharged::DAMAGE, Supercharged::LIFETIME, 0.0f)
53 .with<
ecs::Animation>(
"projectile_animation", 0, Supercharged::ANIMATION_FRAMES,
54 Supercharged::ANIMATION_DURATION, 0.0f,
55 static_cast<int>(Supercharged::SPRITE_WIDTH),
56 static_cast<int>(Supercharged::SPRITE_HEIGHT), Supercharged::ANIMATION_FRAMES)
static ecs::Entity createSuperchargedProjectile(ecs::Registry ®istry, float x, float y, float velocityX, float velocityY)
Create a supercharged projectile.
static ecs::Entity createProjectile(ecs::Registry ®istry, ecs::Projectile::Type type, float x, float y, float velocityX, float velocityY)
Create a projectile with given parameters.
constexpr auto TEXTURE_SHOOT_CHARGED
constexpr auto TEXTURE_SHOOT