player controller logic
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
[gd_scene format=3 uid="uid://jven27ktracb"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://c6n3dg530t8oc" path="res://ocean.tscn" id="1_lquwl"]
|
||||
[ext_resource type="PackedScene" uid="uid://cieiwihia8t2w" path="res://player_boat.tscn" id="2_7mycd"]
|
||||
[ext_resource type="PackedScene" uid="uid://cieiwihia8t2w" path="res://boat.tscn" id="2_7mycd"]
|
||||
[ext_resource type="Script" uid="uid://46jiwugeccqg" path="res://scripts/camera_rig.gd" id="4_1bvp3"]
|
||||
[ext_resource type="PackedScene" uid="uid://conoykdb1g38n" path="res://hud.tscn" id="4_272bh"]
|
||||
[ext_resource type="Script" uid="uid://dpohf1tg5e2gs" path="res://scripts/world_manager.gd" id="6_7mycd"]
|
||||
[ext_resource type="Script" uid="uid://bxk0exu40a25x" path="res://scripts/player_controller.gd" id="6_272bh"]
|
||||
|
||||
[sub_resource type="ProceduralSkyMaterial" id="SkyMaterial_1"]
|
||||
sky_horizon_color = Color(0.66, 0.67, 0.68, 1)
|
||||
@@ -48,24 +49,28 @@ surface_material_override/0 = SubResource("Material_seabed")
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Seabed" unique_id=111957760]
|
||||
shape = SubResource("BoxShape_seabed")
|
||||
|
||||
[node name="PlayerBoat" parent="." unique_id=1387061778 instance=ExtResource("2_7mycd")]
|
||||
[node name="Boat" parent="." unique_id=1387061778 instance=ExtResource("2_7mycd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3, 0)
|
||||
|
||||
[node name="CameraRig" type="Node3D" parent="." unique_id=2139913829 node_paths=PackedStringArray("target", "cam") groups=["shift_with_origin"]]
|
||||
[node name="CameraRig" type="Node3D" parent="." unique_id=2139913829 node_paths=PackedStringArray("cam") groups=["shift_with_origin"]]
|
||||
transform = Transform3D(1, 0, 0, 0, 0.9396926, 0.34202012, 0, -0.34202012, 0.9396926, 0, 0, 0)
|
||||
script = ExtResource("4_1bvp3")
|
||||
target = NodePath("../PlayerBoat")
|
||||
cam = NodePath("PlayerCamera")
|
||||
|
||||
[node name="PlayerCamera" type="Camera3D" parent="CameraRig" unique_id=553919400]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 8)
|
||||
|
||||
[node name="Hud" parent="." unique_id=167273188 node_paths=PackedStringArray("boat", "world") instance=ExtResource("4_272bh")]
|
||||
boat = NodePath("../PlayerBoat")
|
||||
[node name="Hud" parent="." unique_id=167273188 node_paths=PackedStringArray("world") instance=ExtResource("4_272bh")]
|
||||
world = NodePath("../WorldManager")
|
||||
|
||||
[node name="WorldManager" type="Node" parent="." unique_id=1879897241 node_paths=PackedStringArray("focus", "ocean")]
|
||||
[node name="WorldManager" type="Node" parent="." unique_id=1879897241 node_paths=PackedStringArray("ocean")]
|
||||
script = ExtResource("6_7mycd")
|
||||
focus = NodePath("../PlayerBoat")
|
||||
ocean = NodePath("../Ocean")
|
||||
shift_threshold = 50.0
|
||||
|
||||
[node name="PlayerController" type="Node" parent="." unique_id=2011077099 node_paths=PackedStringArray("current_controlled", "world_manager", "camera_rig", "hud")]
|
||||
script = ExtResource("6_272bh")
|
||||
current_controlled = NodePath("../Boat")
|
||||
world_manager = NodePath("../WorldManager")
|
||||
camera_rig = NodePath("../CameraRig")
|
||||
hud = NodePath("../Hud")
|
||||
|
||||
Reference in New Issue
Block a user