Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 50cd4e716a | |||
| a37aeb620d | |||
| effb8769d8 | |||
| 15f95e5ed0 |
Binary file not shown.
Binary file not shown.
BIN
itch/BG.png
Normal file
BIN
itch/BG.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 MiB |
@@ -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")
|
||||||
|
|||||||
63
scenes/arrow/arrow.tscn
Normal file
63
scenes/arrow/arrow.tscn
Normal 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"]
|
||||||
@@ -6,44 +6,31 @@ extends Camera2D
|
|||||||
var should_move_right = false
|
var should_move_right = false
|
||||||
var should_move_left = false
|
var should_move_left = false
|
||||||
|
|
||||||
@onready var arrow_001: Sprite2D = $"../Arrow001"
|
signal move_to_reception_finished
|
||||||
@onready var arrow_002: Sprite2D = $"../Arrow002"
|
signal move_to_dining_room_finished
|
||||||
|
|
||||||
|
func move_to_reception() -> 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.ZERO, 0.5)
|
||||||
|
camera_tween.tween_callback(on_move_to_reception_finished)
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
func on_move_to_reception_finished() -> void:
|
||||||
func _ready() -> void:
|
move_to_reception_finished.emit()
|
||||||
pass # Replace with function body.
|
|
||||||
|
|
||||||
|
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)
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
func on_move_to_dining_room_finished() -> void:
|
||||||
func _process(delta: float) -> void:
|
move_to_dining_room_finished.emit()
|
||||||
arrow_001.visible = position.x <= 440.0
|
|
||||||
arrow_002.visible = position.x >= 2076.0
|
|
||||||
|
|
||||||
var limit_left_at_center = limit_left + get_viewport_rect().size.x/2
|
func _on_arrow_right_on_clicked() -> void:
|
||||||
var limit_right_at_center = limit_right - get_viewport_rect().size.x/2
|
move_to_dining_room()
|
||||||
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:
|
func _on_arrow_left_on_clicked() -> void:
|
||||||
position.x += pan_speed
|
move_to_reception()
|
||||||
if should_move_left and position.x > limit_left_at_center:
|
|
||||||
position.x -= pan_speed
|
|
||||||
|
|
||||||
|
|
||||||
func _on_pan_right_mouse_entered() -> void:
|
|
||||||
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
|
|
||||||
|
|||||||
@@ -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.
|
||||||
@@ -48,8 +51,13 @@ func cycle_through_items() -> void:
|
|||||||
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"
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
[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="Texture2D" uid="uid://cgrudt5ev651p" path="res://assets/ui/arrow_001.png" id="52_yisfj"]
|
[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
|
||||||
@@ -97,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"
|
||||||
@@ -393,44 +390,6 @@ _data = {
|
|||||||
&"idle": SubResource("Animation_62f45")
|
&"idle": SubResource("Animation_62f45")
|
||||||
}
|
}
|
||||||
|
|
||||||
[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")
|
|
||||||
}
|
|
||||||
|
|
||||||
[node name="Main" type="Node2D" unique_id=875553242]
|
[node name="Main" type="Node2D" unique_id=875553242]
|
||||||
script = ExtResource("1_7smn1")
|
script = ExtResource("1_7smn1")
|
||||||
|
|
||||||
@@ -467,6 +426,7 @@ 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
|
||||||
@@ -478,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")
|
||||||
|
|
||||||
@@ -497,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)
|
||||||
@@ -518,6 +466,7 @@ 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)
|
||||||
@@ -528,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
|
||||||
@@ -535,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
|
||||||
|
|
||||||
@@ -543,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
|
||||||
@@ -570,32 +528,16 @@ texture = ExtResource("39_62f45")
|
|||||||
libraries/ = SubResource("AnimationLibrary_6g32y")
|
libraries/ = SubResource("AnimationLibrary_6g32y")
|
||||||
autoplay = &"idle"
|
autoplay = &"idle"
|
||||||
|
|
||||||
[node name="Arrow001" type="Sprite2D" parent="." unique_id=2051768141]
|
[node name="ArrowRight" parent="." unique_id=774581185 instance=ExtResource("52_ftp6y")]
|
||||||
position = Vector2(828, 7)
|
position = Vector2(828, 7)
|
||||||
scale = Vector2(0.5, 0.5)
|
|
||||||
texture = ExtResource("52_yisfj")
|
|
||||||
|
|
||||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="Arrow001" unique_id=23670381]
|
[node name="ArrowLeft" parent="." unique_id=1884209541 instance=ExtResource("52_ftp6y")]
|
||||||
libraries/ = SubResource("AnimationLibrary_qjyke")
|
position = Vector2(1810, -241)
|
||||||
autoplay = &"idle"
|
|
||||||
|
|
||||||
[node name="Arrow002" type="Sprite2D" parent="." unique_id=557480206]
|
|
||||||
position = Vector2(1631.9999, 4.9999995)
|
|
||||||
rotation = 3.1415927
|
rotation = 3.1415927
|
||||||
scale = Vector2(0.5, 0.5)
|
|
||||||
texture = ExtResource("52_yisfj")
|
|
||||||
|
|
||||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="Arrow002" unique_id=1862466503]
|
|
||||||
libraries/ = SubResource("AnimationLibrary_qjyke")
|
|
||||||
autoplay = &"idle"
|
|
||||||
|
|
||||||
[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"]
|
||||||
@@ -608,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"]
|
||||||
|
|||||||
@@ -138,12 +138,13 @@ func ending_tween_cb():
|
|||||||
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
|
||||||
@@ -166,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()
|
||||||
@@ -180,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:
|
||||||
|
|||||||
@@ -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
19
utils/clickable.gd
Normal 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
1
utils/clickable.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://d3f721y4183yy
|
||||||
Reference in New Issue
Block a user