Adding loads of icons and starting refactor of weapons and mods
This commit is contained in:
parent
1a959fbc0c
commit
f97521decc
4411 changed files with 74792 additions and 42 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue