Compilation Success

This commit is contained in:
CatAClock 2025-06-17 12:38:50 -07:00
parent 438a2c9a92
commit 9085972a22
3 changed files with 4 additions and 4 deletions

View file

@ -71,8 +71,7 @@ namespace godot {
FireRateTimer += delta; FireRateTimer += delta;
if (FireRateTimer >= FireRate) { if (FireRateTimer >= FireRate) {
Bullet* bullet = memnew(Bullet); Bullet* bullet = memnew(Bullet);
bullet->set_position(BulletLocation + get_position()); bullet->set_position(get_position());
bullet->SetTexture(BulletTexture);
bullet->SetDirection(BulletDirection); bullet->SetDirection(BulletDirection);
bullet->add_collision_exception_with(get_node<Enemy>(get_path())); bullet->add_collision_exception_with(get_node<Enemy>(get_path()));
get_parent()->add_child(bullet); get_parent()->add_child(bullet);

View file

@ -20,6 +20,7 @@ namespace godot {
double FireRate = 1; double FireRate = 1;
double FireRateTimer = 0; double FireRateTimer = 0;
Vector2 BulletDirection = Vector2(-1, 0); Vector2 BulletDirection = Vector2(-1, 0);
double DespawnTimer = 0;
protected: protected:
static void _bind_methods(); static void _bind_methods();
@ -38,7 +39,7 @@ namespace godot {
int GetScoreAmount() const; int GetScoreAmount() const;
bool GetIsShooting() const; bool GetIsShooting() const;
double GetFireRate() const; double GetFireRate() const;
double GetBulletDirection() const; Vector2 GetBulletDirection() const;
void SetHealth(const int health); void SetHealth(const int health);
void SetSpeed(const int speed); void SetSpeed(const int speed);
@ -46,7 +47,7 @@ namespace godot {
void SetScoreAmount(const int scoreAmount); void SetScoreAmount(const int scoreAmount);
void SetIsShooting(const bool isShooting); void SetIsShooting(const bool isShooting);
void SetFireRate(const double fireRate); void SetFireRate(const double fireRate);
void SetBulletDirection(const double bulletDirection); void SetBulletDirection(const Vector2 bulletDirection);
}; };
}; };