This commit is contained in:
Dusk 2026-03-01 19:23:33 +01:00
parent 7cfbfb3a04
commit 12aafa654c
7 changed files with 41 additions and 7 deletions

11
building.tscn Normal file
View File

@ -0,0 +1,11 @@
[gd_scene format=3 uid="uid://da60ofnpg72ua"]
[sub_resource type="BoxShape3D" id="BoxShape3D_rqn35"]
[node name="Building" type="Node3D" unique_id=228050854]
[node name="StaticBody3D" type="StaticBody3D" parent="." unique_id=1235522956]
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticBody3D" unique_id=952235706]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.047901154, 0)
shape = SubResource("BoxShape3D_rqn35")

8
chunk.tscn Normal file
View File

@ -0,0 +1,8 @@
[gd_scene format=3 uid="uid://x0nufa1wdu4j"]
[sub_resource type="PlaneMesh" id="PlaneMesh_vonw3"]
size = Vector2(300, 300)
[node name="MeshInstance3D" type="MeshInstance3D" unique_id=731620195]
transform = Transform3D(1.9467738, 0, 0, 0, 1.9467738, 0, 0, 0, 1.9467738, 0, 0, 0)
mesh = SubResource("PlaneMesh_vonw3")

14
level.gd Normal file
View File

@ -0,0 +1,14 @@
extends Node3D
@export var dimension: int = 10
func _ready() -> void:
var chunks = Array[Array[Array[bool]]]
seed(
)
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass

1
level.gd.uid Normal file
View File

@ -0,0 +1 @@
uid://dj0cgqed5n3ys

View File

@ -1,14 +1,14 @@
[gd_scene format=3 uid="uid://dxap1hj0okhli"]
[ext_resource type="Script" uid="uid://dj0cgqed5n3ys" path="res://level.gd" id="1_0b4ue"]
[ext_resource type="PackedScene" uid="uid://cmb3b7xrlboy3" path="res://player.tscn" id="1_u52ul"]
[ext_resource type="Script" uid="uid://b5ebibi08tjvd" path="res://camera_3d.gd" id="2_vonw3"]
[ext_resource type="PackedScene" uid="uid://x0nufa1wdu4j" path="res://chunk.tscn" id="3_f2txt"]
[sub_resource type="Environment" id="Environment_vonw3"]
ambient_light_source = 2
ambient_light_color = Color(1, 1, 1, 1)
[sub_resource type="PlaneMesh" id="PlaneMesh_vonw3"]
[sub_resource type="BoxMesh" id="BoxMesh_vonw3"]
size = Vector3(10, 15, 10)
@ -16,15 +16,15 @@ size = Vector3(10, 15, 10)
size = Vector3(10, 7.5, 10)
[node name="Level" type="Node3D" unique_id=1248504413]
script = ExtResource("1_0b4ue")
dimension = null
[node name="WorldEnvironment" type="WorldEnvironment" parent="." unique_id=2012504496]
environment = SubResource("Environment_vonw3")
[node name="Player" parent="." unique_id=1536233267 instance=ExtResource("1_u52ul")]
[node name="MeshInstance3D" type="MeshInstance3D" parent="." unique_id=1868750631]
transform = Transform3D(1.9467738, 0, 0, 0, 1.9467738, 0, 0, 0, 1.9467738, 0, 0, 0)
mesh = SubResource("PlaneMesh_vonw3")
[node name="Chunk" parent="." unique_id=731620195 instance=ExtResource("3_f2txt")]
[node name="MeshInstance3D2" type="MeshInstance3D" parent="." unique_id=306152407]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -7.031, 7.5, 0)

View File

@ -8,8 +8,6 @@ const STAMINA_RECOVER = 10
var stamina: float = BASE_STAMINA
func _process(delta: float) -> void:
$StaminaLabel.text = str(int(stamina))

View File

@ -44,6 +44,8 @@ player_move_down={
player_sprint={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194325,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":5,"axis_value":1.0,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":10,"pressure":0.0,"pressed":true,"script":null)
]
}