tiger-cleanup #1
|
|
@ -46,7 +46,6 @@ var transfor_arr: Array[Transform2D] = [
|
||||||
@export var highlighted: bool = false:
|
@export var highlighted: bool = false:
|
||||||
set(highlight):
|
set(highlight):
|
||||||
if highlight != highlighted:
|
if highlight != highlighted:
|
||||||
printt(self, highlight)
|
|
||||||
highlighted = highlight
|
highlighted = highlight
|
||||||
|
|
||||||
if is_inside_tree() and is_node_ready():
|
if is_inside_tree() and is_node_ready():
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@ func _apply_enabled_state() -> void:
|
||||||
@export var angular_jitter_speed:Vector3 = Vector3(2, 1, 1)
|
@export var angular_jitter_speed:Vector3 = Vector3(2, 1, 1)
|
||||||
@export var location_jitter:Vector3 = Vector3(0.05, 0.05, 0.05)
|
@export var location_jitter:Vector3 = Vector3(0.05, 0.05, 0.05)
|
||||||
@export var location_jitter_speed:Vector3 = Vector3(2, 0.3, 1)
|
@export var location_jitter_speed:Vector3 = Vector3(2, 0.3, 1)
|
||||||
|
|
||||||
var jitter_strength: float = 0
|
var jitter_strength: float = 0
|
||||||
var jitter_tween: Tween = null
|
var jitter_tween: Tween = null
|
||||||
|
|
||||||
|
|
@ -59,26 +60,26 @@ var current_mouse_rotation: Vector2 = Vector2.ZERO
|
||||||
var noise: Noise = FastNoiseLite.new()
|
var noise: Noise = FastNoiseLite.new()
|
||||||
var crouched:bool = false:
|
var crouched:bool = false:
|
||||||
set(set_crouching):
|
set(set_crouching):
|
||||||
if is_node_ready():
|
if !is_node_ready(): return
|
||||||
if set_crouching and not crouched:
|
if set_crouching and not crouched:
|
||||||
|
if State.reduce_motion:
|
||||||
|
$PlayerAnimationPlayer.play("reduced_crouch")
|
||||||
|
elif trigger_slow_crouch:
|
||||||
|
$PlayerAnimationPlayer.play("crouch")
|
||||||
|
trigger_slow_crouch = false
|
||||||
|
else:
|
||||||
|
$PlayerAnimationPlayer.play("fast_crouch")
|
||||||
|
crouched = set_crouching
|
||||||
|
elif (not set_crouching and crouched) and not crouch_held:
|
||||||
|
if can_stand_up():
|
||||||
if State.reduce_motion:
|
if State.reduce_motion:
|
||||||
$PlayerAnimationPlayer.play("reduced_crouch")
|
$PlayerAnimationPlayer.play("reduced_stand_up")
|
||||||
elif trigger_slow_crouch:
|
elif trigger_slow_crouch:
|
||||||
$PlayerAnimationPlayer.play("crouch")
|
$PlayerAnimationPlayer.play("stand_up")
|
||||||
trigger_slow_crouch = false
|
trigger_slow_crouch = false
|
||||||
else:
|
else:
|
||||||
$PlayerAnimationPlayer.play("fast_crouch")
|
$PlayerAnimationPlayer.play("fast_stand_up")
|
||||||
crouched = set_crouching
|
crouched = set_crouching
|
||||||
elif (not set_crouching and crouched) and not crouch_held:
|
|
||||||
if can_stand_up():
|
|
||||||
if State.reduce_motion:
|
|
||||||
$PlayerAnimationPlayer.play("reduced_stand_up")
|
|
||||||
elif trigger_slow_crouch:
|
|
||||||
$PlayerAnimationPlayer.play("stand_up")
|
|
||||||
trigger_slow_crouch = false
|
|
||||||
else:
|
|
||||||
$PlayerAnimationPlayer.play("fast_stand_up")
|
|
||||||
crouched = set_crouching
|
|
||||||
|
|
||||||
@onready var yaw: Node3D = $Yaw
|
@onready var yaw: Node3D = $Yaw
|
||||||
@onready var pitch: Node3D = $Yaw/Pitch
|
@onready var pitch: Node3D = $Yaw/Pitch
|
||||||
|
|
@ -124,7 +125,7 @@ func _ready():
|
||||||
func _on_player_enable(enable: bool) -> void:
|
func _on_player_enable(enable: bool) -> void:
|
||||||
enabled = enable
|
enabled = enable
|
||||||
|
|
||||||
func _process(_delta):
|
func _process(_delta) -> void:
|
||||||
if not enabled:
|
if not enabled:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue