player character has move and dodge
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
[gd_scene load_steps=8 format=4 uid="uid://bacgd5lmvaxea"]
|
||||
[gd_scene load_steps=15 format=4 uid="uid://bacgd5lmvaxea"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bcgt64gerg8pv" path="res://Scripts/player.gd" id="1_5wxv7"]
|
||||
[ext_resource type="Material" uid="uid://b4rpp31c0dx2m" path="res://Assets/Materials/BasicMat.tres" id="1_y6xdh"]
|
||||
[ext_resource type="Script" uid="uid://bk6205bvyl0to" path="res://Scripts/player_state_machine.gd" id="2_y5hcb"]
|
||||
[ext_resource type="Script" uid="uid://c2xwiexy5b3b3" path="res://Scripts/player_attack.gd" id="3_knrd4"]
|
||||
[ext_resource type="Script" uid="uid://wnisqyoyai2h" path="res://Scripts/player_on_floor.gd" id="4_hck1p"]
|
||||
[ext_resource type="Script" uid="uid://dhnl0penaqfkx" path="res://Scripts/player_dodge_roll.gd" id="5_hck1p"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_i3sml"]
|
||||
resource_name = "Material"
|
||||
@@ -54,11 +58,66 @@ size = Vector3(1.59, 0.4, 0.375)
|
||||
radius = 0.501894
|
||||
height = 1.30188
|
||||
|
||||
[sub_resource type="Animation" id="Animation_hck1p"]
|
||||
resource_name = "dodge"
|
||||
step = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Body:rotation")
|
||||
tracks/0/interp = 2
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.3),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0, 0, 0), Vector3(0, 0, 6.28319)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_juxdh"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Body:rotation")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0, 0, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_4qbli"]
|
||||
_data = {
|
||||
&"RESET": SubResource("Animation_juxdh"),
|
||||
&"dodge": SubResource("Animation_hck1p")
|
||||
}
|
||||
|
||||
[node name="Player" type="CharacterBody3D"]
|
||||
script = ExtResource("1_5wxv7")
|
||||
|
||||
[node name="OmniLight3D" type="OmniLight3D" parent="."]
|
||||
transform = Transform3D(1, -1.74846e-07, 0, 1.74846e-07, 1, 0, 0, 0, 1, -2.406e-07, 1.87607, 0.0537765)
|
||||
light_energy = 0.1
|
||||
|
||||
[node name="State Machine" type="Node" parent="." node_paths=PackedStringArray("character", "initial_state")]
|
||||
script = ExtResource("2_y5hcb")
|
||||
character = NodePath("..")
|
||||
initial_state = NodePath("On Floor")
|
||||
|
||||
[node name="Attack" type="Node" parent="State Machine"]
|
||||
script = ExtResource("3_knrd4")
|
||||
|
||||
[node name="On Floor" type="Node" parent="State Machine"]
|
||||
script = ExtResource("4_hck1p")
|
||||
|
||||
[node name="Dodge Roll" type="Node" parent="State Machine"]
|
||||
script = ExtResource("5_hck1p")
|
||||
|
||||
[node name="Body" type="MeshInstance3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0.0537765)
|
||||
material_override = ExtResource("1_y6xdh")
|
||||
mesh = SubResource("ArrayMesh_5wxv7")
|
||||
skeleton = NodePath("")
|
||||
@@ -67,10 +126,6 @@ metadata/extras = {
|
||||
"rr_curve_obj": {}
|
||||
}
|
||||
|
||||
[node name="OmniLight3D" type="OmniLight3D" parent="Body"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.37607, 0)
|
||||
light_energy = 0.1
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="Body"]
|
||||
transform = Transform3D(-0.487982, 0, -0.872854, 0, 1, 0, 0.872854, 0, -0.487982, 0.351417, 0.11253, -0.601462)
|
||||
mesh = SubResource("BoxMesh_5wxv7")
|
||||
@@ -79,3 +134,8 @@ skeleton = NodePath("../..")
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
|
||||
shape = SubResource("CapsuleShape3D_y5hcb")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_4qbli")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user