godot-shooter / commit
Slow down the basic gun and only speed it up by .8
Player.gd | 2 +- Weapons.gd | 1 + World.gd | 2 +- World.tscn | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Player.gd b/Player.gd index be7d7ba..b543522 100644 --- a/Player.gd +++ b/Player.gd @@ -14,7 +14,7 @@ export var shield_active = true var PopupControl = preload("res://Popup.tscn") -var weapon: Weapon = Weapons.create_basic_gun(.1) +var weapon: Weapon = Weapons.create_basic_gun(1) var dead = false var velocity = Vector2.UP * move_speed var can_fire = true diff --git a/Weapons.gd b/Weapons.gd index 8003ae0..8e6a977 100644 --- a/Weapons.gd +++ b/Weapons.gd @@ -1,3 +1,4 @@ +# Note: `tool` is optional but without it there are no error reporting in the editor tool static func create_basic_gun(period_secs: float = 0.5) -> Weapon: diff --git a/World.gd b/World.gd index 9a23233..a44bdc5 100644 --- a/World.gd +++ b/World.gd @@ -30,7 +30,7 @@ func shield_consumed(): func gold_consumed(): $UI/HUD.score += 5 func weapon_consumed(): - $Player.weapon.shot_period_seconds *= 0.5 + $Player.weapon.shot_period_seconds *= 0.8 func create_enemy() -> Enemy: var enemy = Enemy.instance() diff --git a/World.tscn b/World.tscn index 3aea5cf..f897875 100644 --- a/World.tscn +++ b/World.tscn @@ -131,7 +131,7 @@ text = "Restart" [node name="ShootTimer" type="Timer" parent="."] process_mode = 0 -wait_time = 0.1 +wait_time = 0.01 autostart = true [node name="PlayerToTarget" type="Line2D" parent="."]