added basic npc characters

This commit is contained in:
LaptopmanMann 2025-09-16 18:28:52 +02:00
parent d242cf282c
commit bffa08732d
21 changed files with 648 additions and 353 deletions

View file

@ -0,0 +1,61 @@
[gd_scene load_steps=9 format=3 uid="uid://bk4djtjemu7we"]
[ext_resource type="Texture2D" uid="uid://1u35yxritwpa" path="res://Amanda/Sprite assets/guitar.png" id="1_4xjch"]
[ext_resource type="PackedScene" uid="uid://c8gnb0kut2n5h" path="res://Florian/PointsLogic/point_thing.tscn" id="2_vwxl4"]
[sub_resource type="AtlasTexture" id="AtlasTexture_trtgo"]
atlas = ExtResource("1_4xjch")
region = Rect2(0, 0, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_5qfcr"]
atlas = ExtResource("1_4xjch")
region = Rect2(0, 50, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_bt1ua"]
atlas = ExtResource("1_4xjch")
region = Rect2(0, 100, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_muy2q"]
atlas = ExtResource("1_4xjch")
region = Rect2(50, 0, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_1vt4p"]
atlas = ExtResource("1_4xjch")
region = Rect2(50, 50, 50, 50)
[sub_resource type="SpriteFrames" id="SpriteFrames_uyt8c"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_trtgo")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_5qfcr")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_bt1ua")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_muy2q")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_1vt4p")
}],
"loop": true,
"name": &"default",
"speed": 2.0
}]
[node name="guitar" type="AnimatedSprite3D"]
pixel_size = 0.05
billboard = 2
shaded = true
alpha_cut = 2
texture_filter = 0
sprite_frames = SubResource("SpriteFrames_uyt8c")
autoplay = "default"
frame_progress = 0.663731
[node name="PointThing" parent="." instance=ExtResource("2_vwxl4")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.7, 0)
points_name = "Guitar"

View file

@ -0,0 +1,10 @@
[gd_scene load_steps=3 format=3 uid="uid://cl8f27acwi1ge"]
[ext_resource type="Script" uid="uid://bgolfgrq66diw" path="res://npc_path_follower.gd" id="1_wwc8n"]
[ext_resource type="PackedScene" uid="uid://bk4djtjemu7we" path="res://Florian/Entity/People/guitar.tscn" id="2_58cfc"]
[node name="SaxophonePath" type="PathFollow3D"]
script = ExtResource("1_wwc8n")
metadata/_custom_type_script = "uid://bgolfgrq66diw"
[node name="guitar" parent="." instance=ExtResource("2_58cfc")]

View file

@ -0,0 +1,61 @@
[gd_scene load_steps=9 format=3 uid="uid://cygl2cn7nvit1"]
[ext_resource type="Texture2D" uid="uid://bqmxw2uaknw3g" path="res://Amanda/Sprite assets/dancing_guy.png" id="1_uin2d"]
[ext_resource type="PackedScene" uid="uid://c8gnb0kut2n5h" path="res://Florian/PointsLogic/point_thing.tscn" id="2_0mw85"]
[sub_resource type="AtlasTexture" id="AtlasTexture_dp7jc"]
atlas = ExtResource("1_uin2d")
region = Rect2(0, 0, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_m36jp"]
atlas = ExtResource("1_uin2d")
region = Rect2(0, 50, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_uj3ey"]
atlas = ExtResource("1_uin2d")
region = Rect2(50, 0, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_v5kgn"]
atlas = ExtResource("1_uin2d")
region = Rect2(50, 50, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_20vrk"]
atlas = ExtResource("1_uin2d")
region = Rect2(0, 100, 50, 50)
[sub_resource type="SpriteFrames" id="SpriteFrames_5owg6"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_dp7jc")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_m36jp")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_uj3ey")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_v5kgn")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_20vrk")
}],
"loop": true,
"name": &"default",
"speed": 5.0
}]
[node name="dancing_guy" type="AnimatedSprite3D"]
pixel_size = 0.05
billboard = 2
shaded = true
alpha_cut = 2
texture_filter = 0
sprite_frames = SubResource("SpriteFrames_5owg6")
autoplay = "default"
frame_progress = 0.890734
[node name="PointThing" parent="." instance=ExtResource("2_0mw85")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
points_name = "Guy Dancing"

View file

@ -0,0 +1,10 @@
[gd_scene load_steps=3 format=3 uid="uid://bgwskqsawfyxh"]
[ext_resource type="Script" uid="uid://bgolfgrq66diw" path="res://npc_path_follower.gd" id="1_rfl0n"]
[ext_resource type="PackedScene" uid="uid://cygl2cn7nvit1" path="res://Florian/Entity/People/guy_dancing.tscn" id="2_rfryd"]
[node name="SaxophonePath" type="PathFollow3D"]
script = ExtResource("1_rfl0n")
metadata/_custom_type_script = "uid://bgolfgrq66diw"
[node name="dancing_guy" parent="." instance=ExtResource("2_rfryd")]

View file

@ -0,0 +1,61 @@
[gd_scene load_steps=9 format=3 uid="uid://dxkw8rhvyjfjg"]
[ext_resource type="Texture2D" uid="uid://dkt1ynydnm1k5" path="res://Amanda/Sprite assets/guy_drink-2.png" id="1_ykbw8"]
[ext_resource type="PackedScene" uid="uid://c8gnb0kut2n5h" path="res://Florian/PointsLogic/point_thing.tscn" id="2_xudnx"]
[sub_resource type="AtlasTexture" id="AtlasTexture_63ekj"]
atlas = ExtResource("1_ykbw8")
region = Rect2(0, 0, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_1wlxe"]
atlas = ExtResource("1_ykbw8")
region = Rect2(0, 50, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_yp4i5"]
atlas = ExtResource("1_ykbw8")
region = Rect2(50, 0, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_rsn4b"]
atlas = ExtResource("1_ykbw8")
region = Rect2(50, 50, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_sq3k7"]
atlas = ExtResource("1_ykbw8")
region = Rect2(0, 100, 50, 50)
[sub_resource type="SpriteFrames" id="SpriteFrames_vjsfa"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_63ekj")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_1wlxe")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_yp4i5")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_rsn4b")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_sq3k7")
}],
"loop": true,
"name": &"default",
"speed": 3.0
}]
[node name="guy_drinking" type="AnimatedSprite3D"]
pixel_size = 0.05
billboard = 2
shaded = true
alpha_cut = 2
texture_filter = 0
sprite_frames = SubResource("SpriteFrames_vjsfa")
autoplay = "default"
frame_progress = 0.372896
[node name="PointThing" parent="." instance=ExtResource("2_xudnx")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.7, 0)
points_name = "Drinking Guy"

View file

@ -0,0 +1,10 @@
[gd_scene load_steps=3 format=3 uid="uid://bq6mhx8njasyl"]
[ext_resource type="Script" uid="uid://bgolfgrq66diw" path="res://npc_path_follower.gd" id="1_v0vnu"]
[ext_resource type="PackedScene" uid="uid://dxkw8rhvyjfjg" path="res://Florian/Entity/People/guy_drinking.tscn" id="2_a42mo"]
[node name="SaxophonePath" type="PathFollow3D"]
script = ExtResource("1_v0vnu")
metadata/_custom_type_script = "uid://bgolfgrq66diw"
[node name="guy_drinking" parent="." instance=ExtResource("2_a42mo")]

View file

@ -0,0 +1,74 @@
[gd_scene load_steps=11 format=3 uid="uid://bybsn53hd1mge"]
[ext_resource type="Texture2D" uid="uid://bi8fi3cxlh3nv" path="res://Amanda/Sprite assets/guys-2.png" id="1_e8hqk"]
[ext_resource type="PackedScene" uid="uid://c8gnb0kut2n5h" path="res://Florian/PointsLogic/point_thing.tscn" id="2_fmp4l"]
[sub_resource type="AtlasTexture" id="AtlasTexture_3yb5k"]
atlas = ExtResource("1_e8hqk")
region = Rect2(0, 0, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_8pcgq"]
atlas = ExtResource("1_e8hqk")
region = Rect2(0, 50, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_pjxy8"]
atlas = ExtResource("1_e8hqk")
region = Rect2(50, 0, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_gpbu6"]
atlas = ExtResource("1_e8hqk")
region = Rect2(50, 50, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_olerd"]
atlas = ExtResource("1_e8hqk")
region = Rect2(0, 100, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_kqqsa"]
atlas = ExtResource("1_e8hqk")
region = Rect2(50, 100, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_p0esq"]
atlas = ExtResource("1_e8hqk")
region = Rect2(100, 0, 50, 50)
[sub_resource type="SpriteFrames" id="SpriteFrames_f3af0"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_3yb5k")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_8pcgq")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_pjxy8")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_gpbu6")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_olerd")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_kqqsa")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_p0esq")
}],
"loop": true,
"name": &"default",
"speed": 3.0
}]
[node name="guys" type="AnimatedSprite3D"]
pixel_size = 0.05
billboard = 2
shaded = true
alpha_cut = 2
texture_filter = 0
sprite_frames = SubResource("SpriteFrames_f3af0")
autoplay = "default"
frame_progress = 0.448355
[node name="PointThing" parent="." instance=ExtResource("2_fmp4l")]
points_name = "Guys"

View file

@ -0,0 +1,10 @@
[gd_scene load_steps=3 format=3 uid="uid://cg2j3hafqvnup"]
[ext_resource type="Script" uid="uid://bgolfgrq66diw" path="res://npc_path_follower.gd" id="1_65dap"]
[ext_resource type="PackedScene" uid="uid://bybsn53hd1mge" path="res://Florian/Entity/People/guys.tscn" id="2_0ay0d"]
[node name="SaxophonePath" type="PathFollow3D"]
script = ExtResource("1_65dap")
metadata/_custom_type_script = "uid://bgolfgrq66diw"
[node name="guys" parent="." instance=ExtResource("2_0ay0d")]

View file

@ -0,0 +1,61 @@
[gd_scene load_steps=9 format=3 uid="uid://c5552lenumx2j"]
[ext_resource type="Texture2D" uid="uid://biqmx6ki5lbi" path="res://Amanda/Sprite assets/sax.png" id="1_von0k"]
[ext_resource type="PackedScene" uid="uid://c8gnb0kut2n5h" path="res://Florian/PointsLogic/point_thing.tscn" id="2_1sypp"]
[sub_resource type="AtlasTexture" id="AtlasTexture_fe45m"]
atlas = ExtResource("1_von0k")
region = Rect2(0, 0, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_ggwrn"]
atlas = ExtResource("1_von0k")
region = Rect2(0, 50, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_c6eh6"]
atlas = ExtResource("1_von0k")
region = Rect2(0, 100, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_seofy"]
atlas = ExtResource("1_von0k")
region = Rect2(50, 0, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_eki2l"]
atlas = ExtResource("1_von0k")
region = Rect2(50, 50, 50, 50)
[sub_resource type="SpriteFrames" id="SpriteFrames_65unk"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_fe45m")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ggwrn")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_c6eh6")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_seofy")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_eki2l")
}],
"loop": true,
"name": &"default",
"speed": 3.0
}]
[node name="saxophone" type="AnimatedSprite3D"]
pixel_size = 0.05
billboard = 2
shaded = true
alpha_cut = 2
texture_filter = 0
sprite_frames = SubResource("SpriteFrames_65unk")
autoplay = "default"
frame_progress = 0.107993
[node name="PointThing" parent="." instance=ExtResource("2_1sypp")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.9, 0)
points_name = "Saxophone"

View file

@ -0,0 +1,10 @@
[gd_scene load_steps=3 format=3 uid="uid://dm25708r8hc73"]
[ext_resource type="Script" uid="uid://bgolfgrq66diw" path="res://npc_path_follower.gd" id="1_gtl5y"]
[ext_resource type="PackedScene" uid="uid://c5552lenumx2j" path="res://Florian/Entity/People/saxophone.tscn" id="2_3upt0"]
[node name="SaxophonePath" type="PathFollow3D"]
script = ExtResource("1_gtl5y")
metadata/_custom_type_script = "uid://bgolfgrq66diw"
[node name="saxophone" parent="." instance=ExtResource("2_3upt0")]

View file

@ -0,0 +1,60 @@
[gd_scene load_steps=9 format=3 uid="uid://dj13enetumsfm"]
[ext_resource type="PackedScene" uid="uid://c8gnb0kut2n5h" path="res://Florian/PointsLogic/point_thing.tscn" id="2_18dwx"]
[ext_resource type="Texture2D" uid="uid://bc71brj7ar46v" path="res://Amanda/Sprite assets/waitress-2.png" id="2_qeli6"]
[sub_resource type="AtlasTexture" id="AtlasTexture_qjt60"]
atlas = ExtResource("2_qeli6")
region = Rect2(0, 0, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_r7ni7"]
atlas = ExtResource("2_qeli6")
region = Rect2(0, 50, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_6xuuy"]
atlas = ExtResource("2_qeli6")
region = Rect2(50, 0, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_kppxy"]
atlas = ExtResource("2_qeli6")
region = Rect2(50, 50, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_hp1gf"]
atlas = ExtResource("2_qeli6")
region = Rect2(0, 100, 50, 50)
[sub_resource type="SpriteFrames" id="SpriteFrames_jd5bi"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_qjt60")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_r7ni7")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_6xuuy")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_kppxy")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_hp1gf")
}],
"loop": true,
"name": &"default",
"speed": 3.0
}]
[node name="waitress" type="AnimatedSprite3D"]
pixel_size = 0.05
billboard = 2
shaded = true
alpha_cut = 2
texture_filter = 0
sprite_frames = SubResource("SpriteFrames_jd5bi")
frame_progress = 0.97673
[node name="PointThing" parent="." instance=ExtResource("2_18dwx")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.7, 0)
points_name = "Waitress"

View file

@ -0,0 +1,10 @@
[gd_scene load_steps=3 format=3 uid="uid://lrf6ltd1wwg1"]
[ext_resource type="Script" uid="uid://bgolfgrq66diw" path="res://npc_path_follower.gd" id="1_fc1lq"]
[ext_resource type="PackedScene" uid="uid://dj13enetumsfm" path="res://Florian/Entity/People/waitress.tscn" id="2_qxq5o"]
[node name="WaitressPath" type="PathFollow3D"]
script = ExtResource("1_fc1lq")
metadata/_custom_type_script = "uid://bgolfgrq66diw"
[node name="waitress" parent="." instance=ExtResource("2_qxq5o")]

View file

@ -0,0 +1,32 @@
[gd_scene load_steps=7 format=3 uid="uid://by5cq6m32hbor"]
[ext_resource type="Texture2D" uid="uid://dv401srtwuvtg" path="res://icon.svg" id="1_6v0xc"]
[ext_resource type="PackedScene" uid="uid://crrco762ow56c" path="res://Florian/Player/PlayerRigidbody.tscn" id="2_82wr0"]
[ext_resource type="PackedScene" uid="uid://dvrnfjtmupucv" path="res://Florian/Props/table.tscn" id="3_tw6g5"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_eral8"]
albedo_texture = ExtResource("1_6v0xc")
uv1_scale = Vector3(50, 50, 50)
[sub_resource type="PlaneMesh" id="PlaneMesh_82wr0"]
material = SubResource("StandardMaterial3D_eral8")
size = Vector2(500, 500)
[sub_resource type="WorldBoundaryShape3D" id="WorldBoundaryShape3D_tw6g5"]
[node name="Oktoberfest" type="Node3D"]
[node name="Floor" type="MeshInstance3D" parent="."]
mesh = SubResource("PlaneMesh_82wr0")
[node name="StaticBody3D" type="StaticBody3D" parent="Floor"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Floor/StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.378755, 0)
shape = SubResource("WorldBoundaryShape3D_tw6g5")
[node name="PlayerRigidbody" parent="." instance=ExtResource("2_82wr0")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 2)
[node name="Table2" parent="." instance=ExtResource("3_tw6g5")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4, 1, 1)

View file

@ -27,6 +27,7 @@ func _calculate_picture_objects():
for takeable in PictureTakeablesArray.picture_takables:
print("Checking takeable")
if takeable.picture_taken():
points_string += "{name} {points}\n".format({"name" : takeable.points_name, "points": str(takeable.points_worth)})
total_points += takeable.points_worth
total_points_multipliers *= takeable.points_multiplier

View file

@ -9,6 +9,7 @@
script = ExtResource("1_hr556")
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
visible = false
mesh = SubResource("BoxMesh_hr556")
[node name="VisibleOnScreenNotifier3D" type="VisibleOnScreenNotifier3D" parent="."]
@ -17,4 +18,5 @@ mesh = SubResource("BoxMesh_hr556")
transform = Transform3D(0.16, 0, 0, 0, 0.16, 0, 0, 0, 0.16, 0, 0, 0)
visible = false
billboard = 2
no_depth_test = true
texture = ExtResource("2_wfrpx")

19
Florian/Props/table.tscn Normal file
View file

@ -0,0 +1,19 @@
[gd_scene load_steps=2 format=3 uid="uid://dvrnfjtmupucv"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_j3yox"]
albedo_color = Color(0.407398, 0.278036, 0.0877533, 1)
[node name="Table" type="Node3D"]
[node name="CSGCombiner3D" type="CSGCombiner3D" parent="."]
use_collision = true
[node name="CSGBox3D" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.3, 0)
size = Vector3(2.5, 1.1, 1)
material = SubResource("StandardMaterial3D_j3yox")
[node name="CSGBox3D2" type="CSGBox3D" parent="CSGCombiner3D/CSGBox3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -8.9407e-08, -0.1, -0.05)
operation = 2
size = Vector3(2.3, 1, 1.1)

View file

@ -1,21 +1,23 @@
[gd_scene load_steps=55 format=3 uid="uid://d1rip77vefx3i"]
[gd_scene load_steps=21 format=3 uid="uid://d1rip77vefx3i"]
[ext_resource type="Texture2D" uid="uid://b3y733ngio1nx" path="res://Florian/Sprites/cat.jpg" id="1_a202f"]
[ext_resource type="Script" uid="uid://bc47hy67mfo7v" path="res://Florian/sprite_3d.gd" id="2_a0tk4"]
[ext_resource type="PackedScene" uid="uid://crrco762ow56c" path="res://Florian/PlayerRigidbody.tscn" id="2_noarx"]
[ext_resource type="PackedScene" uid="uid://c8gnb0kut2n5h" path="res://Florian/point_thing.tscn" id="4_ylvgl"]
[ext_resource type="Texture2D" uid="uid://biqmx6ki5lbi" path="res://Amanda/Sprite assets/sax.png" id="5_xskkc"]
[ext_resource type="Texture2D" uid="uid://1u35yxritwpa" path="res://Amanda/Sprite assets/guitar.png" id="6_onea6"]
[ext_resource type="Texture2D" uid="uid://bqmxw2uaknw3g" path="res://Amanda/Sprite assets/dancing_guy.png" id="7_n7ovt"]
[ext_resource type="Texture2D" uid="uid://bi8fi3cxlh3nv" path="res://Amanda/Sprite assets/guys-2.png" id="8_jfgxm"]
[ext_resource type="Texture2D" uid="uid://dkt1ynydnm1k5" path="res://Amanda/Sprite assets/guy_drink-2.png" id="9_pqth1"]
[ext_resource type="Texture2D" uid="uid://bc71brj7ar46v" path="res://Amanda/Sprite assets/waitress-2.png" id="10_v1cbn"]
[ext_resource type="Texture2D" uid="uid://dv401srtwuvtg" path="res://icon.svg" id="1_xskkc"]
[ext_resource type="PackedScene" uid="uid://crrco762ow56c" path="res://Florian/Player/PlayerRigidbody.tscn" id="2_noarx"]
[ext_resource type="PackedScene" uid="uid://c5552lenumx2j" path="res://Florian/Entity/People/saxophone.tscn" id="5_n7ovt"]
[ext_resource type="PackedScene" uid="uid://lrf6ltd1wwg1" path="res://Florian/Entity/People/waitress_path.tscn" id="5_onea6"]
[ext_resource type="PackedScene" uid="uid://bk4djtjemu7we" path="res://Florian/Entity/People/guitar.tscn" id="6_jfgxm"]
[ext_resource type="PackedScene" uid="uid://cygl2cn7nvit1" path="res://Florian/Entity/People/guy_dancing.tscn" id="7_pqth1"]
[ext_resource type="PackedScene" uid="uid://bybsn53hd1mge" path="res://Florian/Entity/People/guys.tscn" id="8_onea6"]
[ext_resource type="PackedScene" uid="uid://dxkw8rhvyjfjg" path="res://Florian/Entity/People/guy_drinking.tscn" id="9_v1cbn"]
[ext_resource type="PackedScene" uid="uid://dj13enetumsfm" path="res://Florian/Entity/People/waitress.tscn" id="10_fe45m"]
[ext_resource type="PackedScene" uid="uid://dvrnfjtmupucv" path="res://Florian/Props/table.tscn" id="11_n7ovt"]
[ext_resource type="Script" uid="uid://i4eiinlrt76e" path="res://Florian/sky_rotation.gd" id="11_onea6"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_eral8"]
albedo_color = Color(0.243542, 0.196121, 0.0639371, 1)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_onea6"]
albedo_texture = ExtResource("1_xskkc")
uv1_scale = Vector3(50, 50, 50)
[sub_resource type="PlaneMesh" id="PlaneMesh_4xowi"]
material = SubResource("StandardMaterial3D_eral8")
material = SubResource("StandardMaterial3D_onea6")
size = Vector2(500, 500)
[sub_resource type="WorldBoundaryShape3D" id="WorldBoundaryShape3D_a202f"]
@ -26,305 +28,36 @@ friction = 0.0
[sub_resource type="Curve3D" id="Curve3D_ylvgl"]
closed = true
_data = {
"points": PackedVector3Array(0, 0, 0, 0, 0, 0, 0, 0, -45, 0, 0, 0, 0, 0, 0, 32.3104, 0.419155, -45.9028, 0, 0, 0, 0, 0, 0, 30.015, 0, 1.125, 0, 0, 0, 0, 0, 0, -3.95776, 3.97149, -6.58477),
"points": PackedVector3Array(0, 0, 0, 0, 0, 0, 2, 0, -28, 0, 0, 0, 0, 0, 0, 19.3104, 0.419155, -28.9028, 0, 0, 0, 0, 0, 0, 20.015, 0, -7.875, 0, 0, 0, 0, 0, 0, 4.04224, 1.37149, -6.58477),
"tilts": PackedFloat32Array(0, 0, 0, 0)
}
point_count = 4
[sub_resource type="NavigationMesh" id="NavigationMesh_ylvgl"]
[sub_resource type="AtlasTexture" id="AtlasTexture_fe45m"]
atlas = ExtResource("5_xskkc")
region = Rect2(0, 0, 50, 50)
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_onea6"]
[sub_resource type="AtlasTexture" id="AtlasTexture_ggwrn"]
atlas = ExtResource("5_xskkc")
region = Rect2(0, 50, 50, 50)
[sub_resource type="Sky" id="Sky_onea6"]
sky_material = SubResource("ProceduralSkyMaterial_onea6")
[sub_resource type="AtlasTexture" id="AtlasTexture_c6eh6"]
atlas = ExtResource("5_xskkc")
region = Rect2(0, 100, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_seofy"]
atlas = ExtResource("5_xskkc")
region = Rect2(50, 0, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_eki2l"]
atlas = ExtResource("5_xskkc")
region = Rect2(50, 50, 50, 50)
[sub_resource type="SpriteFrames" id="SpriteFrames_65unk"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_fe45m")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ggwrn")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_c6eh6")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_seofy")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_eki2l")
}],
"loop": true,
"name": &"default",
"speed": 3.0
}]
[sub_resource type="AtlasTexture" id="AtlasTexture_trtgo"]
atlas = ExtResource("6_onea6")
region = Rect2(0, 0, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_5qfcr"]
atlas = ExtResource("6_onea6")
region = Rect2(0, 50, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_bt1ua"]
atlas = ExtResource("6_onea6")
region = Rect2(0, 100, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_muy2q"]
atlas = ExtResource("6_onea6")
region = Rect2(50, 0, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_1vt4p"]
atlas = ExtResource("6_onea6")
region = Rect2(50, 50, 50, 50)
[sub_resource type="SpriteFrames" id="SpriteFrames_uyt8c"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_trtgo")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_5qfcr")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_bt1ua")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_muy2q")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_1vt4p")
}],
"loop": true,
"name": &"default",
"speed": 2.0
}]
[sub_resource type="AtlasTexture" id="AtlasTexture_dp7jc"]
atlas = ExtResource("7_n7ovt")
region = Rect2(0, 0, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_m36jp"]
atlas = ExtResource("7_n7ovt")
region = Rect2(0, 50, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_uj3ey"]
atlas = ExtResource("7_n7ovt")
region = Rect2(50, 0, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_v5kgn"]
atlas = ExtResource("7_n7ovt")
region = Rect2(50, 50, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_20vrk"]
atlas = ExtResource("7_n7ovt")
region = Rect2(0, 100, 50, 50)
[sub_resource type="SpriteFrames" id="SpriteFrames_5owg6"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_dp7jc")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_m36jp")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_uj3ey")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_v5kgn")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_20vrk")
}],
"loop": true,
"name": &"default",
"speed": 5.0
}]
[sub_resource type="AtlasTexture" id="AtlasTexture_3yb5k"]
atlas = ExtResource("8_jfgxm")
region = Rect2(0, 0, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_8pcgq"]
atlas = ExtResource("8_jfgxm")
region = Rect2(0, 50, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_pjxy8"]
atlas = ExtResource("8_jfgxm")
region = Rect2(50, 0, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_gpbu6"]
atlas = ExtResource("8_jfgxm")
region = Rect2(50, 50, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_olerd"]
atlas = ExtResource("8_jfgxm")
region = Rect2(0, 100, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_kqqsa"]
atlas = ExtResource("8_jfgxm")
region = Rect2(50, 100, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_p0esq"]
atlas = ExtResource("8_jfgxm")
region = Rect2(100, 0, 50, 50)
[sub_resource type="SpriteFrames" id="SpriteFrames_f3af0"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_3yb5k")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_8pcgq")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_pjxy8")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_gpbu6")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_olerd")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_kqqsa")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_p0esq")
}],
"loop": true,
"name": &"default",
"speed": 3.0
}]
[sub_resource type="AtlasTexture" id="AtlasTexture_63ekj"]
atlas = ExtResource("9_pqth1")
region = Rect2(0, 0, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_1wlxe"]
atlas = ExtResource("9_pqth1")
region = Rect2(0, 50, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_yp4i5"]
atlas = ExtResource("9_pqth1")
region = Rect2(50, 0, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_rsn4b"]
atlas = ExtResource("9_pqth1")
region = Rect2(50, 50, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_sq3k7"]
atlas = ExtResource("9_pqth1")
region = Rect2(0, 100, 50, 50)
[sub_resource type="SpriteFrames" id="SpriteFrames_vjsfa"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_63ekj")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_1wlxe")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_yp4i5")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_rsn4b")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_sq3k7")
}],
"loop": true,
"name": &"default",
"speed": 3.0
}]
[sub_resource type="AtlasTexture" id="AtlasTexture_qjt60"]
atlas = ExtResource("10_v1cbn")
region = Rect2(0, 0, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_r7ni7"]
atlas = ExtResource("10_v1cbn")
region = Rect2(0, 50, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_6xuuy"]
atlas = ExtResource("10_v1cbn")
region = Rect2(50, 0, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_kppxy"]
atlas = ExtResource("10_v1cbn")
region = Rect2(50, 50, 50, 50)
[sub_resource type="AtlasTexture" id="AtlasTexture_hp1gf"]
atlas = ExtResource("10_v1cbn")
region = Rect2(0, 100, 50, 50)
[sub_resource type="SpriteFrames" id="SpriteFrames_jd5bi"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_qjt60")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_r7ni7")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_6xuuy")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_kppxy")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_hp1gf")
}],
"loop": true,
"name": &"default",
"speed": 3.0
}]
[sub_resource type="Environment" id="Environment_onea6"]
background_mode = 2
sky = SubResource("Sky_onea6")
ambient_light_source = 3
ambient_light_color = Color(1, 1, 1, 1)
ambient_light_energy = 16.0
[node name="Node3D" type="Node3D"]
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 20.3676, 0, 0)
[node name="Floor" type="MeshInstance3D" parent="."]
mesh = SubResource("PlaneMesh_4xowi")
[node name="StaticBody3D" type="StaticBody3D" parent="MeshInstance3D"]
[node name="StaticBody3D" type="StaticBody3D" parent="Floor"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="MeshInstance3D/StaticBody3D"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Floor/StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.378755, 0)
shape = SubResource("WorldBoundaryShape3D_a202f")
[node name="Sprite3D" type="Sprite3D" parent="MeshInstance3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3.13745, 0)
texture = ExtResource("1_a202f")
script = ExtResource("2_a0tk4")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 0.829857, 0.557977, 0, -0.557977, 0.829857, 0, 0, 0)
[node name="PlayerRigidbody" parent="." instance=ExtResource("2_noarx")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.187409, 7, 11.0325)
physics_material_override = SubResource("PhysicsMaterial_a0tk4")
@ -337,31 +70,28 @@ physics_material_override = SubResource("PhysicsMaterial_a0tk4")
use_collision = true
[node name="CSGBox3D" type="CSGBox3D" parent="CSG/House1/CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.5, 2.5, -13)
size = Vector3(22, 6, 1)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6.5, 1, -13)
size = Vector3(10, 3, 1)
[node name="CSGBox3D4" type="CSGBox3D" parent="CSG/House1/CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.5, 2.5, -36)
size = Vector3(22, 6, 1)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6.5, 1, -22)
size = Vector3(10, 3, 1)
[node name="CSGBox3D6" type="CSGBox3D" parent="CSG/House1/CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.5, 5, -24.5)
size = Vector3(22, 1, 24)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6.5, 3, -17.5)
size = Vector3(10, 1, 10)
[node name="CSGBox3D5" type="CSGBox3D" parent="CSG/House1/CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 0.5, 0.866025, 0, -0.866025, 0.5, 12.5, -4.25, -7.57661)
size = Vector3(4, 37, 1)
transform = Transform3D(1, 0, 0, 0, 0.5, 0.866025, 0, -0.866025, 0.5, 0.5, 1.5, -16.2679)
size = Vector3(4, 10, 1)
[node name="CSGBox3D2" type="CSGBox3D" parent="CSG/House1/CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 2.5, -24.5)
size = Vector3(1, 6, 24)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 1.5, -18)
size = Vector3(1, 2, 11)
[node name="CSGBox3D3" type="CSGBox3D" parent="CSG/House1/CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -11, 2.5, -24.5)
size = Vector3(1, 6, 24)
[node name="PointThing" parent="." instance=ExtResource("4_ylvgl")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3, 1, 5)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -11, 1, -18)
size = Vector3(1, 3, 11)
[node name="AI" type="Node3D" parent="."]
@ -369,54 +99,57 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3, 1, 5)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -16, 0, 0)
curve = SubResource("Curve3D_ylvgl")
[node name="Waitress" parent="AI/Path3D" instance=ExtResource("5_onea6")]
transform = Transform3D(0.0520826, -0.0241412, -0.998349, 9.31319e-10, 0.999704, -0.0241741, 0.998639, 0.00125905, 0.0520674, 2, 0, -28)
[node name="NavigationRegion3D" type="NavigationRegion3D" parent="AI"]
transform = Transform3D(2.1, 0, 0, 0, 2.1, 0, 0, 0, 2.1, -15, 0, 0)
navigation_mesh = SubResource("NavigationMesh_ylvgl")
[node name="sax" type="AnimatedSprite3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -12.453, 3.05491, -0.319478)
pixel_size = 0.1
billboard = 2
texture_filter = 0
sprite_frames = SubResource("SpriteFrames_65unk")
frame_progress = 0.107993
[node name="sax" parent="." instance=ExtResource("5_n7ovt")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -12.453, 1.22875, -0.319478)
[node name="guitar" type="AnimatedSprite3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -17.3395, 3.35095, 0.303112)
pixel_size = 0.1
billboard = 2
texture_filter = 0
sprite_frames = SubResource("SpriteFrames_uyt8c")
frame_progress = 0.663731
[node name="guitar" parent="." instance=ExtResource("6_jfgxm")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -17.3395, 1.22875, 0.303112)
[node name="dancing_guy" type="AnimatedSprite3D" parent="."]
transform = Transform3D(-0.586712, 0, -0.809796, 0, 1, 0, 0.809796, 0, -0.586712, -10.566, 2.42652, 11.8857)
pixel_size = 0.1
billboard = 2
texture_filter = 0
sprite_frames = SubResource("SpriteFrames_5owg6")
frame_progress = 0.890734
[node name="dancing_guy" parent="." instance=ExtResource("7_pqth1")]
transform = Transform3D(-0.586712, 0, -0.809796, 0, 1, 0, 0.809796, 0, -0.586712, -10.566, 1.22875, 11.8857)
[node name="guys" type="AnimatedSprite3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -29.954, 3.64556, 0)
pixel_size = 0.1
billboard = 2
texture_filter = 0
sprite_frames = SubResource("SpriteFrames_f3af0")
frame_progress = 0.448355
[node name="guys" parent="." instance=ExtResource("8_onea6")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -29.954, 1.22875, 0)
[node name="AnimatedSprite3D" type="AnimatedSprite3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -34.8394, 2.59832, 7.74934)
pixel_size = 0.1
billboard = 2
texture_filter = 0
sprite_frames = SubResource("SpriteFrames_vjsfa")
frame_progress = 0.372896
[node name="guy_drinking" parent="." instance=ExtResource("9_v1cbn")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -34.8394, 1.22875, 7.74934)
[node name="waitress" type="AnimatedSprite3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -24.2704, 2.54041, 13.5884)
pixel_size = 0.1
billboard = 2
texture_filter = 0
sprite_frames = SubResource("SpriteFrames_jd5bi")
frame_progress = 0.97673
[node name="waitress" parent="." instance=ExtResource("10_fe45m")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -24.2704, 1.22875, 13.5884)
[node name="SkyRotation" type="Node3D" parent="." node_paths=PackedStringArray("sun", "environment")]
transform = Transform3D(1, 0, 0, 0, 0.707107, 0.707107, 0, -0.707107, 0.707107, 0, 0, 0)
script = ExtResource("11_onea6")
sun = NodePath("DirectionalLight3D")
environment = NodePath("WorldEnvironment")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="SkyRotation"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 6)
shadow_enabled = true
[node name="WorldEnvironment" type="WorldEnvironment" parent="SkyRotation"]
environment = SubResource("Environment_onea6")
[node name="Lights" type="Node3D" parent="."]
[node name="SpotLight3D" type="SpotLight3D" parent="Lights"]
transform = Transform3D(0.482963, -0.258819, 0.836516, 0.12941, 0.965926, 0.224144, -0.866025, -8.46876e-09, 0.5, -8, 2, 2)
light_energy = 16.0
shadow_enabled = true
spot_range = 13.0
[node name="Table" parent="." instance=ExtResource("11_n7ovt")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 0.5, -1)
[node name="guys2" parent="." instance=ExtResource("8_onea6")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 0.9, 0)
[node name="guy_drinking2" parent="." instance=ExtResource("9_v1cbn")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 1.1, -3)

41
Florian/sky_rotation.gd Normal file
View file

@ -0,0 +1,41 @@
extends Node3D
@export var day_length_minutes: float = 1.0 # 1-minute full day cycle
@export var min_light_energy := 0.1
@export var max_light_energy := 1.0
@export var sun: DirectionalLight3D
@export var environment: WorldEnvironment
var time_of_day := 0.0 # 0 to 1, where 0 is midnight, 0.5 is noon, 1 is midnight again
func _process(delta: float) -> void:
if day_length_minutes <= 0:
return
var day_speed = 1.0 / (day_length_minutes * 60.0)
time_of_day = fmod(time_of_day + delta * day_speed, 1.0)
#_update_sun_rotation()
#_update_light_intensity()
#_update_sky_color()
func _update_sun_rotation():
var angle = time_of_day * 360.0
rotation_degrees.x = angle - 90.0 # Rotate around X to simulate rising and setting
func _update_light_intensity():
# Use cosine to simulate brightness change
var sun_height = clamp(sin(time_of_day * PI * 2.0), 0.0, 1.0)
var intensity = lerp(min_light_energy, max_light_energy, sun_height)
sun.light_energy = intensity
func _update_sky_color():
var sky_mat = environment.environment.sky.sky_material as ProceduralSkyMaterial
if sky_mat:
var horizon_day = Color(0.4, 0.7, 1.0)
var horizon_night = Color(0.02, 0.02, 0.1)
var blend = clamp(sin(time_of_day * PI * 2.0), 0.0, 1.0)
sky_mat.sky_horizon_color = horizon_night.lerp(horizon_day, blend)
sky_mat.sky_top_color = horizon_night.lerp(horizon_day, blend)

View file

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

27
clock.gd Normal file
View file

@ -0,0 +1,27 @@
extends Node
signal hour_signal
signal fifteen_minutes_signal
signal thirty_minutes_signal
var hour: int = 0
var minute: int = 0
@export var minutes_per_real_second: float = 1.0 # 1 in-game minute per second
var _accumulated_time := 0.0
func _process(delta: float) -> void:
_accumulated_time += delta * minutes_per_real_second
while _accumulated_time >= 1.0:
_accumulated_time -= 1.0
_add_minute()
func _add_minute():
minute += 1
if minute >= 60:
hour_signal.emit()
minute = 0
hour += 1
if hour >= 24:
hour = 0

1
clock.gd.uid Normal file
View file

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