rename Attack to AttackHitbox for clarity
This commit is contained in:
@@ -5,14 +5,14 @@ var players_in_area = {}
|
||||
|
||||
func enter() -> void:
|
||||
super()
|
||||
if has_node("%Attack"): %Attack.visible = true
|
||||
if has_node("%AttackHitbox"): %AttackHitbox.visible = true
|
||||
if has_node("%AttackTimer"): %AttackTimer.start()
|
||||
if has_node("%AttackCooldown"): %AttackCooldown.start()
|
||||
hit = false
|
||||
|
||||
func exit() -> void:
|
||||
super()
|
||||
if has_node("%Attack"): %Attack.visible = false
|
||||
if has_node("%AttackHitbox"): %AttackHitbox.visible = false
|
||||
|
||||
func process_physics(delta: float) -> State:
|
||||
if not Main.is_server_or_predicting(subject.player_id, subject.client_prediction): return
|
||||
@@ -8,7 +8,7 @@ func process_physics(delta: float) -> State:
|
||||
|
||||
if not subject.is_on_floor(): return %Fall
|
||||
if has_node("%Dead") and subject.dead: return %Dead
|
||||
if has_node("%Lunge") and %Input.primary_interact and (not has_node("%AttackCooldown") or %AttackCooldown.time_left == 0): return %Lunge
|
||||
if has_node("%Attack") and %Input.primary_interact and (not has_node("%AttackCooldown") or %AttackCooldown.time_left == 0): return %Attack
|
||||
if input_direction.length() < 0.05: return
|
||||
if has_node("%Walk") and %Input.walk: return %Walk
|
||||
return %Run
|
||||
|
||||
@@ -8,7 +8,7 @@ func process_physics(delta: float) -> State:
|
||||
|
||||
if not subject.is_on_floor(): return %Fall
|
||||
if has_node("%Dead") and subject.dead: return %Dead
|
||||
if has_node("%Lunge") and %Input.primary_interact and (not has_node("%AttackCooldown") or %AttackCooldown.time_left == 0): return %Lunge
|
||||
if has_node("%Attack") and %Input.primary_interact and (not has_node("%AttackCooldown") or %AttackCooldown.time_left == 0): return %Attack
|
||||
if input_direction.length() < 0.05: return %Idle
|
||||
if has_node("%Walk") and %Input.walk: return %Walk
|
||||
return
|
||||
|
||||
@@ -8,7 +8,7 @@ func process_physics(delta: float) -> State:
|
||||
|
||||
if not subject.is_on_floor(): return %Fall
|
||||
if has_node("%Dead") and subject.dead: return %Dead
|
||||
if has_node("%Lunge") and %Input.primary_interact and (not has_node("%AttackCooldown") or %AttackCooldown.time_left == 0): return %Lunge
|
||||
if has_node("%Attack") and %Input.primary_interact and (not has_node("%AttackCooldown") or %AttackCooldown.time_left == 0): return %Attack
|
||||
if input_direction.length() < 0.05: return %Idle
|
||||
if not %Input.walk: return %Run
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user