Initial commit
This commit is contained in:
8
scenes/components/CollisionComponent.tscn
Normal file
8
scenes/components/CollisionComponent.tscn
Normal file
@@ -0,0 +1,8 @@
|
||||
[gd_scene format=3 uid="uid://dwcik0e4ixs0u"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b1683v4e4gh38" path="res://source/Scripts/Components/CollisionComponent.cs" id="1_e6uy1"]
|
||||
|
||||
[node name="CollisionComponent" type="Area3D" unique_id=1105156486 node_paths=PackedStringArray("WhiteList", "BlackList")]
|
||||
script = ExtResource("1_e6uy1")
|
||||
WhiteList = []
|
||||
BlackList = []
|
||||
76
scenes/entities/Player.tscn
Normal file
76
scenes/entities/Player.tscn
Normal file
@@ -0,0 +1,76 @@
|
||||
[gd_scene format=3 uid="uid://f2oncv0p7qxy"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://chuyrnjbwvvf5" path="res://source/Scripts/PlayerController.cs" id="1_o7et6"]
|
||||
[ext_resource type="Script" uid="uid://cyl680l0b3hej" path="res://source/Scripts/CameraController.cs" id="3_24gqh"]
|
||||
[ext_resource type="PackedScene" uid="uid://dwcik0e4ixs0u" path="res://scenes/components/CollisionComponent.tscn" id="3_j1g85"]
|
||||
[ext_resource type="Texture2D" uid="uid://bcojlpp18chv2" path="res://assets/textures/debug/16px.png" id="3_yjynp"]
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_o7et6"]
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_24gqh"]
|
||||
height = 1.0
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_yjynp"]
|
||||
radius = 0.475
|
||||
height = 0.95
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_7jddb"]
|
||||
height = 1.5
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_g13of"]
|
||||
albedo_texture = ExtResource("3_yjynp")
|
||||
uv1_triplanar = true
|
||||
texture_filter = 0
|
||||
|
||||
[sub_resource type="CapsuleMesh" id="CapsuleMesh_yjynp"]
|
||||
material = SubResource("StandardMaterial3D_g13of")
|
||||
|
||||
[node name="Player" type="CharacterBody3D" unique_id=654871017 node_paths=PackedStringArray("StandCollision", "CrouchCollision", "HeadCollisionComponent", "BottomCollisionComponent", "Camera", "StandCameraPosition", "CrouchCameraPosition")]
|
||||
script = ExtResource("1_o7et6")
|
||||
StandCollision = NodePath("StandCollisionShape3D")
|
||||
CrouchCollision = NodePath("CrouchCollisionShape3D")
|
||||
HeadCollisionComponent = NodePath("HeadAreaCollisionComponent")
|
||||
BottomCollisionComponent = NodePath("BottomCollisionComponent")
|
||||
Camera = NodePath("Camera3D")
|
||||
StandCameraPosition = NodePath("StandCameraMarker3D")
|
||||
CrouchCameraPosition = NodePath("CrouchCameraMarker3D")
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="." unique_id=1744916979]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
|
||||
script = ExtResource("3_24gqh")
|
||||
|
||||
[node name="RayCast3D" type="RayCast3D" parent="Camera3D" unique_id=126273469]
|
||||
transform = Transform3D(1, 0, 0, 0, -4.371139e-08, -1, 0, 1, -4.371139e-08, 0, 0, 0)
|
||||
|
||||
[node name="StandCameraMarker3D" type="Marker3D" parent="." unique_id=1201495111]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
|
||||
|
||||
[node name="CrouchCameraMarker3D" type="Marker3D" parent="." unique_id=659387861]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.25, 0)
|
||||
|
||||
[node name="StandCollisionShape3D" type="CollisionShape3D" parent="." unique_id=1333295902]
|
||||
shape = SubResource("CapsuleShape3D_o7et6")
|
||||
|
||||
[node name="CrouchCollisionShape3D" type="CollisionShape3D" parent="." unique_id=899067076]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.5, 0)
|
||||
shape = SubResource("CapsuleShape3D_24gqh")
|
||||
|
||||
[node name="HeadAreaCollisionComponent" parent="." unique_id=1105156486 node_paths=PackedStringArray("BlackList") instance=ExtResource("3_j1g85")]
|
||||
UseBlackList = true
|
||||
BlackList = [NodePath("..")]
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="HeadAreaCollisionComponent" unique_id=1935674248]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.525, 0)
|
||||
shape = SubResource("CapsuleShape3D_yjynp")
|
||||
|
||||
[node name="BottomCollisionComponent" parent="." unique_id=2140658375 node_paths=PackedStringArray("BlackList") instance=ExtResource("3_j1g85")]
|
||||
UseBlackList = true
|
||||
BlackList = [NodePath("..")]
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="BottomCollisionComponent" unique_id=659234250]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.75, 0)
|
||||
shape = SubResource("CapsuleShape3D_7jddb")
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="." unique_id=1046949660]
|
||||
mesh = SubResource("CapsuleMesh_yjynp")
|
||||
109
scenes/levels/Playground.tscn
Normal file
109
scenes/levels/Playground.tscn
Normal file
@@ -0,0 +1,109 @@
|
||||
[gd_scene format=3 uid="uid://d3wq6hfxq4rd6"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bq6kfyf88kofe" path="res://assets/textures/debug/64.png" id="1_pwpi7"]
|
||||
[ext_resource type="PackedScene" uid="uid://f2oncv0p7qxy" path="res://scenes/entities/Player.tscn" id="2_x5x4g"]
|
||||
[ext_resource type="PackedScene" uid="uid://b58fh1sxljslo" path="res://scenes/objects/Cube.tscn" id="3_17ysi"]
|
||||
[ext_resource type="Texture2D" uid="uid://cl65sdce7cjce" path="res://assets/textures/debug/32.png" id="5_qlr2e"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_x5x4g"]
|
||||
size = Vector3(100, 0, 100)
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_pwpi7"]
|
||||
albedo_texture = ExtResource("1_pwpi7")
|
||||
uv1_triplanar = true
|
||||
texture_filter = 0
|
||||
|
||||
[sub_resource type="PlaneMesh" id="PlaneMesh_x5x4g"]
|
||||
size = Vector2(100, 100)
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_3tfcg"]
|
||||
size = Vector3(1, 1, 0.5)
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_1soqn"]
|
||||
albedo_texture = ExtResource("5_qlr2e")
|
||||
uv1_triplanar = true
|
||||
texture_filter = 0
|
||||
|
||||
[sub_resource type="SphereMesh" id="SphereMesh_p6fnf"]
|
||||
radius = 2.0
|
||||
height = 4.0
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_4kj4k"]
|
||||
radius = 2.0
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_17ysi"]
|
||||
radius = 6.0
|
||||
|
||||
[node name="Playground" type="Node3D" unique_id=17957055]
|
||||
|
||||
[node name="StaticBody3D" type="StaticBody3D" parent="." unique_id=1480957267]
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticBody3D" unique_id=1646882894]
|
||||
shape = SubResource("BoxShape3D_x5x4g")
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="StaticBody3D" unique_id=809606401]
|
||||
material_override = SubResource("StandardMaterial3D_pwpi7")
|
||||
mesh = SubResource("PlaneMesh_x5x4g")
|
||||
|
||||
[node name="Player" parent="." unique_id=654871017 instance=ExtResource("2_x5x4g")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
|
||||
|
||||
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="." unique_id=672101208]
|
||||
transform = Transform3D(0.70710677, -0.49999994, 0.49999994, 0, 0.7071067, 0.7071067, -0.70710677, -0.49999994, 0.49999994, 0, 10, 0)
|
||||
light_energy = 2.0
|
||||
shadow_enabled = true
|
||||
|
||||
[node name="Cube" parent="." unique_id=719944821 instance=ExtResource("3_17ysi")]
|
||||
transform = Transform3D(3, 0, 0, 0, 3, 0, 0, 0, 3, -3, 3, 0)
|
||||
|
||||
[node name="Cube2" parent="." unique_id=1962198599 instance=ExtResource("3_17ysi")]
|
||||
transform = Transform3D(2.598076, 1.5, 0, -1.5, 2.598076, 0, 0, 0, 3, 2, 3, 0)
|
||||
|
||||
[node name="Cube3" parent="." unique_id=1118073292 instance=ExtResource("3_17ysi")]
|
||||
transform = Transform3D(10, 0, 0, 0, 10, 0, 0, 0, 1, 0, 5, -6)
|
||||
|
||||
[node name="Area3D" type="Area3D" parent="Cube3" unique_id=1790961879]
|
||||
transform = Transform3D(0.99999994, 0, 0, 0, 0.99999994, 0, 0, 0, 1, 0, 0, 1)
|
||||
gravity_space_override = 3
|
||||
gravity_point_center = Vector3(0, 0, -1)
|
||||
gravity_direction = Vector3(0, 0, -1)
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Cube3/Area3D" unique_id=915921693]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.25)
|
||||
shape = SubResource("BoxShape3D_3tfcg")
|
||||
|
||||
[node name="Cube4" parent="." unique_id=1726519300 instance=ExtResource("3_17ysi")]
|
||||
transform = Transform3D(8.693331, 2.3293712, 0, -2.3293712, 8.693331, 0, 0, 0, 9, 11.696152, -2.2057714, 9)
|
||||
|
||||
[node name="StaticBody3D2" type="StaticBody3D" parent="." unique_id=1146809951]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 8, 0)
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="StaticBody3D2" unique_id=2073891869]
|
||||
material_override = SubResource("StandardMaterial3D_1soqn")
|
||||
mesh = SubResource("SphereMesh_p6fnf")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticBody3D2" unique_id=2114568472]
|
||||
shape = SubResource("SphereShape3D_4kj4k")
|
||||
|
||||
[node name="Area3D" type="Area3D" parent="StaticBody3D2" unique_id=2012831209]
|
||||
gravity_space_override = 3
|
||||
gravity_point = true
|
||||
gravity_point_center = Vector3(0, 0, 0)
|
||||
gravity_direction = Vector3(0, 0, 0)
|
||||
gravity = 4.9
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticBody3D2/Area3D" unique_id=1081208726]
|
||||
shape = SubResource("SphereShape3D_17ysi")
|
||||
|
||||
[node name="Cube5" parent="." unique_id=1676247518 instance=ExtResource("3_17ysi")]
|
||||
transform = Transform3D(-4.3711384e-07, 0, 0.99999994, 0, 9.999999, 0, -10, 0, -4.371139e-08, -5, 5, -1)
|
||||
|
||||
[node name="Area3D" type="Area3D" parent="Cube5" unique_id=1308065252]
|
||||
transform = Transform3D(0.99999994, 0, 0, 0, 0.99999994, 0, 0, 0, 1, 0, 0, 1)
|
||||
gravity_space_override = 3
|
||||
gravity_point_center = Vector3(-1, 0, 0)
|
||||
gravity_direction = Vector3(-1, 0, 0)
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Cube5/Area3D" unique_id=927684454]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.25)
|
||||
shape = SubResource("BoxShape3D_3tfcg")
|
||||
22
scenes/objects/Cube.tscn
Normal file
22
scenes/objects/Cube.tscn
Normal file
@@ -0,0 +1,22 @@
|
||||
[gd_scene format=3 uid="uid://b58fh1sxljslo"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://cl65sdce7cjce" path="res://assets/textures/debug/32.png" id="1_1r700"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_odh56"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_dtkl6"]
|
||||
albedo_texture = ExtResource("1_1r700")
|
||||
uv1_triplanar = true
|
||||
texture_filter = 0
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_5l2nu"]
|
||||
|
||||
[node name="Cube" type="StaticBody3D" unique_id=719944821]
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=98294870]
|
||||
shape = SubResource("BoxShape3D_odh56")
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="." unique_id=259688884]
|
||||
material_override = SubResource("StandardMaterial3D_dtkl6")
|
||||
mesh = SubResource("BoxMesh_5l2nu")
|
||||
22
scenes/ui/DebugScreen.tscn
Normal file
22
scenes/ui/DebugScreen.tscn
Normal file
@@ -0,0 +1,22 @@
|
||||
[gd_scene format=3 uid="uid://dfywog3xvaatq"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bxfhkc44lo88c" path="res://source/Scripts/DebugScreen.cs" id="1_rvq7n"]
|
||||
|
||||
[node name="DebugScreen" type="Control" unique_id=412746030 node_paths=PackedStringArray("Text")]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_rvq7n")
|
||||
Text = NodePath("RichTextLabel")
|
||||
|
||||
[node name="RichTextLabel" type="RichTextLabel" parent="." unique_id=869388311]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
text = " FPS: {FPS}"
|
||||
24
scenes/ui/MainMenu.tscn
Normal file
24
scenes/ui/MainMenu.tscn
Normal file
@@ -0,0 +1,24 @@
|
||||
[gd_scene format=3 uid="uid://c86aaee0t6unc"]
|
||||
|
||||
[sub_resource type="Theme" id="Theme_0rmrm"]
|
||||
|
||||
[node name="MainMenu" type="Control" unique_id=1487626196]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme = SubResource("Theme_0rmrm")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="." unique_id=1745174404]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="Button" type="Button" parent="VBoxContainer" unique_id=1720039221]
|
||||
layout_mode = 2
|
||||
text = "Exit"
|
||||
Reference in New Issue
Block a user