Movement animation
This commit is contained in:
parent
b4a6dadc43
commit
ab7885a3e6
4 changed files with 251 additions and 177 deletions
|
@ -1,7 +1,7 @@
|
|||
[gd_scene load_steps=8 format=3 uid="uid://dwx5tcatj35gu"]
|
||||
[gd_scene load_steps=12 format=3 uid="uid://dwx5tcatj35gu"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dts8lbivkgsmj" path="res://base/scripts/player/player.gd" id="1_1w3ab"]
|
||||
[ext_resource type="Texture2D" uid="uid://dxmu14ucuokfl" path="res://base/assets/sprites/guns/placeholder/holster3.png" id="2_gt0rj"]
|
||||
[ext_resource type="Texture2D" uid="uid://cf7avgppv4kfk" path="res://base/assets/sprites/guns/placeholder/static.png" id="2_gt0rj"]
|
||||
[ext_resource type="PackedScene" uid="uid://bb6ovrbusyxpi" path="res://base/scenes/weapons/weapon_base.tscn" id="2_ma1q3"]
|
||||
[ext_resource type="Script" uid="uid://byhp4pklbjltn" path="res://base/scripts/player/weapon_container.gd" id="3_1w3ab"]
|
||||
[ext_resource type="Script" uid="uid://diu6eno2ag6ga" path="res://base/scripts/player/weapon_slot.gd" id="4_gt0rj"]
|
||||
|
@ -9,6 +9,62 @@
|
|||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_jjqxs"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_8sdfx"]
|
||||
resource_name = "default"
|
||||
length = 1.33334
|
||||
loop_mode = 1
|
||||
step = 0.0166667
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("HUD/Weapon:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.333333, 0.666667, 1, 1.33333),
|
||||
"transitions": PackedFloat32Array(1, 1, 1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0, 0), Vector2(16, 32), Vector2(0, 0), Vector2(32, 32), Vector2(0, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_gt0rj"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("HUD/Weapon:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_juj2l"]
|
||||
resource_name = "static"
|
||||
step = 0.0
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("HUD/Weapon:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0.00466507),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_juj2l"]
|
||||
_data = {
|
||||
&"RESET": SubResource("Animation_gt0rj"),
|
||||
&"default": SubResource("Animation_8sdfx"),
|
||||
&"static": SubResource("Animation_juj2l")
|
||||
}
|
||||
|
||||
[node name="Player" type="CharacterBody3D"]
|
||||
collision_layer = 2
|
||||
collision_mask = 3
|
||||
|
@ -69,3 +125,9 @@ metadata/_custom_type_script = "uid://diu6eno2ag6ga"
|
|||
[node name="Tertiary" type="Node3D" parent="WeaponContainer"]
|
||||
script = ExtResource("4_gt0rj")
|
||||
metadata/_custom_type_script = "uid://diu6eno2ag6ga"
|
||||
|
||||
[node name="MovementPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_juj2l")
|
||||
}
|
||||
blend_times = [&"goto_static", &"static", 0.5]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue