Adding loads of icons and starting refactor of weapons and mods

This commit is contained in:
Dan Baker 2025-05-07 08:57:34 +01:00
parent 1a959fbc0c
commit f97521decc
4411 changed files with 74792 additions and 42 deletions

View file

@ -7,7 +7,7 @@ signal projectile_spawned(projectile)
# Base stats - will be modified by modifiers
var base_stats = {
"damage": 10.0,
"fire_rate": 2.0,
"fire_rate": 3.0,
"projectile_speed": 500.0,
"projectile_size": 1.0,
"projectile_lifetime": 1.0,
@ -44,10 +44,12 @@ func fire(direction: Vector2, target_position: Vector2):
if !can_fire:
return
Log.pr("Firing weapon")
_spawn_projectile(global_position, direction, target_position)
can_fire = false
fire_timer.start(1.0 / stats.get_stat("fire_rate"))
Log.pr("Cooldown", stats.get_stat("fire_rate"))
fire_timer.start(stats.get_stat("fire_rate"))
func _spawn_projectile(spawn_position: Vector2, spawn_direction: Vector2, target_position: Vector2):
# Get projectile quantity and spread from stats
@ -111,4 +113,5 @@ func _on_stats_updated():
pass
func _on_fire_timer_timeout():
Log.pr("Fire timer timeout")
can_fire = true