Compare commits
8 Commits
2bb73c905c
...
c0c86b0998
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c0c86b0998 | ||
|
|
cc44519d62 | ||
|
|
045aa8c3b6 | ||
|
|
b1ea85a449 | ||
|
|
35ab8ffeb3 | ||
|
|
a48539d410 | ||
|
|
130317b516 | ||
|
|
903df578e2 |
@@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=9 format=3 uid="uid://cozypaw_main"]
|
[gd_scene load_steps=13 format=3 uid="uid://cozypaw_main"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://scripts/main/main.gd" id="1_main"]
|
[ext_resource type="Script" path="res://scripts/main/main.gd" id="1_main"]
|
||||||
[ext_resource type="PackedScene" path="res://scenes/rooms/floor0/Reception.tscn" id="2_reception"]
|
[ext_resource type="PackedScene" path="res://scenes/rooms/floor0/Reception.tscn" id="2_reception"]
|
||||||
@@ -7,6 +7,10 @@
|
|||||||
[ext_resource type="PackedScene" path="res://scenes/ui/SettingsMenu.tscn" id="5_settings"]
|
[ext_resource type="PackedScene" path="res://scenes/ui/SettingsMenu.tscn" id="5_settings"]
|
||||||
[ext_resource type="PackedScene" path="res://scenes/objects/ElevatorButton.tscn" id="6_elevbtn"]
|
[ext_resource type="PackedScene" path="res://scenes/objects/ElevatorButton.tscn" id="6_elevbtn"]
|
||||||
[ext_resource type="Script" path="res://scripts/characters/character_data.gd" id="7_chardata"]
|
[ext_resource type="Script" path="res://scripts/characters/character_data.gd" id="7_chardata"]
|
||||||
|
[ext_resource type="PackedScene" path="res://scenes/rooms/floor0/GiftShop.tscn" id="8_giftshop"]
|
||||||
|
[ext_resource type="PackedScene" path="res://scenes/rooms/floor0/Restaurant.tscn" id="9_restaurant"]
|
||||||
|
[ext_resource type="PackedScene" path="res://scenes/rooms/floor0/EmergencyRoom.tscn" id="10_emergency"]
|
||||||
|
[ext_resource type="PackedScene" path="res://scenes/objects/NavigationArrow.tscn" id="11_navarrow"]
|
||||||
|
|
||||||
[sub_resource type="Resource" id="CharacterData_bunny1"]
|
[sub_resource type="Resource" id="CharacterData_bunny1"]
|
||||||
script = ExtResource("7_chardata")
|
script = ExtResource("7_chardata")
|
||||||
@@ -32,10 +36,55 @@ position = Vector2(0, 0)
|
|||||||
[node name="Reception" parent="Hospital/Floor0" instance=ExtResource("2_reception")]
|
[node name="Reception" parent="Hospital/Floor0" instance=ExtResource("2_reception")]
|
||||||
position = Vector2(0, 0)
|
position = Vector2(0, 0)
|
||||||
|
|
||||||
|
[node name="GiftShop" parent="Hospital/Floor0" instance=ExtResource("8_giftshop")]
|
||||||
|
position = Vector2(1280, 0)
|
||||||
|
|
||||||
|
[node name="Restaurant" parent="Hospital/Floor0" instance=ExtResource("9_restaurant")]
|
||||||
|
position = Vector2(2560, 0)
|
||||||
|
|
||||||
|
[node name="EmergencyRoom" parent="Hospital/Floor0" instance=ExtResource("10_emergency")]
|
||||||
|
position = Vector2(3840, 0)
|
||||||
|
|
||||||
[node name="ElevatorUp0" parent="Hospital/Floor0" instance=ExtResource("6_elevbtn")]
|
[node name="ElevatorUp0" parent="Hospital/Floor0" instance=ExtResource("6_elevbtn")]
|
||||||
position = Vector2(1200, 360)
|
position = Vector2(1100, 160)
|
||||||
target_floor = 1
|
target_floor = 1
|
||||||
|
|
||||||
|
[node name="NavRight0to1" parent="Hospital/Floor0" instance=ExtResource("11_navarrow")]
|
||||||
|
position = Vector2(1200, 480)
|
||||||
|
target_floor = 0
|
||||||
|
target_room = 1
|
||||||
|
label_text = "→"
|
||||||
|
|
||||||
|
[node name="NavLeft1to0" parent="Hospital/Floor0" instance=ExtResource("11_navarrow")]
|
||||||
|
position = Vector2(1340, 480)
|
||||||
|
target_floor = 0
|
||||||
|
target_room = 0
|
||||||
|
label_text = "←"
|
||||||
|
|
||||||
|
[node name="NavRight1to2" parent="Hospital/Floor0" instance=ExtResource("11_navarrow")]
|
||||||
|
position = Vector2(2480, 480)
|
||||||
|
target_floor = 0
|
||||||
|
target_room = 2
|
||||||
|
label_text = "→"
|
||||||
|
|
||||||
|
[node name="NavLeft2to1" parent="Hospital/Floor0" instance=ExtResource("11_navarrow")]
|
||||||
|
position = Vector2(2600, 480)
|
||||||
|
target_floor = 0
|
||||||
|
target_room = 1
|
||||||
|
label_text = "←"
|
||||||
|
|
||||||
|
[node name="NavRight2to3" parent="Hospital/Floor0" instance=ExtResource("11_navarrow")]
|
||||||
|
position = Vector2(3760, 480)
|
||||||
|
target_floor = 0
|
||||||
|
target_room = 3
|
||||||
|
label_text = "→"
|
||||||
|
|
||||||
|
[node name="NavLeft3to2" parent="Hospital/Floor0" instance=ExtResource("11_navarrow")]
|
||||||
|
position = Vector2(3920, 480)
|
||||||
|
target_floor = 0
|
||||||
|
target_room = 2
|
||||||
|
label_text = "←"
|
||||||
|
|
||||||
[node name="Floor1" type="Node2D" parent="Hospital"]
|
[node name="Floor1" type="Node2D" parent="Hospital"]
|
||||||
position = Vector2(0, -720)
|
position = Vector2(0, -720)
|
||||||
|
|
||||||
|
|||||||
41
scenes/objects/Ambulance.tscn
Normal file
41
scenes/objects/Ambulance.tscn
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
[gd_scene load_steps=2 format=3 uid="uid://cozypaw_ambulance"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://scripts/objects/ambulance.gd" id="1_ambulance"]
|
||||||
|
|
||||||
|
[node name="Ambulance" type="Node2D"]
|
||||||
|
script = ExtResource("1_ambulance")
|
||||||
|
|
||||||
|
[node name="Body" type="ColorRect" parent="."]
|
||||||
|
color = Color(1.0, 1.0, 1.0, 1)
|
||||||
|
size = Vector2(180, 100)
|
||||||
|
position = Vector2(-90, -50)
|
||||||
|
|
||||||
|
[node name="RedStripe" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.90, 0.15, 0.15, 1)
|
||||||
|
size = Vector2(180, 20)
|
||||||
|
position = Vector2(-90, -15)
|
||||||
|
|
||||||
|
[node name="Cabin" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.82, 0.85, 0.90, 1)
|
||||||
|
size = Vector2(70, 60)
|
||||||
|
position = Vector2(-90, -50)
|
||||||
|
|
||||||
|
[node name="WindowFront" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.60, 0.85, 1.0, 1)
|
||||||
|
size = Vector2(50, 38)
|
||||||
|
position = Vector2(-82, -46)
|
||||||
|
|
||||||
|
[node name="WheelFront" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.15, 0.15, 0.15, 1)
|
||||||
|
size = Vector2(30, 30)
|
||||||
|
position = Vector2(-75, 48)
|
||||||
|
|
||||||
|
[node name="WheelBack" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.15, 0.15, 0.15, 1)
|
||||||
|
size = Vector2(30, 30)
|
||||||
|
position = Vector2(50, 48)
|
||||||
|
|
||||||
|
[node name="Siren" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.10, 0.40, 1.0, 1)
|
||||||
|
size = Vector2(40, 18)
|
||||||
|
position = Vector2(-20, -68)
|
||||||
21
scenes/objects/NavigationArrow.tscn
Normal file
21
scenes/objects/NavigationArrow.tscn
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
[gd_scene load_steps=2 format=3 uid="uid://cozypaw_navarrow"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://scripts/objects/navigation_arrow.gd" id="1_navarrow"]
|
||||||
|
|
||||||
|
[node name="NavigationArrow" type="Node2D"]
|
||||||
|
script = ExtResource("1_navarrow")
|
||||||
|
|
||||||
|
[node name="Body" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.30, 0.60, 1.0, 0.85)
|
||||||
|
size = Vector2(96, 96)
|
||||||
|
position = Vector2(-48, -48)
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="."]
|
||||||
|
offset_left = -24.0
|
||||||
|
offset_top = -18.0
|
||||||
|
offset_right = 24.0
|
||||||
|
offset_bottom = 18.0
|
||||||
|
text = "→"
|
||||||
|
theme_override_font_sizes/font_size = 36
|
||||||
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 1
|
||||||
73
scenes/rooms/floor0/EmergencyRoom.tscn
Normal file
73
scenes/rooms/floor0/EmergencyRoom.tscn
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
[gd_scene load_steps=3 format=3 uid="uid://cozypaw_emergency"]
|
||||||
|
|
||||||
|
[ext_resource type="PackedScene" path="res://scenes/objects/InteractiveObject.tscn" id="1_iobj"]
|
||||||
|
[ext_resource type="PackedScene" path="res://scenes/objects/Ambulance.tscn" id="2_ambulance"]
|
||||||
|
|
||||||
|
[node name="EmergencyRoom" type="Node2D"]
|
||||||
|
|
||||||
|
[node name="Background" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.88, 0.94, 1.0, 1)
|
||||||
|
size = Vector2(1280, 720)
|
||||||
|
position = Vector2(0, 0)
|
||||||
|
|
||||||
|
[node name="Floor" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.72, 0.74, 0.80, 1)
|
||||||
|
size = Vector2(1280, 100)
|
||||||
|
position = Vector2(0, 620)
|
||||||
|
|
||||||
|
[node name="WallLeft" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.90, 0.92, 0.96, 1)
|
||||||
|
size = Vector2(40, 620)
|
||||||
|
position = Vector2(0, 0)
|
||||||
|
|
||||||
|
[node name="WallRight" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.90, 0.92, 0.96, 1)
|
||||||
|
size = Vector2(40, 620)
|
||||||
|
position = Vector2(1240, 0)
|
||||||
|
|
||||||
|
[node name="AmbulanceBay" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.58, 0.60, 0.68, 1)
|
||||||
|
size = Vector2(380, 120)
|
||||||
|
position = Vector2(860, 500)
|
||||||
|
|
||||||
|
[node name="AmbulanceBayLine" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.90, 0.80, 0.10, 1)
|
||||||
|
size = Vector2(380, 6)
|
||||||
|
position = Vector2(860, 500)
|
||||||
|
|
||||||
|
[node name="MedicalTable" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.85, 0.85, 0.92, 1)
|
||||||
|
size = Vector2(260, 30)
|
||||||
|
position = Vector2(180, 490)
|
||||||
|
|
||||||
|
[node name="MedicalTableLeg1" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.68, 0.68, 0.76, 1)
|
||||||
|
size = Vector2(16, 130)
|
||||||
|
position = Vector2(200, 520)
|
||||||
|
|
||||||
|
[node name="MedicalTableLeg2" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.68, 0.68, 0.76, 1)
|
||||||
|
size = Vector2(16, 130)
|
||||||
|
position = Vector2(408, 520)
|
||||||
|
|
||||||
|
[node name="IVPole" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.78, 0.78, 0.84, 1)
|
||||||
|
size = Vector2(10, 220)
|
||||||
|
position = Vector2(545, 350)
|
||||||
|
|
||||||
|
[node name="IVBag" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.55, 0.85, 0.95, 1)
|
||||||
|
size = Vector2(50, 70)
|
||||||
|
position = Vector2(525, 280)
|
||||||
|
|
||||||
|
[node name="CharacterSpawn" type="Marker2D" parent="."]
|
||||||
|
position = Vector2(310, 490)
|
||||||
|
|
||||||
|
[node name="Stretcher" parent="." instance=ExtResource("1_iobj")]
|
||||||
|
position = Vector2(680, 490)
|
||||||
|
|
||||||
|
[node name="IVStand" parent="." instance=ExtResource("1_iobj")]
|
||||||
|
position = Vector2(550, 440)
|
||||||
|
|
||||||
|
[node name="Ambulance" parent="." instance=ExtResource("2_ambulance")]
|
||||||
|
position = Vector2(500, 570)
|
||||||
65
scenes/rooms/floor0/GiftShop.tscn
Normal file
65
scenes/rooms/floor0/GiftShop.tscn
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
[gd_scene load_steps=2 format=3 uid="uid://cozypaw_giftshop"]
|
||||||
|
|
||||||
|
[ext_resource type="PackedScene" path="res://scenes/objects/InteractiveObject.tscn" id="1_iobj"]
|
||||||
|
|
||||||
|
[node name="GiftShop" type="Node2D"]
|
||||||
|
|
||||||
|
[node name="Background" type="ColorRect" parent="."]
|
||||||
|
color = Color(1.0, 0.88, 0.92, 1)
|
||||||
|
size = Vector2(1280, 720)
|
||||||
|
position = Vector2(0, 0)
|
||||||
|
|
||||||
|
[node name="Floor" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.88, 0.80, 0.68, 1)
|
||||||
|
size = Vector2(1280, 100)
|
||||||
|
position = Vector2(0, 620)
|
||||||
|
|
||||||
|
[node name="WallLeft" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.96, 0.90, 0.90, 1)
|
||||||
|
size = Vector2(40, 620)
|
||||||
|
position = Vector2(0, 0)
|
||||||
|
|
||||||
|
[node name="WallRight" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.96, 0.90, 0.90, 1)
|
||||||
|
size = Vector2(40, 620)
|
||||||
|
position = Vector2(1240, 0)
|
||||||
|
|
||||||
|
[node name="ShelfBoard" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.75, 0.50, 0.25, 1)
|
||||||
|
size = Vector2(800, 20)
|
||||||
|
position = Vector2(240, 360)
|
||||||
|
|
||||||
|
[node name="ShelfLegLeft" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.60, 0.38, 0.18, 1)
|
||||||
|
size = Vector2(16, 240)
|
||||||
|
position = Vector2(240, 380)
|
||||||
|
|
||||||
|
[node name="ShelfLegRight" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.60, 0.38, 0.18, 1)
|
||||||
|
size = Vector2(16, 240)
|
||||||
|
position = Vector2(1024, 380)
|
||||||
|
|
||||||
|
[node name="Counter" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.60, 0.38, 0.18, 1)
|
||||||
|
size = Vector2(240, 80)
|
||||||
|
position = Vector2(520, 540)
|
||||||
|
|
||||||
|
[node name="CounterTop" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.75, 0.50, 0.25, 1)
|
||||||
|
size = Vector2(240, 12)
|
||||||
|
position = Vector2(520, 528)
|
||||||
|
|
||||||
|
[node name="CharacterSpawn" type="Marker2D" parent="."]
|
||||||
|
position = Vector2(300, 520)
|
||||||
|
|
||||||
|
[node name="FlowerBouquet" parent="." instance=ExtResource("1_iobj")]
|
||||||
|
position = Vector2(380, 330)
|
||||||
|
|
||||||
|
[node name="PlushToy" parent="." instance=ExtResource("1_iobj")]
|
||||||
|
position = Vector2(640, 330)
|
||||||
|
|
||||||
|
[node name="GiftCard" parent="." instance=ExtResource("1_iobj")]
|
||||||
|
position = Vector2(900, 330)
|
||||||
|
|
||||||
|
[node name="GiftBox" parent="." instance=ExtResource("1_iobj")]
|
||||||
|
position = Vector2(640, 510)
|
||||||
@@ -9,16 +9,6 @@ color = Color(0.78, 0.94, 0.80, 1)
|
|||||||
size = Vector2(1280, 720)
|
size = Vector2(1280, 720)
|
||||||
position = Vector2(0, 0)
|
position = Vector2(0, 0)
|
||||||
|
|
||||||
[node name="Counter" type="ColorRect" parent="."]
|
|
||||||
color = Color(0.55, 0.35, 0.18, 1)
|
|
||||||
size = Vector2(300, 80)
|
|
||||||
position = Vector2(490, 610)
|
|
||||||
|
|
||||||
[node name="CounterTop" type="ColorRect" parent="."]
|
|
||||||
color = Color(0.70, 0.50, 0.28, 1)
|
|
||||||
size = Vector2(300, 12)
|
|
||||||
position = Vector2(490, 598)
|
|
||||||
|
|
||||||
[node name="Floor" type="ColorRect" parent="."]
|
[node name="Floor" type="ColorRect" parent="."]
|
||||||
color = Color(0.88, 0.80, 0.68, 1)
|
color = Color(0.88, 0.80, 0.68, 1)
|
||||||
size = Vector2(1280, 100)
|
size = Vector2(1280, 100)
|
||||||
@@ -34,8 +24,64 @@ color = Color(0.92, 0.88, 0.82, 1)
|
|||||||
size = Vector2(40, 620)
|
size = Vector2(40, 620)
|
||||||
position = Vector2(1240, 0)
|
position = Vector2(1240, 0)
|
||||||
|
|
||||||
|
[node name="Counter" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.55, 0.35, 0.18, 1)
|
||||||
|
size = Vector2(340, 80)
|
||||||
|
position = Vector2(460, 540)
|
||||||
|
|
||||||
|
[node name="CounterTop" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.70, 0.50, 0.28, 1)
|
||||||
|
size = Vector2(340, 12)
|
||||||
|
position = Vector2(460, 528)
|
||||||
|
|
||||||
|
[node name="NumberDisplayFrame" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.20, 0.20, 0.20, 1)
|
||||||
|
size = Vector2(120, 80)
|
||||||
|
position = Vector2(570, 445)
|
||||||
|
|
||||||
|
[node name="NumberDisplayScreen" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.10, 0.80, 0.20, 1)
|
||||||
|
size = Vector2(100, 60)
|
||||||
|
position = Vector2(580, 455)
|
||||||
|
|
||||||
|
[node name="BenchLeft" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.60, 0.40, 0.20, 1)
|
||||||
|
size = Vector2(180, 40)
|
||||||
|
position = Vector2(100, 578)
|
||||||
|
|
||||||
|
[node name="BenchLeftLeg1" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.45, 0.28, 0.12, 1)
|
||||||
|
size = Vector2(16, 32)
|
||||||
|
position = Vector2(112, 618)
|
||||||
|
|
||||||
|
[node name="BenchLeftLeg2" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.45, 0.28, 0.12, 1)
|
||||||
|
size = Vector2(16, 32)
|
||||||
|
position = Vector2(252, 618)
|
||||||
|
|
||||||
|
[node name="BenchRight" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.60, 0.40, 0.20, 1)
|
||||||
|
size = Vector2(180, 40)
|
||||||
|
position = Vector2(940, 578)
|
||||||
|
|
||||||
|
[node name="BenchRightLeg1" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.45, 0.28, 0.12, 1)
|
||||||
|
size = Vector2(16, 32)
|
||||||
|
position = Vector2(952, 618)
|
||||||
|
|
||||||
|
[node name="BenchRightLeg2" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.45, 0.28, 0.12, 1)
|
||||||
|
size = Vector2(16, 32)
|
||||||
|
position = Vector2(1092, 618)
|
||||||
|
|
||||||
[node name="CharacterSpawn" type="Marker2D" parent="."]
|
[node name="CharacterSpawn" type="Marker2D" parent="."]
|
||||||
position = Vector2(300, 520)
|
position = Vector2(300, 520)
|
||||||
|
|
||||||
[node name="Flower" parent="." instance=ExtResource("1_iobj")]
|
[node name="Flower" parent="." instance=ExtResource("1_iobj")]
|
||||||
position = Vector2(200, 560)
|
position = Vector2(200, 560)
|
||||||
|
|
||||||
|
[node name="Bell" parent="." instance=ExtResource("1_iobj")]
|
||||||
|
position = Vector2(530, 510)
|
||||||
|
|
||||||
|
[node name="PottedPlant" parent="." instance=ExtResource("1_iobj")]
|
||||||
|
position = Vector2(1180, 560)
|
||||||
|
|||||||
95
scenes/rooms/floor0/Restaurant.tscn
Normal file
95
scenes/rooms/floor0/Restaurant.tscn
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
[gd_scene load_steps=2 format=3 uid="uid://cozypaw_restaurant"]
|
||||||
|
|
||||||
|
[ext_resource type="PackedScene" path="res://scenes/objects/InteractiveObject.tscn" id="1_iobj"]
|
||||||
|
|
||||||
|
[node name="Restaurant" type="Node2D"]
|
||||||
|
|
||||||
|
[node name="Background" type="ColorRect" parent="."]
|
||||||
|
color = Color(1.0, 0.95, 0.82, 1)
|
||||||
|
size = Vector2(1280, 720)
|
||||||
|
position = Vector2(0, 0)
|
||||||
|
|
||||||
|
[node name="Floor" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.75, 0.65, 0.50, 1)
|
||||||
|
size = Vector2(1280, 100)
|
||||||
|
position = Vector2(0, 620)
|
||||||
|
|
||||||
|
[node name="WallLeft" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.96, 0.92, 0.80, 1)
|
||||||
|
size = Vector2(40, 620)
|
||||||
|
position = Vector2(0, 0)
|
||||||
|
|
||||||
|
[node name="WallRight" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.96, 0.92, 0.80, 1)
|
||||||
|
size = Vector2(40, 620)
|
||||||
|
position = Vector2(1240, 0)
|
||||||
|
|
||||||
|
[node name="KitchenCounter" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.55, 0.35, 0.18, 1)
|
||||||
|
size = Vector2(360, 80)
|
||||||
|
position = Vector2(460, 240)
|
||||||
|
|
||||||
|
[node name="KitchenCounterTop" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.70, 0.50, 0.28, 1)
|
||||||
|
size = Vector2(360, 12)
|
||||||
|
position = Vector2(460, 228)
|
||||||
|
|
||||||
|
[node name="Table1" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.65, 0.42, 0.20, 1)
|
||||||
|
size = Vector2(200, 20)
|
||||||
|
position = Vector2(120, 520)
|
||||||
|
|
||||||
|
[node name="Table1Leg1" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.50, 0.32, 0.15, 1)
|
||||||
|
size = Vector2(16, 100)
|
||||||
|
position = Vector2(140, 540)
|
||||||
|
|
||||||
|
[node name="Table1Leg2" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.50, 0.32, 0.15, 1)
|
||||||
|
size = Vector2(16, 100)
|
||||||
|
position = Vector2(304, 540)
|
||||||
|
|
||||||
|
[node name="Table2" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.65, 0.42, 0.20, 1)
|
||||||
|
size = Vector2(200, 20)
|
||||||
|
position = Vector2(540, 520)
|
||||||
|
|
||||||
|
[node name="Table2Leg1" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.50, 0.32, 0.15, 1)
|
||||||
|
size = Vector2(16, 100)
|
||||||
|
position = Vector2(560, 540)
|
||||||
|
|
||||||
|
[node name="Table2Leg2" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.50, 0.32, 0.15, 1)
|
||||||
|
size = Vector2(16, 100)
|
||||||
|
position = Vector2(724, 540)
|
||||||
|
|
||||||
|
[node name="Table3" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.65, 0.42, 0.20, 1)
|
||||||
|
size = Vector2(200, 20)
|
||||||
|
position = Vector2(960, 520)
|
||||||
|
|
||||||
|
[node name="Table3Leg1" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.50, 0.32, 0.15, 1)
|
||||||
|
size = Vector2(16, 100)
|
||||||
|
position = Vector2(980, 540)
|
||||||
|
|
||||||
|
[node name="Table3Leg2" type="ColorRect" parent="."]
|
||||||
|
color = Color(0.50, 0.32, 0.15, 1)
|
||||||
|
size = Vector2(16, 100)
|
||||||
|
position = Vector2(1144, 540)
|
||||||
|
|
||||||
|
[node name="CharacterSpawn" type="Marker2D" parent="."]
|
||||||
|
position = Vector2(300, 490)
|
||||||
|
|
||||||
|
[node name="SoupBowl" parent="." instance=ExtResource("1_iobj")]
|
||||||
|
position = Vector2(220, 490)
|
||||||
|
|
||||||
|
[node name="Sandwich" parent="." instance=ExtResource("1_iobj")]
|
||||||
|
position = Vector2(640, 490)
|
||||||
|
|
||||||
|
[node name="JuiceGlass" parent="." instance=ExtResource("1_iobj")]
|
||||||
|
position = Vector2(1060, 490)
|
||||||
|
|
||||||
|
[node name="CashRegister" parent="." instance=ExtResource("1_iobj")]
|
||||||
|
position = Vector2(640, 210)
|
||||||
84
scripts/objects/ambulance.gd
Normal file
84
scripts/objects/ambulance.gd
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
## Ambulance — drives in from off-screen right when Emergency Room is entered; tap to toggle.
|
||||||
|
class_name Ambulance extends Node2D
|
||||||
|
|
||||||
|
const OFFSCREEN_OFFSET: float = 1200.0
|
||||||
|
const BUTTON_HALF_WIDTH: float = 90.0
|
||||||
|
const BUTTON_HALF_HEIGHT: float = 50.0
|
||||||
|
const DRIVE_DURATION: float = 1.2
|
||||||
|
|
||||||
|
@export var trigger_floor: int = 0
|
||||||
|
@export var trigger_room: int = 3
|
||||||
|
|
||||||
|
var _parked_x: float = 0.0
|
||||||
|
var _is_parked: bool = false
|
||||||
|
var _is_animating: bool = false
|
||||||
|
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
_parked_x = position.x
|
||||||
|
position.x = _parked_x + OFFSCREEN_OFFSET
|
||||||
|
RoomNavigator.room_changed.connect(_on_room_changed)
|
||||||
|
|
||||||
|
|
||||||
|
func _exit_tree() -> void:
|
||||||
|
if RoomNavigator.room_changed.is_connected(_on_room_changed):
|
||||||
|
RoomNavigator.room_changed.disconnect(_on_room_changed)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_room_changed(floor_index: int, room_index: int) -> void:
|
||||||
|
if floor_index == trigger_floor and room_index == trigger_room:
|
||||||
|
if not _is_parked and not _is_animating:
|
||||||
|
_drive_in()
|
||||||
|
|
||||||
|
|
||||||
|
func _input(event: InputEvent) -> void:
|
||||||
|
if _is_animating:
|
||||||
|
return
|
||||||
|
var screen_pos: Vector2
|
||||||
|
if event is InputEventScreenTouch and event.pressed:
|
||||||
|
screen_pos = event.position
|
||||||
|
elif event is InputEventMouseButton and event.pressed and event.button_index == MOUSE_BUTTON_LEFT:
|
||||||
|
screen_pos = event.position
|
||||||
|
else:
|
||||||
|
return
|
||||||
|
var canvas_transform: Transform2D = get_viewport().get_canvas_transform()
|
||||||
|
var world_pos: Vector2 = canvas_transform.affine_inverse() * screen_pos
|
||||||
|
var local_pos: Vector2 = to_local(world_pos)
|
||||||
|
if abs(local_pos.x) <= BUTTON_HALF_WIDTH and abs(local_pos.y) <= BUTTON_HALF_HEIGHT:
|
||||||
|
if _is_parked:
|
||||||
|
_drive_out()
|
||||||
|
else:
|
||||||
|
_drive_in()
|
||||||
|
|
||||||
|
|
||||||
|
func _drive_in() -> void:
|
||||||
|
_is_animating = true
|
||||||
|
_is_parked = false
|
||||||
|
var tween: Tween = create_tween()
|
||||||
|
tween.set_ease(Tween.EASE_OUT)
|
||||||
|
tween.set_trans(Tween.TRANS_QUAD)
|
||||||
|
tween.tween_property(self, "position:x", _parked_x, DRIVE_DURATION)
|
||||||
|
tween.finished.connect(func() -> void:
|
||||||
|
_is_parked = true
|
||||||
|
_is_animating = false
|
||||||
|
_play_stop_bounce()
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
func _drive_out() -> void:
|
||||||
|
_is_animating = true
|
||||||
|
_is_parked = false
|
||||||
|
var tween: Tween = create_tween()
|
||||||
|
tween.set_ease(Tween.EASE_IN)
|
||||||
|
tween.set_trans(Tween.TRANS_QUAD)
|
||||||
|
tween.tween_property(self, "position:x", _parked_x + OFFSCREEN_OFFSET, DRIVE_DURATION)
|
||||||
|
tween.finished.connect(func() -> void:
|
||||||
|
_is_animating = false
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
func _play_stop_bounce() -> void:
|
||||||
|
var tween: Tween = create_tween()
|
||||||
|
tween.tween_property(self, "scale", Vector2(1.08, 0.94), 0.08)
|
||||||
|
tween.tween_property(self, "scale", Vector2(0.96, 1.06), 0.08)
|
||||||
|
tween.tween_property(self, "scale", Vector2(1.0, 1.0), 0.08)
|
||||||
40
scripts/objects/navigation_arrow.gd
Normal file
40
scripts/objects/navigation_arrow.gd
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
## NavigationArrow — tappable button that navigates camera to a specific floor and room.
|
||||||
|
class_name NavigationArrow extends Node2D
|
||||||
|
|
||||||
|
const BUTTON_HALF_SIZE: float = 48.0
|
||||||
|
|
||||||
|
@export var target_floor: int = 0
|
||||||
|
@export var target_room: int = 0
|
||||||
|
@export var label_text: String = "→"
|
||||||
|
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
var label: Label = get_node_or_null("Label") as Label
|
||||||
|
if label != null:
|
||||||
|
label.text = label_text
|
||||||
|
|
||||||
|
|
||||||
|
func _input(event: InputEvent) -> void:
|
||||||
|
var screen_pos: Vector2
|
||||||
|
if event is InputEventScreenTouch and event.pressed:
|
||||||
|
screen_pos = event.position
|
||||||
|
elif event is InputEventMouseButton and event.pressed and event.button_index == MOUSE_BUTTON_LEFT:
|
||||||
|
screen_pos = event.position
|
||||||
|
else:
|
||||||
|
return
|
||||||
|
var canvas_transform: Transform2D = get_viewport().get_canvas_transform()
|
||||||
|
var world_pos: Vector2 = canvas_transform.affine_inverse() * screen_pos
|
||||||
|
var local_pos: Vector2 = to_local(world_pos)
|
||||||
|
if abs(local_pos.x) <= BUTTON_HALF_SIZE and abs(local_pos.y) <= BUTTON_HALF_SIZE:
|
||||||
|
_on_pressed()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_pressed() -> void:
|
||||||
|
RoomNavigator.go_to_room(target_floor, target_room)
|
||||||
|
_play_bounce()
|
||||||
|
|
||||||
|
|
||||||
|
func _play_bounce() -> void:
|
||||||
|
var tween: Tween = create_tween()
|
||||||
|
tween.tween_property(self, "scale", Vector2(1.15, 1.15), 0.08)
|
||||||
|
tween.tween_property(self, "scale", Vector2(1.0, 1.0), 0.08)
|
||||||
@@ -1,12 +1,14 @@
|
|||||||
## RoomNavigator — autoload that moves the Camera2D smoothly between hospital floors.
|
## RoomNavigator — autoload that moves the Camera2D smoothly between hospital floors and rooms.
|
||||||
extends Node
|
extends Node
|
||||||
|
|
||||||
signal room_changed(floor_index: int)
|
signal room_changed(floor_index: int, room_index: int)
|
||||||
|
|
||||||
const FLOOR_HEIGHT: float = 720.0
|
const FLOOR_HEIGHT: float = 720.0
|
||||||
|
const ROOM_WIDTH: float = 1280.0
|
||||||
const CAMERA_TWEEN_DURATION: float = 0.6
|
const CAMERA_TWEEN_DURATION: float = 0.6
|
||||||
|
|
||||||
var _current_floor: int = 0
|
var _current_floor: int = 0
|
||||||
|
var _current_room: int = 0
|
||||||
var _camera: Camera2D
|
var _camera: Camera2D
|
||||||
|
|
||||||
|
|
||||||
@@ -15,16 +17,28 @@ func initialize(camera: Camera2D) -> void:
|
|||||||
|
|
||||||
|
|
||||||
func go_to_floor(floor_index: int) -> void:
|
func go_to_floor(floor_index: int) -> void:
|
||||||
if _camera == null or floor_index == _current_floor:
|
go_to_room(floor_index, 0)
|
||||||
|
|
||||||
|
|
||||||
|
func go_to_room(floor_index: int, room_index: int) -> void:
|
||||||
|
if _camera == null:
|
||||||
|
return
|
||||||
|
if floor_index == _current_floor and room_index == _current_room:
|
||||||
return
|
return
|
||||||
_current_floor = floor_index
|
_current_floor = floor_index
|
||||||
|
_current_room = room_index
|
||||||
|
var target_x: float = room_index * ROOM_WIDTH + ROOM_WIDTH * 0.5
|
||||||
var target_y: float = floor_index * -FLOOR_HEIGHT + FLOOR_HEIGHT * 0.5
|
var target_y: float = floor_index * -FLOOR_HEIGHT + FLOOR_HEIGHT * 0.5
|
||||||
var tween: Tween = create_tween()
|
var tween: Tween = create_tween()
|
||||||
tween.set_ease(Tween.EASE_IN_OUT)
|
tween.set_ease(Tween.EASE_IN_OUT)
|
||||||
tween.set_trans(Tween.TRANS_SINE)
|
tween.set_trans(Tween.TRANS_SINE)
|
||||||
tween.tween_property(_camera, "position:y", target_y, CAMERA_TWEEN_DURATION)
|
tween.tween_property(_camera, "position", Vector2(target_x, target_y), CAMERA_TWEEN_DURATION)
|
||||||
tween.finished.connect(func() -> void: room_changed.emit(floor_index))
|
tween.finished.connect(func() -> void: room_changed.emit(floor_index, room_index))
|
||||||
|
|
||||||
|
|
||||||
func get_current_floor() -> int:
|
func get_current_floor() -> int:
|
||||||
return _current_floor
|
return _current_floor
|
||||||
|
|
||||||
|
|
||||||
|
func get_current_room() -> int:
|
||||||
|
return _current_room
|
||||||
|
|||||||
Reference in New Issue
Block a user