cleaned up the code more.

This commit is contained in:
FoxSpellCaster
2025-12-08 21:22:34 -05:00
parent 61ff116e83
commit be3d81eb7a
9 changed files with 74 additions and 96 deletions

View File

@@ -0,0 +1,25 @@
[gd_scene load_steps=4 format=3 uid="uid://player_scene"]
[ext_resource type="Script" path="res://scripts/player.gd" id="1_player"]
[sub_resource type="CapsuleMesh" id="CapsuleMesh_player"]
height = 2.0
radial_segments = 8
rings = 4
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_player"]
height = 2.0
radius = 0.5
[node name="Player" type="CharacterBody3D"]
script = ExtResource("1_player")
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
mesh = SubResource("CapsuleMesh_player")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("CapsuleShape3D_player")
[node name="Camera3D" type="Camera3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 0.866025, 0.5, 0, -0.5, 0.866025, 0, 2, 5)
current = true

View File

@@ -1,26 +0,0 @@
[gd_scene load_steps=5 format=3 uid="uid://dpco4vo8rwkq0"]
[ext_resource type="Script" uid="uid://cyqtabd2e7m8d" path="res://scripts/player_controller.gd" id="1"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_tfo3t"]
albedo_color = Color(0.11764706, 0.4, 0.9607843, 1)
[sub_resource type="CapsuleMesh" id="CapsuleMesh_tfo3t"]
material = SubResource("StandardMaterial3D_tfo3t")
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_tfo3t"]
[node name="playerCharacter" type="Node3D"]
[node name="CharacterBody3D" type="CharacterBody3D" parent="."]
script = ExtResource("1")
[node name="MeshInstance3D" type="MeshInstance3D" parent="CharacterBody3D"]
mesh = SubResource("CapsuleMesh_tfo3t")
skeleton = NodePath("../..")
[node name="CollisionShape3D" type="CollisionShape3D" parent="CharacterBody3D"]
shape = SubResource("CapsuleShape3D_tfo3t")
[node name="Camera3D" type="Camera3D" parent="CharacterBody3D"]
transform = Transform3D(1, 0, 0, 0, 0.9659258, 0.25881904, 0, -0.25881904, 0.9659258, 0, 1.3567054, 2)

View File

@@ -1,11 +1,11 @@
[gd_scene load_steps=13 format=3 uid="uid://dg1b5q643boy5"]
[gd_scene load_steps=13 format=3 uid="uid://c3r8fger66hy0"]
[ext_resource type="PackedScene" uid="uid://dpco4vo8rwkq0" path="res://scenes/characters/player_character.tscn" id="1_aiegb"]
[ext_resource type="PackedScene" uid="uid://d01yomyxft4qt" path="res://scenes/ui/ui.tscn" id="1_ju58f"]
[ext_resource type="Material" uid="uid://dkulsdbn03prr" path="res://materials/grass.tres" id="2_bd7ek"]
[ext_resource type="PackedScene" uid="uid://dsgxat46qwqbn" path="res://scenes/props/table.tscn" id="2_oqbmf"]
[ext_resource type="PackedScene" uid="uid://b5ah32wouh61i" path="res://scenes/props/chest.tscn" id="3_arrdh"]
[ext_resource type="PackedScene" uid="uid://cn81uqcg16q4b" path="res://scenes/levels/sky_princess.tscn" id="5_sqxie"]
[ext_resource type="PackedScene" uid="uid://d01yomyxft4qt" path="res://scenes/ui/ui.tscn" id="1_geiq8"]
[ext_resource type="Material" uid="uid://dkulsdbn03prr" path="res://materials/grass.tres" id="2_tkkka"]
[ext_resource type="PackedScene" uid="uid://dsgxat46qwqbn" path="res://scenes/props/table.tscn" id="3_8lk3y"]
[ext_resource type="PackedScene" uid="uid://b5ah32wouh61i" path="res://scenes/props/chest.tscn" id="4_h35hl"]
[ext_resource type="PackedScene" uid="uid://cn81uqcg16q4b" path="res://scenes/props/sky_princess.tscn" id="5_kwk8y"]
[ext_resource type="PackedScene" path="res://scenes/characters/player.tscn" id="6_player"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_oqbmf"]
sky_horizon_color = Color(0.66224277, 0.6717428, 0.6867428, 1)
@@ -35,7 +35,7 @@ points = PackedVector3Array(-0.5, -0.5, 0, -0.49765074, -0.5, -0.049040705, -0.4
[node name="testRoom" type="Node3D"]
[node name="ui" parent="." instance=ExtResource("1_ju58f")]
[node name="ui" parent="." instance=ExtResource("1_geiq8")]
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_ju58f")
@@ -47,21 +47,18 @@ shadow_enabled = true
[node name="ground" type="CSGBox3D" parent="."]
use_collision = true
size = Vector3(48, 0.1, 48)
material = ExtResource("2_bd7ek")
material = ExtResource("2_tkkka")
[node name="CSGBox3D" type="CSGBox3D" parent="ground"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10, 0.5499997, -13)
size = Vector3(3, 1, 5)
material = ExtResource("2_bd7ek")
material = ExtResource("2_tkkka")
[node name="CSGBox3D2" type="CSGBox3D" parent="ground"]
transform = Transform3D(1, 0, 0, 0, -0.8660254, 0.49999988, 0, -0.49999988, -0.8660254, -10, 0.98301244, -11.122906)
operation = 2
size = Vector3(3, 1, 2)
material = ExtResource("2_bd7ek")
[node name="playerCharacter" parent="." instance=ExtResource("1_aiegb")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.3605117, 1.05, 1.5436046)
material = ExtResource("2_tkkka")
[node name="redCharacter" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.29388237, 1.05, -2.020051)
@@ -78,11 +75,14 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.227469, 0)
billboard = 1
text = "Red NPC"
[node name="table" parent="." instance=ExtResource("2_oqbmf")]
[node name="table" parent="." instance=ExtResource("3_8lk3y")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.38244724, 0.5513308, -0.3205235)
[node name="chest" parent="." instance=ExtResource("3_arrdh")]
[node name="chest" parent="." instance=ExtResource("4_h35hl")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5, 0.54999995, -11)
[node name="skyPrincess" parent="." instance=ExtResource("5_sqxie")]
[node name="skyPrincess" parent="." instance=ExtResource("5_kwk8y")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10, 115, -220)
[node name="Player" parent="." instance=ExtResource("6_player")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 4)