Initial commit
This commit is contained in:
commit
7d30fa63d1
16 changed files with 447 additions and 0 deletions
127
scenes/player.tscn
Normal file
127
scenes/player.tscn
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
[gd_scene load_steps=9 format=3 uid="uid://dpsr6ug3pkb40"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://3dphlay25fih" path="res://scritps/player/player.gd" id="1_g2els"]
|
||||
[ext_resource type="Script" uid="uid://bjhbdh6xsjgnn" path="res://scritps/player/player_camera.gd" id="3_qhqgy"]
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_u8vuu"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_g2els"]
|
||||
resource_name = "Crouch"
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("CollisionShape3D:shape:height")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [2.0, 1.5]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("CollisionShape3D:position")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0, 1, 0), Vector3(0, 0.75, 0)]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("Camera3D:position")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0, 1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0, 2, 0), Vector3(0, 1.5, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_qhqgy"]
|
||||
resource_name = "Stand"
|
||||
|
||||
[sub_resource type="Animation" id="Animation_dqkch"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("CollisionShape3D:shape:height")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [2.0]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("CollisionShape3D:position")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0, 1, 0)]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("Camera3D:position")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0, 2, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_qlg0r"]
|
||||
_data = {
|
||||
&"Crouch": SubResource("Animation_g2els"),
|
||||
&"RESET": SubResource("Animation_dqkch"),
|
||||
&"Stand": SubResource("Animation_qhqgy")
|
||||
}
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_g2els"]
|
||||
|
||||
[node name="Player" type="CharacterBody3D" node_paths=PackedStringArray("animation_player", "stand_up_area")]
|
||||
collision_layer = 2
|
||||
script = ExtResource("1_g2els")
|
||||
animation_player = NodePath("AnimationPlayer")
|
||||
stand_up_area = NodePath("StandArea")
|
||||
CROUCH_TIME = 0.1
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
|
||||
shape = SubResource("CapsuleShape3D_u8vuu")
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0)
|
||||
cull_mask = 1048573
|
||||
fov = 90.0
|
||||
script = ExtResource("3_qhqgy")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_qlg0r")
|
||||
}
|
||||
|
||||
[node name="StandArea" type="Area3D" parent="."]
|
||||
collision_layer = 0
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="StandArea"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
|
||||
shape = SubResource("CapsuleShape3D_g2els")
|
||||
debug_color = Color(0.9878064, 0, 0.31407458, 0.41960785)
|
||||
debug_fill = false
|
||||
Loading…
Add table
Add a link
Reference in a new issue