guest review process
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 7s
Create tag and build when new code gets to main / Export (push) Successful in 1m19s

This commit is contained in:
2026-01-31 15:10:06 +01:00
parent 02dc155183
commit 59b63b0945
15 changed files with 392 additions and 10 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://by4hnqxl0rtwg"
path="res://.godot/imported/environment_wip_001.png-50c1c8212f1ccdf2a3442c25661504bb.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/decor/environment_wip_001.png"
dest_files=["res://.godot/imported/environment_wip_001.png-50c1c8212f1ccdf2a3442c25661504bb.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View File

@@ -0,0 +1,12 @@
[gd_resource type="Resource" script_class="MaskedChara" format=3 uid="uid://ctqdbo8xg3v88"]
[ext_resource type="Script" uid="uid://d26mv2xtvmpqt" path="res://scenes/mask/mask_resource.gd" id="1_mu37d"]
[ext_resource type="Resource" uid="uid://c87odmn680x7" path="res://resources/characters/duchex.tres" id="1_vsvkr"]
[ext_resource type="Script" uid="uid://b8peyg02l0mrn" path="res://scenes/managers/masked_chara.gd" id="2_f07ys"]
[ext_resource type="Resource" uid="uid://cuf1ocb4px4m3" path="res://resources/masks/cat.tres" id="3_4tayd"]
[resource]
script = ExtResource("2_f07ys")
character = ExtResource("1_vsvkr")
masks = Array[ExtResource("1_mu37d")]([ExtResource("3_4tayd")])
metadata/_custom_type_script = "uid://b8peyg02l0mrn"

View File

@@ -0,0 +1,10 @@
[gd_resource type="Resource" script_class="MaskedChara" format=3 uid="uid://bk7f67x08r8vm"]
[ext_resource type="Resource" uid="uid://da2ptl3f7h0ot" path="res://resources/characters/king.tres" id="1_aaqo2"]
[ext_resource type="Script" uid="uid://d26mv2xtvmpqt" path="res://scenes/mask/mask_resource.gd" id="1_evtq7"]
[ext_resource type="Script" uid="uid://b8peyg02l0mrn" path="res://scenes/managers/masked_chara.gd" id="2_aaqo2"]
[resource]
script = ExtResource("2_aaqo2")
character = ExtResource("1_aaqo2")
metadata/_custom_type_script = "uid://b8peyg02l0mrn"

View File

@@ -0,0 +1,10 @@
[gd_resource type="Resource" script_class="MaskedChara" format=3 uid="uid://dfguca2526tk6"]
[ext_resource type="Resource" uid="uid://wq3g1j3l4gl6" path="res://resources/characters/queen.tres" id="1_3qy23"]
[ext_resource type="Script" uid="uid://d26mv2xtvmpqt" path="res://scenes/mask/mask_resource.gd" id="1_fompr"]
[ext_resource type="Script" uid="uid://b8peyg02l0mrn" path="res://scenes/managers/masked_chara.gd" id="2_3qy23"]
[resource]
script = ExtResource("2_3qy23")
character = ExtResource("1_3qy23")
metadata/_custom_type_script = "uid://b8peyg02l0mrn"

View File

@@ -0,0 +1,12 @@
[gd_resource type="Resource" script_class="MaskedChara" format=3 uid="uid://ca2fcdibf0mdm"]
[ext_resource type="Script" uid="uid://d26mv2xtvmpqt" path="res://scenes/mask/mask_resource.gd" id="1_ns508"]
[ext_resource type="Resource" uid="uid://wq3g1j3l4gl6" path="res://resources/characters/queen.tres" id="1_xr5g8"]
[ext_resource type="Script" uid="uid://b8peyg02l0mrn" path="res://scenes/managers/masked_chara.gd" id="2_5n8mj"]
[ext_resource type="Resource" uid="uid://cbcqtj8mxngfy" path="res://resources/masks/unracist.tres" id="3_ugmdk"]
[resource]
script = ExtResource("2_5n8mj")
character = ExtResource("1_xr5g8")
masks = Array[ExtResource("1_ns508")]([ExtResource("3_ugmdk")])
metadata/_custom_type_script = "uid://b8peyg02l0mrn"

View File

@@ -3,7 +3,7 @@ extends Node
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
print("coucou")
pass
# Called every frame. 'delta' is the elapsed time since the previous frame.

View File

@@ -11,6 +11,8 @@ class_name Character
@onready var mask_eyes: Mask = $MaskEyes
@onready var mask_mouth: Mask = $MaskMouth
@onready var animation_player: AnimationPlayer = $AnimationPlayer
func _on_chara_resource_changed() -> void:
if chara_resource == null:
return
@@ -43,3 +45,13 @@ func _engine_process(delta: float) -> void:
mask_eyes.rotation = chara_resource.mask_eyes_rotation
mask_mouth.position = chara_resource.mask_mouth_position
mask_mouth.rotation = chara_resource.mask_mouth_rotation
func come_in() -> void:
print("come ine")
animation_player.play("come_in")
func go_out() -> void:
animation_player.play("go_out")

View File

@@ -5,6 +5,156 @@
[ext_resource type="Texture2D" uid="uid://b60pu6ukbobb2" path="res://assets/sprites/sprites by judas la carotte/sprite1 happy small.png" id="3_f8hpl"]
[ext_resource type="PackedScene" uid="uid://3jlukpb5hefb" path="res://scenes/mask/mask.tscn" id="3_mutn8"]
[sub_resource type="Animation" id="Animation_fgi2k"]
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(1, 1)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath(".:position")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(0, 0)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath(".:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath(".:modulate")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 1)]
}
[sub_resource type="Animation" id="Animation_f8hpl"]
resource_name = "come_in"
length = 1.2
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.2),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Vector2(0.8, 0.8), Vector2(1, 1)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath(".:position")
tracks/1/interp = 2
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.20000002, 0.40000004, 0.6, 0.8000001, 1, 1.2),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1),
"update": 0,
"values": [Vector2(0, 0), Vector2(0, -20), Vector2(0, 0), Vector2(0, -30), Vector2(0, 0), Vector2(0, -40), Vector2(0, 0)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath(".:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath(".:modulate")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0, 1.2),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(0, 0, 0, 1), Color(1, 1, 1, 1)]
}
[sub_resource type="Animation" id="Animation_7ex5l"]
resource_name = "go_out"
length = 1.2
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:modulate")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1.2),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(1, 1, 1, 1), Color(0, 0, 0, 1)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath(".:position")
tracks/1/interp = 2
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.20000002, 0.40000004, 0.6, 0.8000001, 1, 1.2),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1),
"update": 0,
"values": [Vector2(0, 0), Vector2(109.185, -40), Vector2(338.474, 0), Vector2(651.017, -40), Vector2(999.045, 0), Vector2(1314.317, -40), Vector2(1474, 0)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath(".:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 1.2),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [true, false]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_7ex5l"]
_data = {
&"RESET": SubResource("Animation_fgi2k"),
&"come_in": SubResource("Animation_f8hpl"),
&"go_out": SubResource("Animation_7ex5l")
}
[node name="Character" type="Node2D" unique_id=138741531]
script = ExtResource("1_cuyo6")
chara_resource = ExtResource("2_fgi2k")
@@ -17,3 +167,6 @@ position = Vector2(-27.795, -167.255)
[node name="MaskEyes" parent="." unique_id=428968220 instance=ExtResource("3_mutn8")]
position = Vector2(-58.06, -232.2)
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=713965213]
libraries/ = SubResource("AnimationLibrary_7ex5l")

16
scenes/list/list.gd Normal file
View File

@@ -0,0 +1,16 @@
extends Area2D
class_name List
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func set_list(items: Array[Resource]):
print(items)

1
scenes/list/list.gd.uid Normal file
View File

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

View File

@@ -1,10 +1,13 @@
[gd_scene format=3 uid="uid://0rq12xgcteak"]
[ext_resource type="Script" uid="uid://cexbywhlc4ykd" path="res://scenes/list/list.gd" id="1_khygj"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_trceg"]
radius = 198.0
height = 1044.0
[node name="List" type="Area2D" unique_id=36531496]
script = ExtResource("1_khygj")
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=579673425]
shape = SubResource("CapsuleShape2D_trceg")

View File

@@ -20,6 +20,9 @@ func play_list_up_sfx() -> void:
func play_list_down_sfx() -> void:
stream_player.switch_to_clip_by_name("list_down")
func play_list_side_sfx() -> void:
stream_player.switch_to_clip_by_name("list_side")
func _on_guest_list_mouse_entered() -> void:
animation_player.queue("guest_list_up")

View File

@@ -26,7 +26,13 @@
[ext_resource type="Texture2D" uid="uid://cftllq6l7xclt" path="res://icon.svg" id="13_6llfj"]
[ext_resource type="AudioStream" uid="uid://b7pe3ogc8rbvx" path="res://assets/audio/kenney_casino-audio/Audio/card-shove-4.ogg" id="13_i7in8"]
[ext_resource type="Script" uid="uid://cgctwciolfqe5" path="res://scenes/camera/camera_controller.gd" id="14_0bhws"]
[ext_resource type="Texture2D" uid="uid://by4hnqxl0rtwg" path="res://assets/decor/environment_wip_001.png" id="14_62atk"]
[ext_resource type="PackedScene" uid="uid://0rq12xgcteak" path="res://scenes/list/list.tscn" id="25_6llfj"]
[ext_resource type="Resource" uid="uid://dfguca2526tk6" path="res://resources/guests/queen_unmasked.tres" id="26_rofvo"]
[ext_resource type="Resource" uid="uid://bk7f67x08r8vm" path="res://resources/guests/king_unmasked.tres" id="27_tbnf8"]
[ext_resource type="Resource" uid="uid://ca2fcdibf0mdm" path="res://resources/guests/queen_unracist.tres" id="28_r1bmu"]
[ext_resource type="Resource" uid="uid://ctqdbo8xg3v88" path="res://resources/guests/duchex_cat.tres" id="29_6w6mm"]
[ext_resource type="Texture2D" uid="uid://c3bx6kf7frbwk" path="res://example/Random Upgrades/icons/all_icons/all_icons_1.tres" id="29_i7in8"]
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_gkmcc"]
random_pitch = 1.122462
@@ -50,10 +56,10 @@ stream_3/stream = ExtResource("13_i7in8")
[sub_resource type="AudioStreamInteractive" id="AudioStreamInteractive_7smn1"]
clip_count = 2
clip_0/name = &"list_up"
clip_0/name = &"list_side"
clip_0/stream = SubResource("AudioStreamRandomizer_gkmcc")
clip_0/auto_advance = 0
clip_1/name = &"list_down"
clip_1/name = &"list_up"
clip_1/stream = SubResource("AudioStreamRandomizer_7nlll")
clip_1/auto_advance = 0
initial_clip = 1
@@ -297,6 +303,9 @@ _data = {
&"mask_list_up": SubResource("Animation_0bhws")
}
[sub_resource type="CircleShape2D" id="CircleShape2D_62atk"]
radius = 150.0
[node name="Main" type="Node2D" unique_id=875553242]
script = ExtResource("1_7smn1")
@@ -305,13 +314,24 @@ stream = SubResource("AudioStreamInteractive_7smn1")
autoplay = true
bus = &"SFX"
[node name="Character" parent="." unique_id=138741531 instance=ExtResource("2_raeie")]
scale = Vector2(0.5488516, 0.5501616)
[node name="EnvironmentWip001" type="Sprite2D" parent="." unique_id=290861722]
position = Vector2(1286.785, 0)
scale = Vector2(0.5, 0.5)
texture = ExtResource("14_62atk")
[node name="GameManager" type="Node" parent="." unique_id=528989100]
[node name="Character" parent="." unique_id=138741531 instance=ExtResource("2_raeie")]
[node name="GameManager" type="Node" parent="." unique_id=528989100 node_paths=PackedStringArray("character", "guest_list", "mask_list")]
script = ExtResource("3_hxu8e")
character_roster = Array[ExtResource("4_nvumn")]([ExtResource("5_ou6is"), ExtResource("6_necax"), ExtResource("7_r4lks"), ExtResource("8_pg34l")])
mask_roster = Array[ExtResource("9_m4h2d")]([ExtResource("10_p8abn"), ExtResource("11_s17dp"), ExtResource("12_37hlw")])
character = NodePath("../Character")
guest_list = NodePath("../GuestList")
mask_list = NodePath("../MaskList")
lvl1_guest_1 = ExtResource("26_rofvo")
lvl1_guest_2 = ExtResource("27_tbnf8")
lvl2_guest_1 = ExtResource("28_r1bmu")
lvl2_guest_2 = ExtResource("29_6w6mm")
[node name="MaskList" parent="." unique_id=437192154 instance=ExtResource("25_6llfj")]
position = Vector2(409, 523)
@@ -330,12 +350,12 @@ texture = ExtResource("13_6llfj")
[node name="Camera2D" type="Camera2D" parent="." unique_id=1166192115]
limit_left = -960
limit_top = -540
limit_right = 4096
limit_right = 3680
limit_bottom = 540
position_smoothing_enabled = true
position_smoothing_speed = 10.0
script = ExtResource("14_0bhws")
pan_speed = 10.0
pan_speed = 16.04
[node name="PanRight" type="Area2D" parent="Camera2D" unique_id=1684320772]
position = Vector2(960, 0)
@@ -352,6 +372,15 @@ shape = SubResource("RectangleShape2D_ya4ey")
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=1813843404]
libraries/ = SubResource("AnimationLibrary_hxu8e")
[node name="ReadyBell" type="Area2D" parent="." unique_id=1350504622]
position = Vector2(0, 426)
[node name="CollisionShape2D" type="CollisionShape2D" parent="ReadyBell" unique_id=403528288]
shape = SubResource("CircleShape2D_62atk")
[node name="Sprite2D" type="Sprite2D" parent="ReadyBell" unique_id=1323765091]
texture = ExtResource("29_i7in8")
[connection signal="mouse_entered" from="MaskList" to="." method="_on_mask_list_mouse_entered"]
[connection signal="mouse_exited" from="MaskList" to="." method="_on_mask_list_mouse_exited"]
[connection signal="mouse_entered" from="GuestList" to="." method="_on_guest_list_mouse_entered"]
@@ -360,3 +389,4 @@ libraries/ = SubResource("AnimationLibrary_hxu8e")
[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="input_event" from="ReadyBell" to="GameManager" method="_on_ready_bell_input_event"]

View File

@@ -6,6 +6,11 @@ class_name GameManager
@export var character_roster: Array[CharacterResource]
@export var mask_roster: Array[MaskResource]
@export_category("References")
@export var character: Character
@export var guest_list: List
@export var mask_list: List
@export_category("Predetermined levels")
@export_group("Level 1")
@export var lvl1_guest_1: MaskedChara
@@ -33,23 +38,98 @@ enum Levels {
}
var current_game_state = GameState.READY
var current_level = Levels.LVL1
var first_guest = true
func create_new_roster() -> void:
print("Create new roster")
current_chara_roster = []
var already_picked_charas: Array[String] = []
for i in range(max_roster_size):
var chara: CharacterResource = character_roster.pick_random()
# Make sure we don't plan on more people than available
if already_picked_charas.size() >= character_roster.size():
break
# Pick unique characters for the roster
var chara: CharacterResource
var is_chara_already_in_roster = true
while is_chara_already_in_roster:
chara = character_roster.pick_random()
for already_there in already_picked_charas:
if already_there != chara.name:
already_picked_charas.append(chara.name)
is_chara_already_in_roster = false
# Associate a single mask (for now) to the character
var mask: MaskResource = mask_roster.pick_random()
var all_masks: Array[MaskResource] = [mask]
var masked_chara = MaskedChara.new(chara, all_masks)
current_chara_roster.append(masked_chara)
print("Added %s to roster" % chara.name)
func on_ready_bell_pressed() -> void:
if(current_game_state != GameState.READY):
return
print("ready bell pressed")
if current_level == Levels.LVL1:
print("prepare_level_one")
current_chara_roster = [lvl1_guest_1, lvl1_guest_2]
elif current_level == Levels.LVL2:
print("prepare_level_two")
current_chara_roster = [lvl2_guest_1, lvl2_guest_2]
else:
create_new_roster()
current_game_state = GameState.GUEST_REVIEW
first_guest = true
review_next_guest()
func review_next_guest():
# See previous guest out
if not first_guest:
character.go_out()
var timer = get_tree().create_timer(2)
await timer.timeout
# Check if we have more guests, if not we go to the ending
print(current_chara_roster)
var guest: MaskedChara = current_chara_roster.pop_front()
if guest == null:
current_game_state = GameState.FINISHED
compute_ending()
return
# Process next guest
print("Guest is %s" % guest.character.name)
character.chara_resource = guest.character
var eyes_mask_index = guest.masks.find_custom(func(mask: MaskResource): return mask.region == MaskResource.Region.EYES)
var mouth_mask_index = guest.masks.find_custom(func(mask: MaskResource): return mask.region == MaskResource.Region.MOUTH)
if eyes_mask_index != -1:
character.mask_eyes.mask_resource = guest.masks[eyes_mask_index]
if mouth_mask_index != -1:
character.mask_mouth.mask_resource = guest.masks[mouth_mask_index]
first_guest = false
character.come_in()
func compute_ending():
print("to ending")
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
character.visible = false
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func _on_ready_bell_input_event(viewport: Node, event: InputEvent, shape_idx: int) -> void:
if event is InputEventMouseButton and event.is_pressed():
if current_game_state == GameState.READY:
on_ready_bell_pressed()
else: # debug
review_next_guest()