9 Commits

Author SHA1 Message Date
50cd4e716a BG for itch
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 9s
Create tag and build when new code gets to main / Export (push) Successful in 1m30s
2026-02-02 17:05:10 +01:00
a37aeb620d few UX improvements
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 9s
Create tag and build when new code gets to main / Export (push) Successful in 1m44s
2026-02-02 16:58:09 +01:00
effb8769d8 mask snippet
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 13s
Create tag and build when new code gets to main / Export (push) Successful in 1m32s
2026-02-01 18:09:59 +01:00
15f95e5ed0 chara snippet
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 12s
Create tag and build when new code gets to main / Export (push) Successful in 1m30s
2026-02-01 17:43:47 +01:00
a9f2e3c035 change duchess alone pref
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 12s
Create tag and build when new code gets to main / Export (push) Successful in 1m30s
2026-02-01 17:27:39 +01:00
c8a391c72f mask details
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 13s
Create tag and build when new code gets to main / Export (push) Successful in 1m34s
2026-02-01 17:16:57 +01:00
661510d7f6 last minute tuto changes
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 13s
Create tag and build when new code gets to main / Export (push) Successful in 1m30s
2026-02-01 17:10:24 +01:00
f760cecbf7 new assets
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 12s
Create tag and build when new code gets to main / Export (push) Successful in 1m32s
2026-02-01 16:36:27 +01:00
8b4590b980 chara integration and mask position
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 12s
Create tag and build when new code gets to main / Export (push) Successful in 1m37s
2026-02-01 16:33:28 +01:00
39 changed files with 247 additions and 101 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 MiB

After

Width:  |  Height:  |  Size: 2.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 440 KiB

After

Width:  |  Height:  |  Size: 414 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 158 KiB

After

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 KiB

After

Width:  |  Height:  |  Size: 283 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 KiB

After

Width:  |  Height:  |  Size: 159 KiB

View File

@@ -5,7 +5,7 @@ bus/1/name = &"Music"
bus/1/solo = false bus/1/solo = false
bus/1/mute = false bus/1/mute = false
bus/1/bypass_fx = false bus/1/bypass_fx = false
bus/1/volume_db = -9.632782 bus/1/volume_db = -3.7683105
bus/1/send = &"Master" bus/1/send = &"Master"
bus/2/name = &"SFX" bus/2/name = &"SFX"
bus/2/solo = false bus/2/solo = false

BIN
itch/BG.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

View File

@@ -42,6 +42,10 @@ window/size/viewport_width=1920
window/size/viewport_height=1080 window/size/viewport_height=1080
window/stretch/mode="canvas_items" window/stretch/mode="canvas_items"
[dotnet]
project/assembly_name="GGJ26"
[editor_plugins] [editor_plugins]
enabled=PackedStringArray("res://addons/maaacks_game_template/plugin.cfg", "res://addons/resources_spreadsheet_view/plugin.cfg") enabled=PackedStringArray("res://addons/maaacks_game_template/plugin.cfg", "res://addons/resources_spreadsheet_view/plugin.cfg")

View File

@@ -15,9 +15,9 @@
script = ExtResource("2_ilqpx") script = ExtResource("2_ilqpx")
name = "Bishop" name = "Bishop"
chara_sprite = ExtResource("1_ilqpx") chara_sprite = ExtResource("1_ilqpx")
mask_eyes_position = Vector2(58.7, 91.365) mask_eyes_position = Vector2(63.135, 91.365)
mask_eyes_rotation = -0.05934119456780681 mask_eyes_rotation = 0.015707963267948568
mask_mouth_position = Vector2(46.125, 123.665) mask_mouth_position = Vector2(47.37, 103.725)
traits = Array[ExtResource("1_kq1ar")]([ExtResource("6_4wm6o"), ExtResource("9_yew24"), ExtResource("14_lkxga")]) traits = Array[ExtResource("1_kq1ar")]([ExtResource("6_4wm6o"), ExtResource("9_yew24"), ExtResource("14_lkxga")])
preferences = Dictionary[ExtResource("1_kq1ar"), int]({ preferences = Dictionary[ExtResource("1_kq1ar"), int]({
ExtResource("3_kbmal"): 4, ExtResource("3_kbmal"): 4,

View File

@@ -15,7 +15,7 @@
script = ExtResource("2_cyb15") script = ExtResource("2_cyb15")
name = "Duchex" name = "Duchex"
chara_sprite = ExtResource("1_tppor") chara_sprite = ExtResource("1_tppor")
mask_eyes_position = Vector2(61.445, 168.635) mask_eyes_position = Vector2(78.08, 232.575)
mask_eyes_rotation = -0.06981317007977318 mask_eyes_rotation = -0.06981317007977318
mask_mouth_position = Vector2(76.505, 203.355) mask_mouth_position = Vector2(76.505, 203.355)
mask_mouth_rotation = -0.05235987755982989 mask_mouth_rotation = -0.05235987755982989

View File

@@ -15,9 +15,9 @@
script = ExtResource("2_ce0p8") script = ExtResource("2_ce0p8")
name = "Duke" name = "Duke"
chara_sprite = ExtResource("1_d1fpd") chara_sprite = ExtResource("1_d1fpd")
mask_eyes_position = Vector2(-23.295, -0.335) mask_eyes_position = Vector2(-9.205, -13.46)
mask_eyes_rotation = -0.03490658503988659 mask_eyes_rotation = -0.03490658503988659
mask_mouth_position = Vector2(-1.83, 2.27) mask_mouth_position = Vector2(4.755, -2.32)
traits = Array[ExtResource("3_n21sh")]([ExtResource("5_tl7uu"), ExtResource("7_12asi"), ExtResource("9_ce0p8")]) traits = Array[ExtResource("3_n21sh")]([ExtResource("5_tl7uu"), ExtResource("7_12asi"), ExtResource("9_ce0p8")])
preferences = Dictionary[ExtResource("3_n21sh"), int]({ preferences = Dictionary[ExtResource("3_n21sh"), int]({
ExtResource("3_tvmgq"): 0, ExtResource("3_tvmgq"): 0,

View File

@@ -13,8 +13,10 @@
script = ExtResource("2_vlbot") script = ExtResource("2_vlbot")
name = "Farmer" name = "Farmer"
chara_sprite = ExtResource("1_qptnb") chara_sprite = ExtResource("1_qptnb")
mask_eyes_position = Vector2(112.37, 228.755) mask_eyes_position = Vector2(128.185, 164.43)
mask_mouth_position = Vector2(78.295, 132.145) mask_eyes_rotation = 0.11170107212763669
mask_mouth_position = Vector2(106.575, 137.815)
mask_mouth_rotation = 0.07504915783575637
traits = Array[ExtResource("1_jl8hl")]([ExtResource("5_6sspe"), ExtResource("11_tclm6"), ExtResource("10_nvopw")]) traits = Array[ExtResource("1_jl8hl")]([ExtResource("5_6sspe"), ExtResource("11_tclm6"), ExtResource("10_nvopw")])
preferences = Dictionary[ExtResource("1_jl8hl"), int]({ preferences = Dictionary[ExtResource("1_jl8hl"), int]({
ExtResource("3_s3hb5"): 4, ExtResource("3_s3hb5"): 4,

View File

@@ -15,10 +15,10 @@
script = ExtResource("3_vvog1") script = ExtResource("3_vvog1")
name = "King" name = "King"
chara_sprite = ExtResource("1_u46dm") chara_sprite = ExtResource("1_u46dm")
mask_eyes_position = Vector2(6.675, -38.825) mask_eyes_position = Vector2(12.56, -38.825)
mask_eyes_rotation = 0.06981317007977318 mask_eyes_rotation = 0.06981317007977318
mask_mouth_position = Vector2(-12.43, -47.06) mask_mouth_position = Vector2(12.375, -68.335)
mask_mouth_rotation = -0.12915436464757998 mask_mouth_rotation = 0.019198621771938023
traits = Array[ExtResource("4_0s3fj")]([ExtResource("7_j8s63"), ExtResource("6_vvog1"), ExtResource("9_teajx")]) traits = Array[ExtResource("4_0s3fj")]([ExtResource("7_j8s63"), ExtResource("6_vvog1"), ExtResource("9_teajx")])
preferences = Dictionary[ExtResource("4_0s3fj"), int]({ preferences = Dictionary[ExtResource("4_0s3fj"), int]({
ExtResource("6_u46dm"): 0, ExtResource("6_u46dm"): 0,

View File

@@ -16,9 +16,9 @@
script = ExtResource("2_tdxmb") script = ExtResource("2_tdxmb")
name = "Knight" name = "Knight"
chara_sprite = ExtResource("1_3vdcn") chara_sprite = ExtResource("1_3vdcn")
mask_eyes_position = Vector2(-94.815, 12.665) mask_eyes_position = Vector2(-103.465, -11.925)
mask_eyes_rotation = 0.029670597283903404 mask_eyes_rotation = -0.026179938779914945
mask_mouth_position = Vector2(-84.16, -17.325) mask_mouth_position = Vector2(-76.23, -5.335)
mask_mouth_rotation = 0.029670597283903404 mask_mouth_rotation = 0.029670597283903404
traits = Array[ExtResource("1_iqt1j")]([ExtResource("3_bsgk7"), ExtResource("4_aiy02"), ExtResource("7_5qve6"), ExtResource("11_xxla0")]) traits = Array[ExtResource("1_iqt1j")]([ExtResource("3_bsgk7"), ExtResource("4_aiy02"), ExtResource("7_5qve6"), ExtResource("11_xxla0")])
preferences = Dictionary[ExtResource("1_iqt1j"), int]({ preferences = Dictionary[ExtResource("1_iqt1j"), int]({

View File

@@ -15,8 +15,9 @@
script = ExtResource("2_8e28v") script = ExtResource("2_8e28v")
name = "Nun" name = "Nun"
chara_sprite = ExtResource("1_8e28v") chara_sprite = ExtResource("1_8e28v")
mask_eyes_position = Vector2(156.99, 241.13) mask_eyes_position = Vector2(159.75, 247.26)
mask_mouth_position = Vector2(151.42, 203.93) mask_eyes_rotation = 0.07504915783575637
mask_mouth_position = Vector2(152.9, 203.93)
mask_mouth_rotation = 0.029670597283903404 mask_mouth_rotation = 0.029670597283903404
traits = Array[ExtResource("1_83ubb")]([ExtResource("8_yhtr4"), ExtResource("10_emld2"), ExtResource("14_1axfg")]) traits = Array[ExtResource("1_83ubb")]([ExtResource("8_yhtr4"), ExtResource("10_emld2"), ExtResource("14_1axfg")])
preferences = Dictionary[ExtResource("1_83ubb"), int]({ preferences = Dictionary[ExtResource("1_83ubb"), int]({

View File

@@ -14,9 +14,10 @@
script = ExtResource("2_ef0f3") script = ExtResource("2_ef0f3")
name = "Prince" name = "Prince"
chara_sprite = ExtResource("1_ef0f3") chara_sprite = ExtResource("1_ef0f3")
mask_eyes_position = Vector2(104.295, 9.395) mask_eyes_position = Vector2(106.405, -3.38)
mask_eyes_rotation = -0.017453292519943295 mask_eyes_rotation = -0.017453292519943295
mask_mouth_position = Vector2(88.32, -14.73) mask_mouth_position = Vector2(79.52, -53.32)
mask_mouth_rotation = 0.038397243543875054
traits = Array[ExtResource("1_3d6c6")]([ExtResource("8_bwj4q"), ExtResource("7_drjus"), ExtResource("14_6apw1")]) traits = Array[ExtResource("1_3d6c6")]([ExtResource("8_bwj4q"), ExtResource("7_drjus"), ExtResource("14_6apw1")])
preferences = Dictionary[ExtResource("1_3d6c6"), int]({ preferences = Dictionary[ExtResource("1_3d6c6"), int]({
ExtResource("5_33mra"): 0, ExtResource("5_33mra"): 0,

View File

@@ -15,8 +15,8 @@
script = ExtResource("2_g8bvo") script = ExtResource("2_g8bvo")
name = "Queen" name = "Queen"
chara_sprite = ExtResource("1_d1164") chara_sprite = ExtResource("1_d1164")
mask_eyes_position = Vector2(48, 187.345) mask_eyes_position = Vector2(47.78, 170.79)
mask_eyes_rotation = 0.05235987755982989 mask_eyes_rotation = 0.03316125578789186
mask_mouth_position = Vector2(31.595, 176.245) mask_mouth_position = Vector2(31.595, 176.245)
mask_mouth_rotation = 0.01745329251994329 mask_mouth_rotation = 0.01745329251994329
traits = Array[ExtResource("3_dkw07")]([ExtResource("3_y3hrs"), ExtResource("8_j0xhd"), ExtResource("9_hdamc"), ExtResource("12_4ysbx")]) traits = Array[ExtResource("3_dkw07")]([ExtResource("3_y3hrs"), ExtResource("8_j0xhd"), ExtResource("9_hdamc"), ExtResource("12_4ysbx")])

View File

@@ -0,0 +1,11 @@
[gd_resource type="Resource" script_class="MaskedChara" format=3 uid="uid://dw8ckdqphstum"]
[ext_resource type="Resource" uid="uid://c2v05fqr7cwll" path="res://resources/characters/bishop.tres" id="1_1jsty"]
[ext_resource type="Script" uid="uid://b8peyg02l0mrn" path="res://scenes/managers/masked_chara.gd" id="2_bjdg5"]
[ext_resource type="Resource" uid="uid://vsvgpvluq7sh" path="res://resources/masks/blind.tres" id="2_ilfyw"]
[resource]
script = ExtResource("2_bjdg5")
character = ExtResource("1_1jsty")
face_mask = ExtResource("2_ilfyw")
metadata/_custom_type_script = "uid://b8peyg02l0mrn"

View File

@@ -0,0 +1,9 @@
[gd_resource type="Resource" script_class="MaskedChara" format=3 uid="uid://k561jqkq8jpa"]
[ext_resource type="Resource" uid="uid://c2v05fqr7cwll" path="res://resources/characters/bishop.tres" id="1_srvwa"]
[ext_resource type="Script" uid="uid://b8peyg02l0mrn" path="res://scenes/managers/masked_chara.gd" id="3_u3km6"]
[resource]
script = ExtResource("3_u3km6")
character = ExtResource("1_srvwa")
metadata/_custom_type_script = "uid://b8peyg02l0mrn"

View File

@@ -0,0 +1,11 @@
[gd_resource type="Resource" script_class="MaskedChara" format=3 uid="uid://bhigq5xthp5ee"]
[ext_resource type="Resource" uid="uid://c87odmn680x7" path="res://resources/characters/duchex.tres" id="1_2k678"]
[ext_resource type="Script" uid="uid://b8peyg02l0mrn" path="res://scenes/managers/masked_chara.gd" id="2_lfr00"]
[ext_resource type="Resource" uid="uid://kau80jesm22w" path="res://resources/masks/falsy.tres" id="2_r25b7"]
[resource]
script = ExtResource("2_lfr00")
character = ExtResource("1_2k678")
mouth_mask = ExtResource("2_r25b7")
metadata/_custom_type_script = "uid://b8peyg02l0mrn"

View File

@@ -0,0 +1,11 @@
[gd_resource type="Resource" script_class="MaskedChara" format=3 uid="uid://bbnabwyoewgym"]
[ext_resource type="Resource" uid="uid://gy4ygqrjj5ys" path="res://resources/characters/duke.tres" id="1_iaxr1"]
[ext_resource type="Script" uid="uid://b8peyg02l0mrn" path="res://scenes/managers/masked_chara.gd" id="2_7bwff"]
[ext_resource type="Resource" uid="uid://kau80jesm22w" path="res://resources/masks/falsy.tres" id="2_mhs2o"]
[resource]
script = ExtResource("2_7bwff")
character = ExtResource("1_iaxr1")
mouth_mask = ExtResource("2_mhs2o")
metadata/_custom_type_script = "uid://b8peyg02l0mrn"

View File

@@ -6,7 +6,7 @@
[resource] [resource]
script = ExtResource("2_ncal4") script = ExtResource("2_ncal4")
name = "Mask of the Liar" name = "Mask of the Liar"
description = "Invert all preferences" description = "Invert all traits"
mask_sprite = ExtResource("1_r5drl") mask_sprite = ExtResource("1_r5drl")
region = 1 region = 1
stimuli = 1 stimuli = 1

63
scenes/arrow/arrow.tscn Normal file
View File

@@ -0,0 +1,63 @@
[gd_scene format=3 uid="uid://xwccasmeo5cy"]
[ext_resource type="Script" uid="uid://d3f721y4183yy" path="res://utils/clickable.gd" id="1_8e2im"]
[ext_resource type="Texture2D" uid="uid://cgrudt5ev651p" path="res://assets/ui/arrow_001.png" id="1_uynht"]
[sub_resource type="Animation" id="Animation_ftp6y"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:scale")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(0.5, 0.5)]
}
[sub_resource type="Animation" id="Animation_pd34m"]
resource_name = "idle"
length = 2.0
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:scale")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Vector2(0.5, 0.5), Vector2(0.4, 0.4)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_qjyke"]
_data = {
&"RESET": SubResource("Animation_ftp6y"),
&"idle": SubResource("Animation_pd34m")
}
[sub_resource type="CircleShape2D" id="CircleShape2D_hp5o0"]
radius = 115.15642
[node name="Area2D" type="Area2D" unique_id=1884209541]
script = ExtResource("1_8e2im")
[node name="Arrow001" type="Sprite2D" parent="." unique_id=774581185]
scale = Vector2(0.5, 0.5)
texture = ExtResource("1_uynht")
[node name="AnimationPlayer" type="AnimationPlayer" parent="Arrow001" unique_id=684818971]
libraries/ = SubResource("AnimationLibrary_qjyke")
autoplay = &"idle"
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=9151517]
shape = SubResource("CircleShape2D_hp5o0")
[connection signal="input_event" from="." to="." method="_on_input_event"]
[connection signal="mouse_entered" from="." to="." method="_on_mouse_entered"]
[connection signal="mouse_exited" from="." to="." method="_on_mouse_exited"]

View File

@@ -6,38 +6,31 @@ extends Camera2D
var should_move_right = false var should_move_right = false
var should_move_left = false var should_move_left = false
signal move_to_reception_finished
signal move_to_dining_room_finished
# Called when the node enters the scene tree for the first time. func move_to_reception() -> void:
func _ready() -> void: var camera_tween = get_tree().create_tween()
pass # Replace with function body. camera_tween.set_ease(Tween.EASE_IN_OUT)
camera_tween.set_trans(Tween.TRANS_CUBIC)
camera_tween.tween_property(self, "position", Vector2.ZERO, 0.5)
camera_tween.tween_callback(on_move_to_reception_finished)
func on_move_to_reception_finished() -> void:
move_to_reception_finished.emit()
func move_to_dining_room() -> void:
var camera_tween = get_tree().create_tween()
camera_tween.set_ease(Tween.EASE_IN_OUT)
camera_tween.set_trans(Tween.TRANS_CUBIC)
camera_tween.tween_property(self, "position", Vector2(2720.0, 0), 0.5)
camera_tween.tween_callback(on_move_to_dining_room_finished)
func on_move_to_dining_room_finished() -> void:
move_to_dining_room_finished.emit()
# Called every frame. 'delta' is the elapsed time since the previous frame. func _on_arrow_right_on_clicked() -> void:
func _process(delta: float) -> void: move_to_dining_room()
var limit_left_at_center = limit_left + get_viewport_rect().size.x/2
var limit_right_at_center = limit_right - get_viewport_rect().size.x/2
if position.x < limit_left_at_center:
position.x = limit_left_at_center
if position.x > limit_right_at_center:
position.x = limit_right_at_center
if should_move_right and position.x < limit_right_at_center:
position.x += pan_speed
if should_move_left and position.x > limit_left_at_center:
position.x -= pan_speed
func _on_arrow_left_on_clicked() -> void:
func _on_pan_right_mouse_entered() -> void: move_to_reception()
should_move_right = true
func _on_pan_right_mouse_exited() -> void:
should_move_right = false
func _on_pan_left_mouse_entered() -> void:
should_move_left = true
func _on_pan_left_mouse_exited() -> void:
should_move_left = false

View File

@@ -1,8 +1,8 @@
[gd_scene format=3 uid="uid://bvpyqyftqhy45"] [gd_scene format=3 uid="uid://bvpyqyftqhy45"]
[ext_resource type="Script" uid="uid://dnt4l1eghm1gi" path="res://scenes/character/character.gd" id="1_cuyo6"] [ext_resource type="Script" uid="uid://dnt4l1eghm1gi" path="res://scenes/character/character.gd" id="1_cuyo6"]
[ext_resource type="Resource" uid="uid://i4yr7hqobna7" path="res://resources/characters/prince.tres" id="2_fgi2k"] [ext_resource type="Resource" uid="uid://c2v05fqr7cwll" path="res://resources/characters/bishop.tres" id="2_fgi2k"]
[ext_resource type="Texture2D" uid="uid://c61n5v2xrlwy2" path="res://assets/characters/Perso 5.png" id="3_f8hpl"] [ext_resource type="Texture2D" uid="uid://dmmhwqsi3im3w" path="res://assets/characters/Perso 4.png" id="3_f8hpl"]
[ext_resource type="PackedScene" uid="uid://3jlukpb5hefb" path="res://scenes/mask/mask.tscn" id="3_mutn8"] [ext_resource type="PackedScene" uid="uid://3jlukpb5hefb" path="res://scenes/mask/mask.tscn" id="3_mutn8"]
[sub_resource type="Animation" id="Animation_fgi2k"] [sub_resource type="Animation" id="Animation_fgi2k"]
@@ -164,11 +164,11 @@ chara_resource = ExtResource("2_fgi2k")
texture = ExtResource("3_f8hpl") texture = ExtResource("3_f8hpl")
[node name="MaskMouth" parent="." unique_id=1087336064 instance=ExtResource("3_mutn8")] [node name="MaskMouth" parent="." unique_id=1087336064 instance=ExtResource("3_mutn8")]
position = Vector2(88.32, -14.73) position = Vector2(47.37, 103.725)
[node name="MaskEyes" parent="." unique_id=428968220 instance=ExtResource("3_mutn8")] [node name="MaskEyes" parent="." unique_id=428968220 instance=ExtResource("3_mutn8")]
position = Vector2(104.295, 9.395) position = Vector2(63.135, 91.365)
rotation = -0.017453292 rotation = 0.015707964
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=713965213] [node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=713965213]
libraries/ = SubResource("AnimationLibrary_7ex5l") libraries/ = SubResource("AnimationLibrary_7ex5l")

View File

@@ -14,11 +14,14 @@ var pref_score_name: Dictionary[CharacterResource.Preference, String] = {
CharacterResource.Preference.HATE: "Hates ", CharacterResource.Preference.HATE: "Hates ",
} }
@onready var chara: Sprite2D = $"../GuestList/Chara"
@onready var mask: Sprite2D = $"../MaskList/Mask"
@onready var label: Label = $Label @onready var label: Label = $Label
# Called when the node enters the scene tree for the first time. # Called when the node enters the scene tree for the first time.
func _ready() -> void: func _ready() -> void:
pass # Replace with function body. pass
# Called every frame. 'delta' is the elapsed time since the previous frame. # Called every frame. 'delta' is the elapsed time since the previous frame.
@@ -30,7 +33,7 @@ func set_list(_items):
for i in _items: for i in _items:
print(i.name) print(i.name)
current_item = 0 current_item = 1
if _items.size() == 0: if _items.size() == 0:
items = [] items = []
label.text = "...\n...\n..." label.text = "...\n...\n..."
@@ -43,13 +46,18 @@ func cycle_through_items() -> void:
if items.size() == 0: if items.size() == 0:
label.text = "...\n...\n..." label.text = "...\n...\n..."
return return
current_item += 1 current_item += 1
var index = current_item % items.size() var index = current_item % items.size()
var item = items.get(index) var item = items.get(index)
if item is MaskResource: if item is MaskResource:
mask.visible = true
mask.texture = item.mask_sprite
label.text = "\n\n\n\n" + item.name + "\n\n" + item.description label.text = "\n\n\n\n" + item.name + "\n\n" + item.description
elif item is CharacterResource: elif item is CharacterResource:
chara.visible = true
chara.texture = item.chara_sprite
label.text = item.name + "\n\nTraits\n" label.text = item.name + "\n\nTraits\n"
for guest_trait: Trait in item.traits: for guest_trait: Trait in item.traits:
label.text += guest_trait.name + "\n" label.text += guest_trait.name + "\n"

View File

@@ -34,23 +34,24 @@
[ext_resource type="Resource" uid="uid://dvmr6qryknr2j" path="res://resources/characters/nun.tres" id="26_6miv3"] [ext_resource type="Resource" uid="uid://dvmr6qryknr2j" path="res://resources/characters/nun.tres" id="26_6miv3"]
[ext_resource type="Resource" uid="uid://kau80jesm22w" path="res://resources/masks/falsy.tres" id="26_i6fjx"] [ext_resource type="Resource" uid="uid://kau80jesm22w" path="res://resources/masks/falsy.tres" id="26_i6fjx"]
[ext_resource type="Resource" uid="uid://bfvky2dpu6vv0" path="res://resources/guests/duke_unmasked.tres" id="27_6w6mm"] [ext_resource type="Resource" uid="uid://bfvky2dpu6vv0" path="res://resources/guests/duke_unmasked.tres" id="27_6w6mm"]
[ext_resource type="Resource" uid="uid://cfargib0urafc" path="res://resources/guests/duchex_unmasked.tres" id="27_62f45"]
[ext_resource type="Resource" uid="uid://i4yr7hqobna7" path="res://resources/characters/prince.tres" id="27_yisfj"] [ext_resource type="Resource" uid="uid://i4yr7hqobna7" path="res://resources/characters/prince.tres" id="27_yisfj"]
[ext_resource type="Resource" uid="uid://q3o5oxegjx2" path="res://resources/masks/no_smell.tres" id="28_7dg2i"] [ext_resource type="Resource" uid="uid://q3o5oxegjx2" path="res://resources/masks/no_smell.tres" id="28_7dg2i"]
[ext_resource type="Resource" uid="uid://divy6byhpwgs2" path="res://resources/masks/truthy.tres" id="29_08tbl"] [ext_resource type="Resource" uid="uid://divy6byhpwgs2" path="res://resources/masks/truthy.tres" id="29_08tbl"]
[ext_resource type="Resource" uid="uid://c25kg6um2k1dy" path="res://resources/guests/duchex_mute.tres" id="29_62f45"] [ext_resource type="Resource" uid="uid://c25kg6um2k1dy" path="res://resources/guests/duchex_mute.tres" id="29_62f45"]
[ext_resource type="Resource" uid="uid://dfguca2526tk6" path="res://resources/guests/queen_unmasked.tres" id="30_6g32y"]
[ext_resource type="Resource" uid="uid://im83307vumpx" path="res://resources/guests/queen_blind.tres" id="33_f4j1x"] [ext_resource type="Resource" uid="uid://im83307vumpx" path="res://resources/guests/queen_blind.tres" id="33_f4j1x"]
[ext_resource type="Script" uid="uid://bb0od2qqdx3or" path="res://scenes/main/ready_bell.gd" id="33_tbnf8"] [ext_resource type="Script" uid="uid://bb0od2qqdx3or" path="res://scenes/main/ready_bell.gd" id="33_tbnf8"]
[ext_resource type="Texture2D" uid="uid://c3bxwu75mcl87" path="res://assets/decor/mask_page_held.png" id="35_1k3ck"] [ext_resource type="Texture2D" uid="uid://c3bxwu75mcl87" path="res://assets/decor/mask_page_held.png" id="35_1k3ck"]
[ext_resource type="Texture2D" uid="uid://ce7wdct4e27e1" path="res://assets/decor/reception.png" id="35_62f45"] [ext_resource type="Texture2D" uid="uid://ce7wdct4e27e1" path="res://assets/decor/reception.png" id="35_62f45"]
[ext_resource type="PackedScene" uid="uid://cayrxqnypoytu" path="res://scenes/table/table.tscn" id="35_r1bmu"] [ext_resource type="PackedScene" uid="uid://cayrxqnypoytu" path="res://scenes/table/table.tscn" id="35_r1bmu"]
[ext_resource type="Resource" uid="uid://k561jqkq8jpa" path="res://resources/guests/bishop_unmasked.tres" id="35_yisfj"]
[ext_resource type="Texture2D" uid="uid://cl1a50j64nnlh" path="res://assets/decor/guest_page_held.png" id="36_62f45"] [ext_resource type="Texture2D" uid="uid://cl1a50j64nnlh" path="res://assets/decor/guest_page_held.png" id="36_62f45"]
[ext_resource type="Texture2D" uid="uid://coahojeky8ul7" path="res://assets/decor/bell.png" id="37_6g32y"] [ext_resource type="Texture2D" uid="uid://coahojeky8ul7" path="res://assets/decor/bell.png" id="37_6g32y"]
[ext_resource type="Resource" uid="uid://dw8ckdqphstum" path="res://resources/guests/bishop_blind.tres" id="37_yisfj"]
[ext_resource type="Texture2D" uid="uid://cgl8g5eqy8xm0" path="res://assets/decor/hand_bell.png" id="39_62f45"] [ext_resource type="Texture2D" uid="uid://cgl8g5eqy8xm0" path="res://assets/decor/hand_bell.png" id="39_62f45"]
[ext_resource type="Texture2D" uid="uid://dj267xgqniy2i" path="res://assets/decor/table_item_a_2.png" id="43_jucdw"] [ext_resource type="Texture2D" uid="uid://dj267xgqniy2i" path="res://assets/decor/table_item_a_2.png" id="43_jucdw"]
[ext_resource type="Texture2D" uid="uid://b4u3o7fyryxxq" path="res://assets/decor/table_item_a.png" id="44_6miv3"] [ext_resource type="Texture2D" uid="uid://b4u3o7fyryxxq" path="res://assets/decor/table_item_a.png" id="44_6miv3"]
[ext_resource type="Texture2D" uid="uid://c3jx3y0mbueoo" path="res://assets/ui/arrow_004.png" id="47_6miv3"] [ext_resource type="Texture2D" uid="uid://c3jx3y0mbueoo" path="res://assets/ui/arrow_004.png" id="47_6miv3"]
[ext_resource type="PackedScene" uid="uid://xwccasmeo5cy" path="res://scenes/arrow/arrow.tscn" id="52_ftp6y"]
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_gkmcc"] [sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_gkmcc"]
random_pitch = 1.122462 random_pitch = 1.122462
@@ -96,9 +97,6 @@ Vector2i(-1, -1): {
} }
} }
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ya4ey"]
size = Vector2(512, 1080)
[sub_resource type="Animation" id="Animation_7smn1"] [sub_resource type="Animation" id="Animation_7smn1"]
length = 0.001 length = 0.001
tracks/0/type = "value" tracks/0/type = "value"
@@ -421,13 +419,14 @@ character = NodePath("../Character")
guest_list = NodePath("../GuestList") guest_list = NodePath("../GuestList")
mask_list = NodePath("../MaskList") mask_list = NodePath("../MaskList")
tables = [NodePath("../Table"), NodePath("../Table2"), NodePath("../Table3")] tables = [NodePath("../Table"), NodePath("../Table2"), NodePath("../Table3")]
lvl1_guest_1 = ExtResource("27_62f45") lvl1_guest_1 = ExtResource("35_yisfj")
lvl1_guest_2 = ExtResource("27_6w6mm") lvl1_guest_2 = ExtResource("27_6w6mm")
lvl2_guest_1 = ExtResource("27_62f45") lvl2_guest_1 = ExtResource("27_6w6mm")
lvl2_guest_2 = ExtResource("30_6g32y") lvl2_guest_2 = ExtResource("37_yisfj")
lvl3_guest_1 = ExtResource("33_f4j1x") lvl3_guest_1 = ExtResource("33_f4j1x")
lvl3_guest_2 = ExtResource("29_62f45") lvl3_guest_2 = ExtResource("29_62f45")
lvl3_guest_3 = ExtResource("27_6w6mm") lvl3_guest_3 = ExtResource("27_6w6mm")
dual_mask_probability = 0.1
[node name="Camera2D" type="Camera2D" parent="." unique_id=1166192115] [node name="Camera2D" type="Camera2D" parent="." unique_id=1166192115]
limit_left = -960 limit_left = -960
@@ -439,18 +438,6 @@ position_smoothing_speed = 10.0
script = ExtResource("14_0bhws") script = ExtResource("14_0bhws")
pan_speed = 16.04 pan_speed = 16.04
[node name="PanRight" type="Area2D" parent="Camera2D" unique_id=1684320772]
position = Vector2(960, 0)
[node name="CollisionShape2D" type="CollisionShape2D" parent="Camera2D/PanRight" unique_id=1733069282]
shape = SubResource("RectangleShape2D_ya4ey")
[node name="PanLeft" type="Area2D" parent="Camera2D" unique_id=1942262155]
position = Vector2(-960, 0)
[node name="CollisionShape2D" type="CollisionShape2D" parent="Camera2D/PanLeft" unique_id=77276628]
shape = SubResource("RectangleShape2D_ya4ey")
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=1813843404] [node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=1813843404]
libraries/ = SubResource("AnimationLibrary_hxu8e") libraries/ = SubResource("AnimationLibrary_hxu8e")
@@ -458,7 +445,7 @@ libraries/ = SubResource("AnimationLibrary_hxu8e")
position = Vector2(2711, 22) position = Vector2(2711, 22)
[node name="Table2" parent="." unique_id=141765359 instance=ExtResource("35_r1bmu")] [node name="Table2" parent="." unique_id=141765359 instance=ExtResource("35_r1bmu")]
position = Vector2(2029, 236) position = Vector2(2017, 236)
[node name="Table3" parent="." unique_id=569701756 instance=ExtResource("35_r1bmu")] [node name="Table3" parent="." unique_id=569701756 instance=ExtResource("35_r1bmu")]
position = Vector2(3430, 217) position = Vector2(3430, 217)
@@ -469,16 +456,17 @@ scale = Vector2(0.5, 0.5)
texture = ExtResource("35_62f45") texture = ExtResource("35_62f45")
[node name="TableItemA2" type="Sprite2D" parent="." unique_id=611798307] [node name="TableItemA2" type="Sprite2D" parent="." unique_id=611798307]
position = Vector2(-933, 164) position = Vector2(-882, 149)
scale = Vector2(0.5, 0.5) scale = Vector2(0.4, 0.4)
texture = ExtResource("43_jucdw") texture = ExtResource("43_jucdw")
[node name="TableItemA" type="Sprite2D" parent="." unique_id=1146510015] [node name="TableItemA" type="Sprite2D" parent="." unique_id=1146510015]
position = Vector2(911.00006, 385.00003) position = Vector2(903, 382)
scale = Vector2(0.3, 0.3) scale = Vector2(0.3, 0.3)
texture = ExtResource("44_6miv3") texture = ExtResource("44_6miv3")
[node name="MaskList" parent="." unique_id=437192154 instance=ExtResource("25_6llfj")] [node name="MaskList" parent="." unique_id=437192154 instance=ExtResource("25_6llfj")]
visible = false
position = Vector2(409, 523) position = Vector2(409, 523)
rotation = 0.1675516 rotation = 0.1675516
scale = Vector2(0.99999994, 0.99999994) scale = Vector2(0.99999994, 0.99999994)
@@ -489,6 +477,10 @@ scale = Vector2(0.5, 0.5)
texture = ExtResource("35_1k3ck") texture = ExtResource("35_1k3ck")
flip_h = true flip_h = true
[node name="Mask" type="Sprite2D" parent="MaskList" unique_id=383750220]
position = Vector2(128.84132, -293.59827)
scale = Vector2(0.15, 0.15)
[node name="Arrow005" type="Sprite2D" parent="MaskList" unique_id=993186332] [node name="Arrow005" type="Sprite2D" parent="MaskList" unique_id=993186332]
position = Vector2(105.81715, 181.90033) position = Vector2(105.81715, 181.90033)
rotation = 0.03710282 rotation = 0.03710282
@@ -496,6 +488,7 @@ scale = Vector2(0.5, 0.5)
texture = ExtResource("47_6miv3") texture = ExtResource("47_6miv3")
[node name="GuestList" parent="." unique_id=2089675317 instance=ExtResource("25_6llfj")] [node name="GuestList" parent="." unique_id=2089675317 instance=ExtResource("25_6llfj")]
visible = false
position = Vector2(-409, 523) position = Vector2(-409, 523)
rotation = -0.16732943 rotation = -0.16732943
@@ -504,6 +497,10 @@ position = Vector2(-224.08743, 155.85515)
scale = Vector2(0.6, 0.6) scale = Vector2(0.6, 0.6)
texture = ExtResource("36_62f45") texture = ExtResource("36_62f45")
[node name="Chara" type="Sprite2D" parent="GuestList" unique_id=275662105]
position = Vector2(179.2679, -334.8194)
scale = Vector2(0.08, 0.08)
[node name="Arrow004" type="Sprite2D" parent="GuestList" unique_id=1454132163] [node name="Arrow004" type="Sprite2D" parent="GuestList" unique_id=1454132163]
position = Vector2(154.4564, 262.38947) position = Vector2(154.4564, 262.38947)
rotation = -0.011010677 rotation = -0.011010677
@@ -531,13 +528,16 @@ texture = ExtResource("39_62f45")
libraries/ = SubResource("AnimationLibrary_6g32y") libraries/ = SubResource("AnimationLibrary_6g32y")
autoplay = &"idle" autoplay = &"idle"
[node name="ArrowRight" parent="." unique_id=774581185 instance=ExtResource("52_ftp6y")]
position = Vector2(828, 7)
[node name="ArrowLeft" parent="." unique_id=1884209541 instance=ExtResource("52_ftp6y")]
position = Vector2(1810, -241)
rotation = 3.1415927
[connection signal="defeat_noise" from="GameManager" to="." method="_on_game_manager_defeat_noise"] [connection signal="defeat_noise" from="GameManager" to="." method="_on_game_manager_defeat_noise"]
[connection signal="ring_bell_noise" from="GameManager" to="." method="_on_game_manager_ring_bell_noise"] [connection signal="ring_bell_noise" from="GameManager" to="." method="_on_game_manager_ring_bell_noise"]
[connection signal="victory_noise" from="GameManager" to="." method="_on_game_manager_victory_noise"] [connection signal="victory_noise" from="GameManager" to="." method="_on_game_manager_victory_noise"]
[connection signal="mouse_entered" from="Camera2D/PanRight" to="Camera2D" method="_on_pan_right_mouse_entered"]
[connection signal="mouse_exited" from="Camera2D/PanRight" to="Camera2D" method="_on_pan_right_mouse_exited"]
[connection signal="mouse_entered" from="Camera2D/PanLeft" to="Camera2D" method="_on_pan_left_mouse_entered"]
[connection signal="mouse_exited" from="Camera2D/PanLeft" to="Camera2D" method="_on_pan_left_mouse_exited"]
[connection signal="seat_clicked" from="Table" to="GameManager" method="on_seat_clicked"] [connection signal="seat_clicked" from="Table" to="GameManager" method="on_seat_clicked"]
[connection signal="seat_clicked" from="Table2" to="GameManager" method="on_seat_clicked"] [connection signal="seat_clicked" from="Table2" to="GameManager" method="on_seat_clicked"]
[connection signal="seat_clicked" from="Table3" to="GameManager" method="on_seat_clicked"] [connection signal="seat_clicked" from="Table3" to="GameManager" method="on_seat_clicked"]
@@ -550,3 +550,5 @@ autoplay = &"idle"
[connection signal="input_event" from="ReadyBell" to="GameManager" method="_on_ready_bell_input_event"] [connection signal="input_event" from="ReadyBell" to="GameManager" method="_on_ready_bell_input_event"]
[connection signal="mouse_entered" from="ReadyBell" to="ReadyBell" method="_on_mouse_entered"] [connection signal="mouse_entered" from="ReadyBell" to="ReadyBell" method="_on_mouse_entered"]
[connection signal="mouse_exited" from="ReadyBell" to="ReadyBell" method="_on_mouse_exited"] [connection signal="mouse_exited" from="ReadyBell" to="ReadyBell" method="_on_mouse_exited"]
[connection signal="on_clicked" from="ArrowRight" to="Camera2D" method="_on_arrow_right_on_clicked"]
[connection signal="on_clicked" from="ArrowLeft" to="Camera2D" method="_on_arrow_left_on_clicked"]

View File

@@ -126,33 +126,39 @@ func compute_ending():
func ending_tween_cb(): func ending_tween_cb():
var final_score = 0.0 var final_score = 0.0
for table in tables: var table1_score = tables[0].compute_score()
final_score += table.compute_score() var table2_score = tables[1].compute_score()
var table3_score = tables[2].compute_score()
final_score = table1_score + table2_score + table3_score
print("Final score: %s" % final_score) print("Final score: %s" % final_score)
var is_defeat = table1_score < 0 or table2_score < 0 or table3_score < 0
if final_score < 0: if is_defeat:
defeat_noise.emit() defeat_noise.emit()
else: else:
victory_noise.emit() victory_noise.emit()
await get_tree().create_timer(5).timeout await get_tree().create_timer(4).timeout
var camera_tween = get_tree().create_tween() var camera_tween = get_tree().create_tween()
camera_tween.set_ease(Tween.EASE_IN_OUT) camera_tween.set_ease(Tween.EASE_IN_OUT)
camera_tween.set_trans(Tween.TRANS_CUBIC) camera_tween.set_trans(Tween.TRANS_CUBIC)
camera_tween.tween_property(camera_2d, "position", Vector2.ZERO, 1.0) camera_tween.tween_property(camera_2d, "position", Vector2.ZERO, 0.5)
await get_tree().create_timer(0.5).timeout
# Progress levels # Progress levels
current_game_state = GameState.READY current_game_state = GameState.READY
ring_bell.visible = true ring_bell.visible = true
bell_anim_player.play("idle") bell_anim_player.play("idle")
if is_defeat:
return
if current_level == Levels.LVL1 and final_score >= 0: if current_level == Levels.LVL1:
current_level = Levels.LVL2 current_level = Levels.LVL2
elif current_level == Levels.LVL2: elif current_level == Levels.LVL2:
current_level = Levels.LVL3 current_level = Levels.LVL3
elif final_score >= 0: else:
roster_size += 1 roster_size += 1
current_level = Levels.RANDOM current_level = Levels.RANDOM
@@ -161,7 +167,6 @@ func _ready() -> void:
character.visible = false character.visible = false
func _on_ready_bell_input_event(viewport: Node, event: InputEvent, shape_idx: int) -> void: func _on_ready_bell_input_event(viewport: Node, event: InputEvent, shape_idx: int) -> void:
if event is InputEventMouseButton and event.is_pressed(): if event is InputEventMouseButton and event.is_pressed():
ring_bell_noise.emit() ring_bell_noise.emit()
@@ -175,10 +180,12 @@ func on_ready_bell_pressed() -> void:
for table in tables: for table in tables:
table.initialize() table.initialize()
guest_list.visible = true
if current_level == Levels.LVL1: if current_level == Levels.LVL1:
current_chara_roster = [lvl1_guest_1, lvl1_guest_2] current_chara_roster = [lvl1_guest_1, lvl1_guest_2]
elif current_level == Levels.LVL2: elif current_level == Levels.LVL2:
current_chara_roster = [lvl2_guest_1, lvl2_guest_2] current_chara_roster = [lvl2_guest_1, lvl2_guest_2]
mask_list.visible = true
elif current_level == Levels.LVL3: elif current_level == Levels.LVL3:
current_chara_roster = [lvl3_guest_1, lvl3_guest_2, lvl3_guest_3] current_chara_roster = [lvl3_guest_1, lvl3_guest_2, lvl3_guest_3]
else: else:

View File

@@ -41,7 +41,7 @@ func compute_score(other_guests: Array[MaskedChara]) -> float:
for guest_trait in guest_traits: for guest_trait in guest_traits:
var trait_strength = 0.0 var trait_strength = 0.0
for stimuli in guest_trait.stimulis: for stimuli in guest_trait.stimulis:
var strength = stimuli var strength = 1.0
if guest_mouth_mask != null and stimuli == guest_mouth_mask.stimuli: if guest_mouth_mask != null and stimuli == guest_mouth_mask.stimuli:
strength *= guest_mouth_mask.stimuli_multiplier strength *= guest_mouth_mask.stimuli_multiplier
if face_mask != null and stimuli == face_mask.stimuli: if face_mask != null and stimuli == face_mask.stimuli:
@@ -51,6 +51,7 @@ func compute_score(other_guests: Array[MaskedChara]) -> float:
var preference = character.preferences.get(guest_trait) if guest_trait in character.preferences else CharacterResource.Preference.DONT_CARE var preference = character.preferences.get(guest_trait) if guest_trait in character.preferences else CharacterResource.Preference.DONT_CARE
var score_multiplier = pref_score_map.get(preference) if preference in pref_score_map else 0.0 var score_multiplier = pref_score_map.get(preference) if preference in pref_score_map else 0.0
guest_appreciation += trait_strength*score_multiplier guest_appreciation += trait_strength*score_multiplier
print(guest_appreciation)
overall_score += guest_appreciation overall_score += guest_appreciation

View File

@@ -1,8 +1,8 @@
[gd_scene format=3 uid="uid://3jlukpb5hefb"] [gd_scene format=3 uid="uid://3jlukpb5hefb"]
[ext_resource type="Script" uid="uid://cfo3mk5f2q3ej" path="res://scenes/mask/mask.gd" id="1_61b51"] [ext_resource type="Script" uid="uid://cfo3mk5f2q3ej" path="res://scenes/mask/mask.gd" id="1_61b51"]
[ext_resource type="Resource" uid="uid://vsvgpvluq7sh" path="res://resources/masks/blind.tres" id="2_0pm64"] [ext_resource type="Resource" uid="uid://t2n1q71ce4x6" path="res://resources/masks/deaf.tres" id="2_0pm64"]
[ext_resource type="Texture2D" uid="uid://sf7sjug1spau" path="res://assets/masks/Masque 1.png" id="3_htpgb"] [ext_resource type="Texture2D" uid="uid://bi2qq11fbn2yd" path="res://assets/masks/Masque 2.png" id="3_htpgb"]
[node name="Mask" type="Node2D" unique_id=428968220] [node name="Mask" type="Node2D" unique_id=428968220]
script = ExtResource("1_61b51") script = ExtResource("1_61b51")

View File

@@ -32,6 +32,7 @@ func initialize() -> void:
func compute_score() -> float: func compute_score() -> float:
if seat_1.guest == null and seat_2.guest == null and seat_2.guest == null: if seat_1.guest == null and seat_2.guest == null and seat_2.guest == null:
print("No guests at table %s" % name)
return 0.0 return 0.0
var score_guest1 = seat_1.guest.compute_score([seat_2.guest, seat_3.guest]) if seat_1.guest != null else 0.0 var score_guest1 = seat_1.guest.compute_score([seat_2.guest, seat_3.guest]) if seat_1.guest != null else 0.0
@@ -40,6 +41,7 @@ func compute_score() -> float:
var table_score = score_guest1 + score_guest2 + score_guest3 var table_score = score_guest1 + score_guest2 + score_guest3
print(table_score)
table.visible = false table.visible = false
table_defeat.visible = table_score < 0 table_defeat.visible = table_score < 0
table_victory.visible = table_score >= 0 table_victory.visible = table_score >= 0

19
utils/clickable.gd Normal file
View File

@@ -0,0 +1,19 @@
extends Area2D
class_name Clickable
signal on_clicked
func _on_mouse_entered() -> void:
Input.set_default_cursor_shape(Input.CursorShape.CURSOR_POINTING_HAND)
func _on_mouse_exited() -> void:
Input.set_default_cursor_shape(Input.CursorShape.CURSOR_ARROW)
func _on_input_event(viewport: Node, event: InputEvent, shape_idx: int) -> void:
if event is InputEventMouseButton and event.is_pressed():
Input.set_default_cursor_shape(Input.CursorShape.CURSOR_ARROW)
on_clicked.emit()

1
utils/clickable.gd.uid Normal file
View File

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