explosive car; dash no longer stuns or gives extra fire rate

This commit is contained in:
Michael Campbell 2026-03-18 18:18:37 -04:00
parent d0bfe8d1be
commit 5a7c93a573
7 changed files with 309 additions and 7 deletions

View file

@ -3,6 +3,8 @@ extends Area3D
func _on_collision(node: Node3D):
if node.has_method("hit"):
node.hit(self, INF)
if node.has_method("damage"):
node.damage(self)
func _ready() -> void:
body_entered.connect(_on_collision)

View file

@ -10,7 +10,7 @@ enum State {
}
const MOVE_SPEED := 7.5
const DASH_SPEED := 25.
const DASH_SPEED := 35.
const DASH_COST := .5
static var instance: Player
@ -66,8 +66,8 @@ func _process_movement(delta: float) -> void:
dash_direction = input
state = State.DASHING
await get_tree().create_timer(.25, false).timeout
state = State.LOCKED
await get_tree().create_timer(.5, false).timeout
# state = State.LOCKED
# await get_tree().create_timer(.5, false).timeout
state = State.NORMAL
func _process_dash() -> void:
@ -96,9 +96,9 @@ func _process_aim() -> void:
func _process_shoot(delta: float) -> void:
var clock_mul := 1.
match state:
State.DASHING: clock_mul = 2.5
State.LOCKED: clock_mul = 2.5
# match state:
# State.DASHING: clock_mul = 2.5
# State.LOCKED: clock_mul = 2.5
gun.fire_clock -= delta * clock_mul
if Input.is_action_pressed("fire") and gun.fire_clock <= 0.: