mirror of
https://gitlab.com/open-fpsz/open-fpsz.git
synced 2026-07-16 08:55:33 +00:00
✨ enforce static typing
This commit is contained in:
parent
675974150f
commit
20eb9824cd
36 changed files with 271 additions and 374 deletions
|
|
@ -3,23 +3,23 @@ class_name Vanguard extends Node
|
|||
@export var spine_ik_target_attachment : Node3D
|
||||
|
||||
@onready var animation_tree : AnimationTree = $AnimationTree
|
||||
@onready var spine_ik = $Node/Skeleton3D/SpineIK
|
||||
@onready var spine_ik_target = $SpineIKTarget
|
||||
@onready var spine_ik : SkeletonIK3D = $Node/Skeleton3D/SpineIK
|
||||
@onready var spine_ik_target : Node3D = $SpineIKTarget
|
||||
|
||||
enum GroundState { GROUND_STATE_GROUNDED, GROUND_STATE_MID_AIR, GROUND_STATE_DEAD }
|
||||
|
||||
func _ready():
|
||||
func _ready() -> void:
|
||||
spine_ik.start()
|
||||
|
||||
func _process(_delta):
|
||||
func _process(_delta : float) -> void:
|
||||
spine_ik_target.global_transform = spine_ik_target_attachment.global_transform
|
||||
|
||||
func set_locomotion(locomotion : Vector2, ground_speed_factor : float) -> void:
|
||||
animation_tree.set("parameters/Locomotion/blend_position", locomotion)
|
||||
animation_tree.set("parameters/GroundSpeed/scale", ground_speed_factor)
|
||||
|
||||
func set_ground_state(ground_state : GroundState):
|
||||
var transition_name = "grounded"
|
||||
func set_ground_state(ground_state : GroundState) -> void:
|
||||
var transition_name : String = "grounded"
|
||||
if ground_state == GroundState.GROUND_STATE_MID_AIR:
|
||||
transition_name = "mid_air"
|
||||
if ground_state == GroundState.GROUND_STATE_DEAD:
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
[ext_resource type="PackedScene" uid="uid://4naw661fqmjg" path="res://entities/player/assets/vanguard.glb" id="1_d2ik6"]
|
||||
[ext_resource type="Script" path="res://entities/player/assets/vanguard.gd" id="2_c22xr"]
|
||||
[ext_resource type="PackedScene" uid="uid://clq4uym4arpv3" path="res://weapons/space_gun/assets/SpaceGun.glb" id="2_elp0s"]
|
||||
[ext_resource type="PackedScene" uid="uid://clq4uym4arpv3" path="res://entities/weapons/space_gun/assets/SpaceGun.glb" id="3_1d68x"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_a1qf3"]
|
||||
[sub_resource type="Animation" id="Animation_mhn14"]
|
||||
resource_name = "t_pose"
|
||||
length = 0.0333333
|
||||
tracks/0/type = "position_3d"
|
||||
|
|
@ -379,7 +379,7 @@ tracks/52/interp = 1
|
|||
tracks/52/loop_wrap = true
|
||||
tracks/52/keys = PackedFloat32Array(0, 1, 0.354872, -0.0338185, -0.004324, 0.934293)
|
||||
|
||||
[sub_resource type="Animation" id="Animation_e1ctx"]
|
||||
[sub_resource type="Animation" id="Animation_qqdab"]
|
||||
resource_name = "run_left"
|
||||
length = 0.5
|
||||
loop_mode = 1
|
||||
|
|
@ -755,7 +755,7 @@ tracks/52/interp = 1
|
|||
tracks/52/loop_wrap = true
|
||||
tracks/52/keys = PackedFloat32Array(0, 1, 0.624011, -9.44547e-08, 0.04919, 0.779865)
|
||||
|
||||
[sub_resource type="Animation" id="Animation_rxqgf"]
|
||||
[sub_resource type="Animation" id="Animation_q80px"]
|
||||
resource_name = "jump_up"
|
||||
length = 0.533333
|
||||
tracks/0/type = "position_3d"
|
||||
|
|
@ -1130,7 +1130,7 @@ tracks/52/interp = 1
|
|||
tracks/52/loop_wrap = true
|
||||
tracks/52/keys = PackedFloat32Array(0, 1, 0.624011, -9.44547e-08, 0.04919, 0.779865)
|
||||
|
||||
[sub_resource type="Animation" id="Animation_4kiku"]
|
||||
[sub_resource type="Animation" id="Animation_nq3cu"]
|
||||
resource_name = "idle"
|
||||
length = 2.1
|
||||
loop_mode = 1
|
||||
|
|
@ -1506,7 +1506,7 @@ tracks/52/interp = 1
|
|||
tracks/52/loop_wrap = true
|
||||
tracks/52/keys = PackedFloat32Array(0, 1, 0.624011, -9.44547e-08, 0.04919, 0.779865)
|
||||
|
||||
[sub_resource type="Animation" id="Animation_x1sal"]
|
||||
[sub_resource type="Animation" id="Animation_wavlm"]
|
||||
resource_name = "run_backward"
|
||||
length = 0.5
|
||||
loop_mode = 1
|
||||
|
|
@ -1882,7 +1882,7 @@ tracks/52/interp = 1
|
|||
tracks/52/loop_wrap = true
|
||||
tracks/52/keys = PackedFloat32Array(0, 1, 0.624011, -9.44547e-08, 0.04919, 0.779865)
|
||||
|
||||
[sub_resource type="Animation" id="Animation_te6dm"]
|
||||
[sub_resource type="Animation" id="Animation_px8go"]
|
||||
resource_name = "run_forward"
|
||||
length = 0.5
|
||||
loop_mode = 1
|
||||
|
|
@ -2258,7 +2258,7 @@ tracks/52/interp = 1
|
|||
tracks/52/loop_wrap = true
|
||||
tracks/52/keys = PackedFloat32Array(0, 1, 0.624011, -9.44547e-08, 0.04919, 0.779865)
|
||||
|
||||
[sub_resource type="Animation" id="Animation_i0yri"]
|
||||
[sub_resource type="Animation" id="Animation_3t7lf"]
|
||||
resource_name = "run_right"
|
||||
length = 0.5
|
||||
loop_mode = 1
|
||||
|
|
@ -2634,7 +2634,7 @@ tracks/52/interp = 1
|
|||
tracks/52/loop_wrap = true
|
||||
tracks/52/keys = PackedFloat32Array(0, 1, 0.624011, -9.44547e-08, 0.04919, 0.779865)
|
||||
|
||||
[sub_resource type="Animation" id="Animation_m6nqq"]
|
||||
[sub_resource type="Animation" id="Animation_cwvpf"]
|
||||
resource_name = "death"
|
||||
length = 2.83333
|
||||
tracks/0/type = "position_3d"
|
||||
|
|
@ -3009,7 +3009,7 @@ tracks/52/interp = 1
|
|||
tracks/52/loop_wrap = true
|
||||
tracks/52/keys = PackedFloat32Array(0, 1, 0.624011, -9.44547e-08, 0.04919, 0.779865)
|
||||
|
||||
[sub_resource type="Animation" id="Animation_tgrrp"]
|
||||
[sub_resource type="Animation" id="Animation_iawti"]
|
||||
resource_name = "jump_loop"
|
||||
loop_mode = 1
|
||||
tracks/0/type = "position_3d"
|
||||
|
|
@ -3384,17 +3384,17 @@ tracks/52/interp = 1
|
|||
tracks/52/loop_wrap = true
|
||||
tracks/52/keys = PackedFloat32Array(0, 1, 0.624011, -9.44547e-08, 0.04919, 0.779865)
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_jf6yk"]
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_cfog3"]
|
||||
_data = {
|
||||
"death": SubResource("Animation_m6nqq"),
|
||||
"idle": SubResource("Animation_4kiku"),
|
||||
"jump": SubResource("Animation_tgrrp"),
|
||||
"jump_up": SubResource("Animation_rxqgf"),
|
||||
"run_backward": SubResource("Animation_x1sal"),
|
||||
"run_forward": SubResource("Animation_te6dm"),
|
||||
"run_left": SubResource("Animation_e1ctx"),
|
||||
"run_right": SubResource("Animation_i0yri"),
|
||||
"t_pose": SubResource("Animation_a1qf3")
|
||||
"death": SubResource("Animation_cwvpf"),
|
||||
"idle": SubResource("Animation_nq3cu"),
|
||||
"jump": SubResource("Animation_iawti"),
|
||||
"jump_up": SubResource("Animation_q80px"),
|
||||
"run_backward": SubResource("Animation_wavlm"),
|
||||
"run_forward": SubResource("Animation_px8go"),
|
||||
"run_left": SubResource("Animation_qqdab"),
|
||||
"run_right": SubResource("Animation_3t7lf"),
|
||||
"t_pose": SubResource("Animation_mhn14")
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_lw37l"]
|
||||
|
|
@ -3477,15 +3477,15 @@ node_connections = [&"Death", 0, &"Death 2", &"GroundSpeed", 0, &"Locomotion", &
|
|||
script = ExtResource("2_c22xr")
|
||||
|
||||
[node name="Skeleton3D" parent="Node" index="0"]
|
||||
bones/0/position = Vector3(-0.0110252, 0.984399, 0.0113551)
|
||||
bones/0/rotation = Quaternion(-0.0346631, -0.421473, -0.031884, 0.905617)
|
||||
bones/2/rotation = Quaternion(0.00115413, 0.00432654, 0.00309339, 0.999985)
|
||||
bones/4/rotation = Quaternion(0.0693399, 0.00506471, 0.0139101, 0.997483)
|
||||
bones/6/rotation = Quaternion(0.159577, 0.00861707, 0.0109217, 0.987087)
|
||||
bones/8/rotation = Quaternion(0.687877, -0.396941, 0.388779, 0.467026)
|
||||
bones/10/rotation = Quaternion(0.244437, -0.0824007, -0.28381, 0.923533)
|
||||
bones/12/rotation = Quaternion(0.0818169, 0.211072, -0.754901, 0.615531)
|
||||
bones/14/rotation = Quaternion(0.0191213, 0.0755681, -0.152771, 0.985183)
|
||||
bones/0/position = Vector3(-0.00173, 0.968097, 0.0102844)
|
||||
bones/0/rotation = Quaternion(-0.0376647, -0.435369, -0.0400344, 0.898573)
|
||||
bones/2/rotation = Quaternion(0.00816777, 0.00677155, 0.00042395, 0.999944)
|
||||
bones/4/rotation = Quaternion(0.0731821, 0.00505516, 0.0168974, 0.997163)
|
||||
bones/6/rotation = Quaternion(0.168044, 0.010812, 0.0113512, 0.985655)
|
||||
bones/8/rotation = Quaternion(0.687995, -0.407168, 0.399605, 0.448546)
|
||||
bones/10/rotation = Quaternion(0.232583, -0.0669989, -0.309712, 0.919508)
|
||||
bones/12/rotation = Quaternion(0.0848093, 0.214035, -0.748836, 0.621483)
|
||||
bones/14/rotation = Quaternion(0.0439883, 0.072675, -0.153509, 0.984489)
|
||||
bones/20/rotation = Quaternion(-0.123455, 0.0248346, 0.23344, 0.964183)
|
||||
bones/24/rotation = Quaternion(0.0450683, -0.000817796, 0.0508488, 0.997689)
|
||||
bones/26/rotation = Quaternion(0.100545, -1.16532e-07, 0.00792588, 0.994901)
|
||||
|
|
@ -3499,12 +3499,12 @@ bones/44/rotation = Quaternion(0.633142, 6.48257e-09, 0.04991, 0.772425)
|
|||
bones/50/rotation = Quaternion(0.729888, -4.88266e-08, 0.0575362, 0.681141)
|
||||
bones/52/rotation = Quaternion(0.624011, -9.63141e-08, 0.04919, 0.779865)
|
||||
bones/54/rotation = Quaternion(-1.18924e-16, 2.81961e-21, -4.50738e-10, 1)
|
||||
bones/56/rotation = Quaternion(-0.024556, 0.0446797, -0.0067562, 0.998677)
|
||||
bones/58/rotation = Quaternion(-0.009168, 0.301287, -0.0413145, 0.952594)
|
||||
bones/62/rotation = Quaternion(0.693486, 0.36321, -0.399714, 0.476848)
|
||||
bones/64/rotation = Quaternion(0.33601, -0.304998, 0.117904, 0.883274)
|
||||
bones/66/rotation = Quaternion(0.562383, -0.570974, 0.40924, 0.436162)
|
||||
bones/68/rotation = Quaternion(-0.00653908, -0.261386, 0.0645819, 0.963049)
|
||||
bones/56/rotation = Quaternion(-0.027387, 0.0477242, -0.0102335, 0.998433)
|
||||
bones/58/rotation = Quaternion(-0.0272967, 0.307174, -0.0493656, 0.94998)
|
||||
bones/62/rotation = Quaternion(0.693539, 0.362122, -0.415845, 0.463622)
|
||||
bones/64/rotation = Quaternion(0.324204, -0.30741, 0.122213, 0.886259)
|
||||
bones/66/rotation = Quaternion(0.570764, -0.560023, 0.419045, 0.430121)
|
||||
bones/68/rotation = Quaternion(-0.0159497, -0.258891, 0.0744964, 0.962897)
|
||||
bones/70/rotation = Quaternion(0.155965, 0.0109114, -0.00107202, 0.987702)
|
||||
bones/72/rotation = Quaternion(0.563923, 4.19095e-08, -0.0577906, 0.823803)
|
||||
bones/74/rotation = Quaternion(0.285209, 0.0197164, -0.0936782, 0.953673)
|
||||
|
|
@ -3521,21 +3521,21 @@ bones/100/rotation = Quaternion(-6.44756e-14, -1.4372e-11, -3.12192e-10, 1)
|
|||
bones/102/rotation = Quaternion(0.179829, 0.0890365, -0.000307644, 0.97966)
|
||||
bones/104/rotation = Quaternion(0.388149, 1.28057e-07, -0.0397774, 0.920738)
|
||||
bones/106/rotation = Quaternion(0.372324, -1.37021e-07, -0.0381557, 0.927318)
|
||||
bones/110/rotation = Quaternion(-0.116972, 0.113122, 0.979413, 0.119461)
|
||||
bones/112/rotation = Quaternion(-0.344137, -0.000622203, -0.00428585, 0.93891)
|
||||
bones/114/rotation = Quaternion(0.449077, 0.0417981, -0.0071573, 0.892486)
|
||||
bones/116/rotation = Quaternion(0.424844, 0.0902863, 0.0296051, 0.900266)
|
||||
bones/120/rotation = Quaternion(0.102629, 0.24689, 0.953163, -0.141395)
|
||||
bones/122/rotation = Quaternion(-0.324519, -0.0831649, 0.0282907, 0.941791)
|
||||
bones/124/rotation = Quaternion(0.40683, -0.0639519, -0.00334525, 0.911257)
|
||||
bones/126/rotation = Quaternion(0.33772, -0.0673337, -0.0175452, 0.938671)
|
||||
bones/110/rotation = Quaternion(-0.0838619, 0.187447, 0.974965, 0.0852912)
|
||||
bones/112/rotation = Quaternion(-0.467849, 0.0166342, -0.0112761, 0.88358)
|
||||
bones/114/rotation = Quaternion(0.449729, 0.0515854, 0.00300445, 0.891669)
|
||||
bones/116/rotation = Quaternion(0.372768, 0.0597713, 0.0286748, 0.925553)
|
||||
bones/120/rotation = Quaternion(0.122412, 0.250244, 0.948794, -0.148942)
|
||||
bones/122/rotation = Quaternion(-0.341409, -0.0816528, 0.0267745, 0.935979)
|
||||
bones/124/rotation = Quaternion(0.404856, -0.0684155, -0.00791205, 0.911783)
|
||||
bones/126/rotation = Quaternion(0.379454, -0.0779287, -0.0184118, 0.921739)
|
||||
|
||||
[node name="HandAttachment" type="BoneAttachment3D" parent="Node/Skeleton3D" index="0"]
|
||||
transform = Transform3D(-0.173147, 0.0543575, 0.983395, 0.931783, 0.332502, 0.14568, -0.319062, 0.941535, -0.108221, -0.250617, 1.17554, 0.101266)
|
||||
transform = Transform3D(-0.174592, 0.0530693, 0.98321, 0.930948, 0.334134, 0.147277, -0.320708, 0.94103, -0.107742, -0.243063, 1.16434, 0.0953343)
|
||||
bone_name = "mixamorigRightHand"
|
||||
bone_idx = 14
|
||||
|
||||
[node name="SpaceGun" parent="Node/Skeleton3D/HandAttachment" index="0" instance=ExtResource("2_elp0s")]
|
||||
[node name="SpaceGun" parent="Node/Skeleton3D/HandAttachment" index="0" instance=ExtResource("3_1d68x")]
|
||||
transform = Transform3D(-0.0109711, 0.094734, -0.0300857, -0.00595679, 0.0295874, 0.095337, 0.0992177, 0.0122517, 0.00239707, -0.173344, 0.519761, 0.10355)
|
||||
|
||||
[node name="SpineIK" type="SkeletonIK3D" parent="Node/Skeleton3D" index="3"]
|
||||
|
|
@ -3551,7 +3551,7 @@ playback_default_blend_time = 0.2
|
|||
|
||||
[node name="AnimationTree" type="AnimationTree" parent="." index="2"]
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_jf6yk")
|
||||
"": SubResource("AnimationLibrary_cfog3")
|
||||
}
|
||||
tree_root = SubResource("AnimationNodeBlendTree_1ok7t")
|
||||
anim_player = NodePath("../AnimationPlayer")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue