A game prototype built with Godot 4 exploring in-world inventory management mechanics.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

149 lines
7.1 KiB

2 years ago
[gd_scene load_steps=13 format=3 uid="uid://bgymmkpfgntea"]
[ext_resource type="Script" path="res://scripts/Player.gd" id="1_kae1r"]
[ext_resource type="Script" path="res://scripts/Camera.gd" id="3_wo4mm"]
[ext_resource type="PackedScene" uid="uid://brbatwk2mtko4" path="res://assets/character.glb" id="4_e6k8n"]
[ext_resource type="Script" path="res://scripts/AnimationController.gd" id="4_y3wch"]
[ext_resource type="Script" path="res://scripts/PickupController.gd" id="5_wmkdb"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_2p66e"]
radius = 0.3
height = 1.5
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_30188"]
animation = &"idle"
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_hov4s"]
animation = &"walk_backward"
[sub_resource type="AnimationNodeTransition" id="AnimationNodeTransition_881to"]
sync = true
xfade_time = 0.1
input_0/name = "forward"
input_0/auto_advance = false
input_0/reset = true
input_1/name = "backward"
input_1/auto_advance = false
input_1/reset = true
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_rer12"]
animation = &"walk_forward"
[sub_resource type="AnimationNodeTransition" id="AnimationNodeTransition_5e4h6"]
xfade_time = 0.25
input_0/name = "idle"
input_0/auto_advance = false
input_0/reset = false
input_1/name = "move"
input_1/auto_advance = false
input_1/reset = true
[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_bgirn"]
nodes/idle/node = SubResource("AnimationNodeAnimation_30188")
nodes/idle/position = Vector2(240, 180)
nodes/output/position = Vector2(640, 280)
nodes/walk_backward/node = SubResource("AnimationNodeAnimation_hov4s")
nodes/walk_backward/position = Vector2(0, 420)
nodes/walk_direction/node = SubResource("AnimationNodeTransition_881to")
nodes/walk_direction/position = Vector2(220, 320)
nodes/walk_forward/node = SubResource("AnimationNodeAnimation_rer12")
nodes/walk_forward/position = Vector2(0, 280)
nodes/walk_state/node = SubResource("AnimationNodeTransition_5e4h6")
nodes/walk_state/position = Vector2(440, 220)
node_connections = [&"output", 0, &"walk_state", &"walk_direction", 0, &"walk_forward", &"walk_direction", 1, &"walk_backward", &"walk_state", 0, &"idle", &"walk_state", 1, &"walk_direction"]
[node name="Player" type="CharacterBody3D" node_paths=PackedStringArray("camera")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.75, 0)
collision_layer = 2
script = ExtResource("1_kae1r")
camera = NodePath("Character/Skeleton/Root/LowerBody/UpperBody/Neck/Head/Camera")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("CapsuleShape3D_2p66e")
[node name="Character" parent="." instance=ExtResource("4_e6k8n")]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, -0.75, 0)
[node name="Root" type="BoneAttachment3D" parent="Character/Skeleton" index="0"]
transform = Transform3D(-1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0.199674, 0)
bone_name = "Root"
bone_idx = 0
use_external_skeleton = true
external_skeleton = NodePath("../Skeleton3D")
[node name="LowerBody" type="BoneAttachment3D" parent="Character/Skeleton/Root"]
transform = Transform3D(-1, -3.0926e-10, 8.74222e-08, 8.71645e-08, 0.0732855, 0.997311, -6.71521e-09, 0.997311, -0.0732856, 0, 0, -0.199593)
bone_name = "LowerBody"
bone_idx = 1
use_external_skeleton = true
external_skeleton = NodePath("../../Skeleton3D")
[node name="UpperBody" type="BoneAttachment3D" parent="Character/Skeleton/Root/LowerBody"]
transform = Transform3D(1, -1.02448e-08, 8.68204e-08, 4.44089e-16, 0.99311, 0.117186, -8.74228e-08, -0.117186, 0.99311, 0, 0.154362, -7.45058e-09)
bone_name = "UpperBody"
bone_idx = 2
use_external_skeleton = true
external_skeleton = NodePath("../../../Skeleton3D")
[node name="Neck" type="BoneAttachment3D" parent="Character/Skeleton/Root/LowerBody/UpperBody"]
transform = Transform3D(1, -1.66533e-16, 0, 0, 0.998891, -0.0470728, -7.10543e-15, 0.0470728, 0.998892, -1.11022e-16, 0.251888, 5.58794e-09)
bone_name = "Neck"
bone_idx = 3
use_external_skeleton = true
external_skeleton = NodePath("../../../../Skeleton3D")
[node name="Head" type="BoneAttachment3D" parent="Character/Skeleton/Root/LowerBody/UpperBody/Neck"]
transform = Transform3D(-1, 1.20146e-10, 8.74227e-08, 8.74228e-08, 0.0013743, 0.999999, -7.10543e-15, 0.999999, -0.00137436, -2.22045e-16, 0.101598, 3.72529e-09)
bone_name = "Head"
bone_idx = 4
use_external_skeleton = true
external_skeleton = NodePath("../../../../../Skeleton3D")
[node name="Camera" type="Camera3D" parent="Character/Skeleton/Root/LowerBody/UpperBody/Neck/Head"]
transform = Transform3D(1, -1.67666e-09, 1.78995e-09, 1.82243e-09, 0.0195853, -0.999808, 1.6413e-09, 0.999808, 0.0195851, 6.66283e-09, 0.0576435, 0.0321114)
cull_mask = 1
script = ExtResource("3_wo4mm")
[node name="Skeleton3D" parent="Character/Skeleton" index="1"]
bones/0/position = Vector3(0, 0.199674, 0)
bones/1/rotation = Quaternion(2.9641e-08, 0.732559, 0.680703, 3.21262e-08)
bones/2/rotation = Quaternion(-0.0586944, 4.3636e-08, 2.56562e-09, 0.998276)
bones/4/rotation = Quaternion(3.09298e-08, 0.707592, 0.706621, 3.08874e-08)
bones/5/rotation = Quaternion(-0.00410346, -0.0231825, 0.984812, -0.172018)
bones/6/rotation = Quaternion(1.52056e-05, 5.1329e-05, -0.0647817, 0.997899)
bones/7/rotation = Quaternion(-1.1035e-05, -5.20782e-05, -0.0156829, 0.999877)
bones/12/rotation = Quaternion(0.00410346, -0.0231825, 0.984812, 0.172018)
bones/13/rotation = Quaternion(1.52056e-05, -5.1329e-05, 0.0647817, 0.997899)
bones/14/rotation = Quaternion(-1.1035e-05, 5.20782e-05, 0.0156829, 0.999877)
bones/19/rotation = Quaternion(0.0101145, -0.706764, 0.707308, 0.00993137)
bones/20/rotation = Quaternion(0.026743, 0.00254827, 0.0016329, 0.999638)
bones/21/rotation = Quaternion(-0.00105386, -0.689614, 0.723924, -0.0191383)
bones/22/rotation = Quaternion(-0.0101145, -0.706764, 0.707308, -0.00993136)
bones/23/rotation = Quaternion(0.026743, -0.00254827, -0.0016329, 0.999638)
bones/24/rotation = Quaternion(0.00105386, -0.689614, 0.723924, 0.0191383)
[node name="AnimationController" type="Node3D" parent="." node_paths=PackedStringArray("camera", "skeleton", "root_bone")]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0)
script = ExtResource("4_y3wch")
camera = NodePath("../Character/Skeleton/Root/LowerBody/UpperBody/Neck/Head/Camera")
skeleton = NodePath("../Character/Skeleton/Skeleton3D")
root_bone = NodePath("../Character/Skeleton/Root")
[node name="AnimationTree" type="AnimationTree" parent="AnimationController"]
tree_root = SubResource("AnimationNodeBlendTree_bgirn")
anim_player = NodePath("../../Character/AnimationPlayer")
active = true
parameters/walk_direction/current_state = "forward"
parameters/walk_direction/transition_request = ""
parameters/walk_direction/current_index = 0
parameters/walk_state/current_state = "idle"
parameters/walk_state/transition_request = ""
parameters/walk_state/current_index = 0
[node name="PickupController" type="Node3D" parent="." node_paths=PackedStringArray("camera")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.324461, -0.291141)
script = ExtResource("5_wmkdb")
camera = NodePath("../Character/Skeleton/Root/LowerBody/UpperBody/Neck/Head/Camera")
[editable path="Character"]