prototype vibe

This commit is contained in:
Marek Lenczewski
2026-04-16 17:20:57 +02:00
parent cf5979803e
commit f21e30eb55
72 changed files with 1330 additions and 70 deletions

10
scenes/tavern/init.gd Normal file
View File

@@ -0,0 +1,10 @@
extends StaticBody3D
@export var stats: TavernStats
func _ready() -> void:
add_to_group("tavern")
TavernData.register(self, stats)
func _exit_tree() -> void:
TavernData.deregister(self)

View File

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

66
scenes/tavern/tavern.tscn Normal file
View File

@@ -0,0 +1,66 @@
[gd_scene format=3]
[ext_resource type="Script" path="res://scenes/tavern/init.gd" id="1"]
[ext_resource type="Resource" path="res://scenes/tavern/tavern_stats.tres" id="2"]
[sub_resource type="BoxShape3D" id="BoxShape3D_tavern"]
size = Vector3(5, 3, 5)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_tavern"]
albedo_color = Color(0.45, 0.3, 0.15, 1)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_roof"]
albedo_color = Color(0.3, 0.15, 0.08, 1)
[sub_resource type="BoxMesh" id="BoxMesh_tavern"]
size = Vector3(5, 3, 5)
material = SubResource("StandardMaterial3D_tavern")
[sub_resource type="PrismMesh" id="PrismMesh_roof"]
size = Vector3(5.4, 2, 5.4)
material = SubResource("StandardMaterial3D_roof")
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_health_bg"]
bg_color = Color(0.3, 0.1, 0.1, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_health_fill"]
bg_color = Color(0.9, 0.7, 0.2, 1)
[node name="Tavern" type="StaticBody3D"]
script = ExtResource("1")
stats = ExtResource("2")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("BoxShape3D_tavern")
[node name="Mesh" type="MeshInstance3D" parent="."]
mesh = SubResource("BoxMesh_tavern")
[node name="Roof" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.5, 0)
mesh = SubResource("PrismMesh_roof")
[node name="Healthbar" type="Sprite3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 4, 0)
billboard = 1
pixel_size = 0.015
[node name="SubViewport" type="SubViewport" parent="Healthbar"]
transparent_bg = true
size = Vector2i(204, 25)
[node name="Border" type="ColorRect" parent="Healthbar/SubViewport"]
offset_right = 204.0
offset_bottom = 25.0
color = Color(0.1, 0.1, 0.1, 1)
[node name="HealthBar" type="ProgressBar" parent="Healthbar/SubViewport"]
offset_left = 2.0
offset_top = 2.0
offset_right = 202.0
offset_bottom = 23.0
theme_override_styles/background = SubResource("StyleBoxFlat_health_bg")
theme_override_styles/fill = SubResource("StyleBoxFlat_health_fill")
max_value = 5000.0
value = 5000.0
show_percentage = false

View File

@@ -0,0 +1,2 @@
extends BaseStats
class_name TavernStats

View File

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

View File

@@ -0,0 +1,7 @@
[gd_resource type="Resource" script_class="TavernStats" format=3]
[ext_resource type="Script" path="res://scenes/tavern/tavern_stats.gd" id="1"]
[resource]
script = ExtResource("1")
max_health = 5000.0