Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 45bf0f5e45 | |||
| f39dc0df86 | |||
| 59b63b0945 | |||
| 02dc155183 | |||
| da655ed9b7 | |||
| f2dcd332f4 | |||
| 6640ccace8 |
BIN
assets/characters/Perso 1.png
Normal file
BIN
assets/characters/Perso 1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 MiB |
40
assets/characters/Perso 1.png.import
Normal file
40
assets/characters/Perso 1.png.import
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://dwy3kklywl0ci"
|
||||||
|
path="res://.godot/imported/Perso 1.png-9a3fe614fc1ec0311763317776c3a444.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/characters/Perso 1.png"
|
||||||
|
dest_files=["res://.godot/imported/Perso 1.png-9a3fe614fc1ec0311763317776c3a444.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
|
||||||
BIN
assets/characters/Perso 2.png
Normal file
BIN
assets/characters/Perso 2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 MiB |
40
assets/characters/Perso 2.png.import
Normal file
40
assets/characters/Perso 2.png.import
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://c726frtpkk1a8"
|
||||||
|
path="res://.godot/imported/Perso 2.png-153e431447e73fbc5fd3cb3d8e8b041f.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/characters/Perso 2.png"
|
||||||
|
dest_files=["res://.godot/imported/Perso 2.png-153e431447e73fbc5fd3cb3d8e8b041f.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
|
||||||
BIN
assets/decor/environment_wip_001.png
Normal file
BIN
assets/decor/environment_wip_001.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.1 MiB |
40
assets/decor/environment_wip_001.png.import
Normal file
40
assets/decor/environment_wip_001.png.import
Normal 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
|
||||||
@@ -5,11 +5,11 @@ 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 = 0.0
|
bus/1/volume_db = -9.632782
|
||||||
bus/1/send = &"Master"
|
bus/1/send = &"Master"
|
||||||
bus/2/name = &"SFX"
|
bus/2/name = &"SFX"
|
||||||
bus/2/solo = false
|
bus/2/solo = false
|
||||||
bus/2/mute = false
|
bus/2/mute = false
|
||||||
bus/2/bypass_fx = false
|
bus/2/bypass_fx = false
|
||||||
bus/2/volume_db = 0.0
|
bus/2/volume_db = -1.4192572
|
||||||
bus/2/send = &"Master"
|
bus/2/send = &"Master"
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ BackgroundMusicPlayer="*uid://djyx7damwjgdg"
|
|||||||
|
|
||||||
window/size/viewport_width=1920
|
window/size/viewport_width=1920
|
||||||
window/size/viewport_height=1080
|
window/size/viewport_height=1080
|
||||||
|
window/stretch/mode="canvas_items"
|
||||||
|
|
||||||
[editor_plugins]
|
[editor_plugins]
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[gd_resource type="Resource" script_class="CharacterResource" format=3 uid="uid://c87odmn680x7"]
|
[gd_resource type="Resource" script_class="CharacterResource" format=3 uid="uid://c87odmn680x7"]
|
||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://cudme4y8elyha" path="res://assets/sprites/sprites by judas la carotte/sprite2 happy.png" id="1_tppor"]
|
[ext_resource type="Texture2D" uid="uid://dwy3kklywl0ci" path="res://assets/characters/Perso 1.png" id="1_tppor"]
|
||||||
[ext_resource type="Script" uid="uid://bwam50qxikpw4" path="res://scenes/character/chara_resource.gd" id="2_cyb15"]
|
[ext_resource type="Script" uid="uid://bwam50qxikpw4" path="res://scenes/character/chara_resource.gd" id="2_cyb15"]
|
||||||
[ext_resource type="Script" uid="uid://cya40uohlvgbr" path="res://scenes/character/trait.gd" id="3_s53hh"]
|
[ext_resource type="Script" uid="uid://cya40uohlvgbr" path="res://scenes/character/trait.gd" id="3_s53hh"]
|
||||||
[ext_resource type="Resource" uid="uid://cefwc4j3p7m3v" path="res://resources/traits/black.tres" id="4_tppor"]
|
[ext_resource type="Resource" uid="uid://cefwc4j3p7m3v" path="res://resources/traits/black.tres" id="4_tppor"]
|
||||||
@@ -10,9 +10,10 @@
|
|||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("2_cyb15")
|
script = ExtResource("2_cyb15")
|
||||||
|
name = "Duchex"
|
||||||
chara_sprite = ExtResource("1_tppor")
|
chara_sprite = ExtResource("1_tppor")
|
||||||
mask_eyes_location = Vector2(-45.45, -247.75)
|
mask_eyes_position = Vector2(59.355, 227)
|
||||||
mask_mouth_location = Vector2(-39.935, -169.95)
|
mask_mouth_position = Vector2(64.8, 432.04)
|
||||||
traits = Array[ExtResource("3_s53hh")]([ExtResource("4_tppor"), ExtResource("5_cyb15"), ExtResource("6_tppor"), ExtResource("7_03y2d")])
|
traits = Array[ExtResource("3_s53hh")]([ExtResource("4_tppor"), ExtResource("5_cyb15"), ExtResource("6_tppor"), ExtResource("7_03y2d")])
|
||||||
preferences = Dictionary[int, int]({
|
preferences = Dictionary[int, int]({
|
||||||
0: 0,
|
0: 0,
|
||||||
|
|||||||
@@ -10,9 +10,11 @@
|
|||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("2_ce0p8")
|
script = ExtResource("2_ce0p8")
|
||||||
|
name = "Duke"
|
||||||
chara_sprite = ExtResource("1_d1fpd")
|
chara_sprite = ExtResource("1_d1fpd")
|
||||||
mask_eyes_location = Vector2(-45.45, -247.75)
|
mask_eyes_position = Vector2(-87.17, -459.345)
|
||||||
mask_mouth_location = Vector2(-39.935, -169.95)
|
mask_eyes_rotation = 0.11693705988361988
|
||||||
|
mask_mouth_position = Vector2(-60.07, -343.01)
|
||||||
traits = Array[ExtResource("3_n21sh")]([ExtResource("4_d1fpd"), ExtResource("5_12asi"), ExtResource("6_12asi"), ExtResource("7_d1fpd")])
|
traits = Array[ExtResource("3_n21sh")]([ExtResource("4_d1fpd"), ExtResource("5_12asi"), ExtResource("6_12asi"), ExtResource("7_d1fpd")])
|
||||||
preferences = Dictionary[int, int]({
|
preferences = Dictionary[int, int]({
|
||||||
5: 0,
|
5: 0,
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("3_vvog1")
|
script = ExtResource("3_vvog1")
|
||||||
|
name = "King"
|
||||||
chara_sprite = ExtResource("1_k1rnw")
|
chara_sprite = ExtResource("1_k1rnw")
|
||||||
mask_eyes_position = Vector2(-21.75, -274.015)
|
mask_eyes_position = Vector2(-21.75, -274.015)
|
||||||
mask_eyes_rotation = 0.06981317007977318
|
mask_eyes_rotation = 0.06981317007977318
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[gd_resource type="Resource" script_class="CharacterResource" format=3 uid="uid://wq3g1j3l4gl6"]
|
[gd_resource type="Resource" script_class="CharacterResource" format=3 uid="uid://wq3g1j3l4gl6"]
|
||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://b60pu6ukbobb2" path="res://assets/sprites/sprites by judas la carotte/sprite1 happy small.png" id="1_g8bvo"]
|
[ext_resource type="Texture2D" uid="uid://c726frtpkk1a8" path="res://assets/characters/Perso 2.png" id="1_d1164"]
|
||||||
[ext_resource type="Script" uid="uid://bwam50qxikpw4" path="res://scenes/character/chara_resource.gd" id="2_g8bvo"]
|
[ext_resource type="Script" uid="uid://bwam50qxikpw4" path="res://scenes/character/chara_resource.gd" id="2_g8bvo"]
|
||||||
[ext_resource type="Script" uid="uid://cya40uohlvgbr" path="res://scenes/character/trait.gd" id="3_dkw07"]
|
[ext_resource type="Script" uid="uid://cya40uohlvgbr" path="res://scenes/character/trait.gd" id="3_dkw07"]
|
||||||
[ext_resource type="Resource" uid="uid://bc376om20da8m" path="res://resources/traits/royal.tres" id="8_d1164"]
|
[ext_resource type="Resource" uid="uid://bc376om20da8m" path="res://resources/traits/royal.tres" id="8_d1164"]
|
||||||
@@ -11,9 +11,10 @@
|
|||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("2_g8bvo")
|
script = ExtResource("2_g8bvo")
|
||||||
chara_sprite = ExtResource("1_g8bvo")
|
name = "Queen"
|
||||||
mask_eyes_location = Vector2(-45.45, -247.75)
|
chara_sprite = ExtResource("1_d1164")
|
||||||
mask_mouth_location = Vector2(-39.935, -169.95)
|
mask_eyes_position = Vector2(13.285, 181.09)
|
||||||
|
mask_mouth_position = Vector2(26.595, 398.745)
|
||||||
traits = Array[ExtResource("3_dkw07")]([ExtResource("9_aywjr"), ExtResource("8_j0xhd"), ExtResource("10_tw1u2"), ExtResource("8_d1164"), ExtResource("11_utmh4")])
|
traits = Array[ExtResource("3_dkw07")]([ExtResource("9_aywjr"), ExtResource("8_j0xhd"), ExtResource("10_tw1u2"), ExtResource("8_d1164"), ExtResource("11_utmh4")])
|
||||||
preferences = Dictionary[int, int]({
|
preferences = Dictionary[int, int]({
|
||||||
5: 2,
|
5: 2,
|
||||||
|
|||||||
12
resources/guests/duchex_cat.tres
Normal file
12
resources/guests/duchex_cat.tres
Normal 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"
|
||||||
10
resources/guests/king_unmasked.tres
Normal file
10
resources/guests/king_unmasked.tres
Normal 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"
|
||||||
10
resources/guests/queen_unmasked.tres
Normal file
10
resources/guests/queen_unmasked.tres
Normal 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"
|
||||||
12
resources/guests/queen_unracist.tres
Normal file
12
resources/guests/queen_unracist.tres
Normal 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"
|
||||||
@@ -3,7 +3,7 @@ extends Node
|
|||||||
|
|
||||||
# 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:
|
||||||
print("coucou")
|
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.
|
||||||
|
|||||||
43
scenes/camera/camera_controller.gd
Normal file
43
scenes/camera/camera_controller.gd
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
extends Camera2D
|
||||||
|
|
||||||
|
|
||||||
|
@export_range(0.0, 100) var pan_speed: float = 1.0
|
||||||
|
|
||||||
|
var should_move_right = false
|
||||||
|
var should_move_left = false
|
||||||
|
|
||||||
|
|
||||||
|
# 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:
|
||||||
|
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_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
|
||||||
1
scenes/camera/camera_controller.gd.uid
Normal file
1
scenes/camera/camera_controller.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://cgctwciolfqe5
|
||||||
@@ -11,6 +11,7 @@ enum Preference {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@export_category("General")
|
@export_category("General")
|
||||||
|
@export var name: String
|
||||||
@export var chara_sprite: Texture2D:
|
@export var chara_sprite: Texture2D:
|
||||||
set(value):
|
set(value):
|
||||||
chara_sprite = value
|
chara_sprite = value
|
||||||
|
|||||||
@@ -6,16 +6,18 @@ class_name Character
|
|||||||
set(new_resource):
|
set(new_resource):
|
||||||
chara_resource = new_resource
|
chara_resource = new_resource
|
||||||
_on_chara_resource_changed()
|
_on_chara_resource_changed()
|
||||||
if chara_resource == null:
|
|
||||||
return
|
|
||||||
chara_resource.changed.connect(_on_chara_resource_changed)
|
|
||||||
|
|
||||||
@onready var face: Sprite2D = $Face
|
@onready var face: Sprite2D = $Face
|
||||||
@onready var mask_eyes: Mask = $MaskEyes
|
@onready var mask_eyes: Mask = $MaskEyes
|
||||||
@onready var mask_mouth: Mask = $MaskMouth
|
@onready var mask_mouth: Mask = $MaskMouth
|
||||||
|
|
||||||
|
@onready var animation_player: AnimationPlayer = $AnimationPlayer
|
||||||
|
|
||||||
func _on_chara_resource_changed() -> void:
|
func _on_chara_resource_changed() -> void:
|
||||||
face.texture = chara_resource.chara_sprite
|
if chara_resource == null:
|
||||||
|
return
|
||||||
|
if face != null:
|
||||||
|
face.texture = chara_resource.chara_sprite
|
||||||
|
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
@@ -32,7 +34,7 @@ func _process(delta: float) -> void:
|
|||||||
|
|
||||||
|
|
||||||
func _game_process(delta: float) -> void:
|
func _game_process(delta: float) -> void:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
func _engine_process(delta: float) -> void:
|
func _engine_process(delta: float) -> void:
|
||||||
@@ -43,3 +45,12 @@ func _engine_process(delta: float) -> void:
|
|||||||
mask_eyes.rotation = chara_resource.mask_eyes_rotation
|
mask_eyes.rotation = chara_resource.mask_eyes_rotation
|
||||||
mask_mouth.position = chara_resource.mask_mouth_position
|
mask_mouth.position = chara_resource.mask_mouth_position
|
||||||
mask_mouth.rotation = chara_resource.mask_mouth_rotation
|
mask_mouth.rotation = chara_resource.mask_mouth_rotation
|
||||||
|
|
||||||
|
|
||||||
|
func come_in() -> void:
|
||||||
|
animation_player.play("come_in")
|
||||||
|
|
||||||
|
|
||||||
|
func go_out() -> void:
|
||||||
|
animation_player.play("go_out")
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,162 @@
|
|||||||
[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://da2ptl3f7h0ot" path="res://resources/characters/king.tres" id="2_fgi2k"]
|
[ext_resource type="Resource" uid="uid://wq3g1j3l4gl6" path="res://resources/characters/queen.tres" id="2_fgi2k"]
|
||||||
[ext_resource type="Texture2D" uid="uid://c57s3oksagauh" path="res://assets/sprites/sprites by judas la carotte/sprite3 happy small.png" id="3_f8hpl"]
|
[ext_resource type="Texture2D" uid="uid://c726frtpkk1a8" path="res://assets/characters/Perso 2.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"]
|
||||||
|
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)]
|
||||||
|
}
|
||||||
|
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.4, 0.4), Vector2(0.5, 0.5)]
|
||||||
|
}
|
||||||
|
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, 0), 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, 0)]
|
||||||
|
}
|
||||||
|
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]
|
[node name="Character" type="Node2D" unique_id=138741531]
|
||||||
|
scale = Vector2(0.5, 0.5)
|
||||||
script = ExtResource("1_cuyo6")
|
script = ExtResource("1_cuyo6")
|
||||||
chara_resource = ExtResource("2_fgi2k")
|
chara_resource = ExtResource("2_fgi2k")
|
||||||
|
|
||||||
@@ -13,9 +164,10 @@ 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(-7.63, -186.87)
|
position = Vector2(26.595, 398.745)
|
||||||
rotation = -0.18849556
|
|
||||||
|
|
||||||
[node name="MaskEyes" parent="." unique_id=428968220 instance=ExtResource("3_mutn8")]
|
[node name="MaskEyes" parent="." unique_id=428968220 instance=ExtResource("3_mutn8")]
|
||||||
position = Vector2(-21.75, -274.015)
|
position = Vector2(13.285, 181.09)
|
||||||
rotation = 0.06981317
|
|
||||||
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=713965213]
|
||||||
|
libraries/ = SubResource("AnimationLibrary_7ex5l")
|
||||||
|
|||||||
16
scenes/list/list.gd
Normal file
16
scenes/list/list.gd
Normal 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
1
scenes/list/list.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://cexbywhlc4ykd
|
||||||
13
scenes/list/list.tscn
Normal file
13
scenes/list/list.tscn
Normal file
@@ -0,0 +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")
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
[gd_scene format=3 uid="uid://cukfdjcnb5tm6"]
|
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://bvpyqyftqhy45" path="res://scenes/character/character.tscn" id="1_o5qli"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://cftllq6l7xclt" path="res://icon.svg" id="2_0wfyh"]
|
|
||||||
|
|
||||||
[node name="Main" type="Node2D" unique_id=875553242]
|
|
||||||
|
|
||||||
[node name="Character" parent="." unique_id=138741531 instance=ExtResource("1_o5qli")]
|
|
||||||
position = Vector2(933, 598)
|
|
||||||
scale = Vector2(0.5488516, 0.5501616)
|
|
||||||
|
|
||||||
[node name="Node2D" type="Node2D" parent="." unique_id=423016219]
|
|
||||||
|
|
||||||
[node name="Sprite2D2" type="Sprite2D" parent="." unique_id=897724120]
|
|
||||||
position = Vector2(437, 790.00006)
|
|
||||||
scale = Vector2(2.623044, 6.1738076)
|
|
||||||
texture = ExtResource("2_0wfyh")
|
|
||||||
|
|
||||||
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=1584569522]
|
|
||||||
position = Vector2(846, 943)
|
|
||||||
scale = Vector2(9.480545, 1.8921106)
|
|
||||||
texture = ExtResource("2_0wfyh")
|
|
||||||
40
scenes/main/main.gd
Normal file
40
scenes/main/main.gd
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
extends Node2D
|
||||||
|
|
||||||
|
@onready var animation_player: AnimationPlayer = $AnimationPlayer
|
||||||
|
@onready var sfx_player: AudioStreamPlayer = $SFXPlayer
|
||||||
|
var stream_player: AudioStreamPlaybackInteractive
|
||||||
|
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
func _ready() -> void:
|
||||||
|
stream_player = sfx_player.get_stream_playback() as AudioStreamPlaybackInteractive
|
||||||
|
|
||||||
|
|
||||||
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
|
func _process(delta: float) -> void:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
func play_list_up_sfx() -> void:
|
||||||
|
stream_player.switch_to_clip_by_name("list_up")
|
||||||
|
|
||||||
|
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")
|
||||||
|
|
||||||
|
|
||||||
|
func _on_guest_list_mouse_exited() -> void:
|
||||||
|
animation_player.play_backwards("guest_list_up")
|
||||||
|
|
||||||
|
|
||||||
|
func _on_mask_list_mouse_entered() -> void:
|
||||||
|
animation_player.queue("mask_list_up")
|
||||||
|
|
||||||
|
|
||||||
|
func _on_mask_list_mouse_exited() -> void:
|
||||||
|
animation_player.play_backwards("mask_list_up")
|
||||||
1
scenes/main/main.gd.uid
Normal file
1
scenes/main/main.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://bqrfmft2g1agc
|
||||||
409
scenes/main/main.tscn
Normal file
409
scenes/main/main.tscn
Normal file
@@ -0,0 +1,409 @@
|
|||||||
|
[gd_scene format=3 uid="uid://cukfdjcnb5tm6"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://bqrfmft2g1agc" path="res://scenes/main/main.gd" id="1_7smn1"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://cv42wcg48s7pe" path="res://assets/audio/kenney_casino-audio/Audio/card-slide-1.ogg" id="2_m4h2d"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://bvpyqyftqhy45" path="res://scenes/character/character.tscn" id="2_raeie"]
|
||||||
|
[ext_resource type="Script" uid="uid://b1w0ocrgjkjen" path="res://scenes/managers/game_manager.gd" id="3_hxu8e"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://cfv8y85lm0rv1" path="res://assets/audio/kenney_casino-audio/Audio/card-slide-2.ogg" id="3_p8abn"]
|
||||||
|
[ext_resource type="Script" uid="uid://bwam50qxikpw4" path="res://scenes/character/chara_resource.gd" id="4_nvumn"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://b0eggikcow8xr" path="res://assets/audio/kenney_casino-audio/Audio/card-slide-3.ogg" id="4_s17dp"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://5n4xmrthp0em" path="res://assets/audio/kenney_casino-audio/Audio/card-slide-4.ogg" id="5_37hlw"]
|
||||||
|
[ext_resource type="Resource" uid="uid://c87odmn680x7" path="res://resources/characters/duchex.tres" id="5_ou6is"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://c0winrfat714w" path="res://assets/audio/kenney_casino-audio/Audio/card-slide-5.ogg" id="6_6llfj"]
|
||||||
|
[ext_resource type="Resource" uid="uid://gy4ygqrjj5ys" path="res://resources/characters/duke.tres" id="6_necax"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://cbew82s7f33tm" path="res://assets/audio/kenney_casino-audio/Audio/card-slide-6.ogg" id="7_0bhws"]
|
||||||
|
[ext_resource type="Resource" uid="uid://da2ptl3f7h0ot" path="res://resources/characters/king.tres" id="7_r4lks"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://dbwso01ip7fy3" path="res://assets/audio/kenney_casino-audio/Audio/card-slide-7.ogg" id="8_62atk"]
|
||||||
|
[ext_resource type="Resource" uid="uid://wq3g1j3l4gl6" path="res://resources/characters/queen.tres" id="8_pg34l"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://x6erlvj03nlm" path="res://assets/audio/kenney_casino-audio/Audio/card-slide-8.ogg" id="9_i7in8"]
|
||||||
|
[ext_resource type="Script" uid="uid://d26mv2xtvmpqt" path="res://scenes/mask/mask_resource.gd" id="9_m4h2d"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://vrw6idscfnei" path="res://assets/audio/kenney_casino-audio/Audio/card-shove-1.ogg" id="10_6llfj"]
|
||||||
|
[ext_resource type="Resource" uid="uid://cuf1ocb4px4m3" path="res://resources/masks/cat.tres" id="10_p8abn"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://b5ea6pr6bv85d" path="res://assets/audio/kenney_casino-audio/Audio/card-shove-2.ogg" id="11_0bhws"]
|
||||||
|
[ext_resource type="Resource" uid="uid://pdiaprcknftw" path="res://resources/masks/mute.tres" id="11_s17dp"]
|
||||||
|
[ext_resource type="Resource" uid="uid://cbcqtj8mxngfy" path="res://resources/masks/unracist.tres" id="12_37hlw"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://dpv07j0ia0ayl" path="res://assets/audio/kenney_casino-audio/Audio/card-shove-3.ogg" id="12_62atk"]
|
||||||
|
[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"]
|
||||||
|
[ext_resource type="Script" uid="uid://bb0od2qqdx3or" path="res://scenes/main/ready_bell.gd" id="33_tbnf8"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://cayrxqnypoytu" path="res://scenes/table/table.tscn" id="35_r1bmu"]
|
||||||
|
|
||||||
|
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_gkmcc"]
|
||||||
|
random_pitch = 1.122462
|
||||||
|
streams_count = 8
|
||||||
|
stream_0/stream = ExtResource("2_m4h2d")
|
||||||
|
stream_1/stream = ExtResource("3_p8abn")
|
||||||
|
stream_2/stream = ExtResource("4_s17dp")
|
||||||
|
stream_3/stream = ExtResource("5_37hlw")
|
||||||
|
stream_4/stream = ExtResource("6_6llfj")
|
||||||
|
stream_5/stream = ExtResource("7_0bhws")
|
||||||
|
stream_6/stream = ExtResource("8_62atk")
|
||||||
|
stream_7/stream = ExtResource("9_i7in8")
|
||||||
|
|
||||||
|
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_7nlll"]
|
||||||
|
random_pitch = 1.122462
|
||||||
|
streams_count = 4
|
||||||
|
stream_0/stream = ExtResource("10_6llfj")
|
||||||
|
stream_1/stream = ExtResource("11_0bhws")
|
||||||
|
stream_2/stream = ExtResource("12_62atk")
|
||||||
|
stream_3/stream = ExtResource("13_i7in8")
|
||||||
|
|
||||||
|
[sub_resource type="AudioStreamInteractive" id="AudioStreamInteractive_7smn1"]
|
||||||
|
clip_count = 2
|
||||||
|
clip_0/name = &"list_side"
|
||||||
|
clip_0/stream = SubResource("AudioStreamRandomizer_gkmcc")
|
||||||
|
clip_0/auto_advance = 0
|
||||||
|
clip_1/name = &"list_up"
|
||||||
|
clip_1/stream = SubResource("AudioStreamRandomizer_7nlll")
|
||||||
|
clip_1/auto_advance = 0
|
||||||
|
initial_clip = 1
|
||||||
|
_transitions = {
|
||||||
|
Vector2i(-1, -1): {
|
||||||
|
"fade_beats": 1.0,
|
||||||
|
"fade_mode": 4,
|
||||||
|
"from_time": 0,
|
||||||
|
"to_time": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ya4ey"]
|
||||||
|
size = Vector2(512, 1080)
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_7smn1"]
|
||||||
|
length = 0.001
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("GuestList:position")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(-409, 523)]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("GuestList:rotation")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [-0.16732943]
|
||||||
|
}
|
||||||
|
tracks/2/type = "value"
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = true
|
||||||
|
tracks/2/path = NodePath("MaskList:position")
|
||||||
|
tracks/2/interp = 1
|
||||||
|
tracks/2/loop_wrap = true
|
||||||
|
tracks/2/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(409, 523)]
|
||||||
|
}
|
||||||
|
tracks/3/type = "value"
|
||||||
|
tracks/3/imported = false
|
||||||
|
tracks/3/enabled = true
|
||||||
|
tracks/3/path = NodePath("MaskList:rotation")
|
||||||
|
tracks/3/interp = 1
|
||||||
|
tracks/3/loop_wrap = true
|
||||||
|
tracks/3/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [0.1675516]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_hxu8e"]
|
||||||
|
resource_name = "guest_list_down"
|
||||||
|
length = 0.2
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("GuestList:position")
|
||||||
|
tracks/0/interp = 2
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.19999999),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(-388, 176), Vector2(-409, 523)]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("GuestList:rotation")
|
||||||
|
tracks/1/interp = 2
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.19999999),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [0.0, -0.16732943]
|
||||||
|
}
|
||||||
|
tracks/2/type = "method"
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = true
|
||||||
|
tracks/2/path = NodePath(".")
|
||||||
|
tracks/2/interp = 1
|
||||||
|
tracks/2/loop_wrap = true
|
||||||
|
tracks/2/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"values": [{
|
||||||
|
"args": [],
|
||||||
|
"method": &"play_list_down_sfx"
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_raeie"]
|
||||||
|
resource_name = "guest_list_up"
|
||||||
|
length = 0.2
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("GuestList:position")
|
||||||
|
tracks/0/interp = 2
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.19999999),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(-409, 523), Vector2(-388, 176)]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("GuestList:rotation")
|
||||||
|
tracks/1/interp = 2
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.19999999),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [-0.16732943, 0.0]
|
||||||
|
}
|
||||||
|
tracks/2/type = "method"
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = true
|
||||||
|
tracks/2/path = NodePath(".")
|
||||||
|
tracks/2/interp = 1
|
||||||
|
tracks/2/loop_wrap = true
|
||||||
|
tracks/2/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"values": [{
|
||||||
|
"args": [],
|
||||||
|
"method": &"play_list_up_sfx"
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_62atk"]
|
||||||
|
resource_name = "mask_list_down"
|
||||||
|
length = 0.2
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("MaskList:position")
|
||||||
|
tracks/0/interp = 2
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.19999999),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(388, 176), Vector2(409, 523)]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("MaskList:rotation")
|
||||||
|
tracks/1/interp = 2
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.19999999),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [0.0, 0.1675516]
|
||||||
|
}
|
||||||
|
tracks/2/type = "method"
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = true
|
||||||
|
tracks/2/path = NodePath(".")
|
||||||
|
tracks/2/interp = 1
|
||||||
|
tracks/2/loop_wrap = true
|
||||||
|
tracks/2/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"values": [{
|
||||||
|
"args": [],
|
||||||
|
"method": &"play_list_down_sfx"
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_0bhws"]
|
||||||
|
resource_name = "mask_list_up"
|
||||||
|
length = 0.2
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("MaskList:position")
|
||||||
|
tracks/0/interp = 2
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.19999999),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(409, 523), Vector2(388, 176)]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("MaskList:rotation")
|
||||||
|
tracks/1/interp = 2
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.19999999),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [0.1675516, 0.0]
|
||||||
|
}
|
||||||
|
tracks/2/type = "method"
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = true
|
||||||
|
tracks/2/path = NodePath(".")
|
||||||
|
tracks/2/interp = 1
|
||||||
|
tracks/2/loop_wrap = true
|
||||||
|
tracks/2/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"values": [{
|
||||||
|
"args": [],
|
||||||
|
"method": &"play_list_up_sfx"
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_hxu8e"]
|
||||||
|
_data = {
|
||||||
|
&"RESET": SubResource("Animation_7smn1"),
|
||||||
|
&"guest_list_down": SubResource("Animation_hxu8e"),
|
||||||
|
&"guest_list_up": SubResource("Animation_raeie"),
|
||||||
|
&"mask_list_down": SubResource("Animation_62atk"),
|
||||||
|
&"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")
|
||||||
|
|
||||||
|
[node name="SFXPlayer" type="AudioStreamPlayer" parent="." unique_id=831453323]
|
||||||
|
stream = SubResource("AudioStreamInteractive_7smn1")
|
||||||
|
autoplay = true
|
||||||
|
bus = &"SFX"
|
||||||
|
|
||||||
|
[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="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)
|
||||||
|
rotation = 0.1675516
|
||||||
|
|
||||||
|
[node name="Sprite2D" type="Sprite2D" parent="MaskList" unique_id=1216540471]
|
||||||
|
texture = ExtResource("13_6llfj")
|
||||||
|
|
||||||
|
[node name="GuestList" parent="." unique_id=2089675317 instance=ExtResource("25_6llfj")]
|
||||||
|
position = Vector2(-409, 523)
|
||||||
|
rotation = -0.16732943
|
||||||
|
|
||||||
|
[node name="Sprite2D" type="Sprite2D" parent="GuestList" unique_id=2026369586]
|
||||||
|
texture = ExtResource("13_6llfj")
|
||||||
|
|
||||||
|
[node name="Camera2D" type="Camera2D" parent="." unique_id=1166192115]
|
||||||
|
limit_left = -960
|
||||||
|
limit_top = -540
|
||||||
|
limit_right = 3680
|
||||||
|
limit_bottom = 540
|
||||||
|
position_smoothing_enabled = true
|
||||||
|
position_smoothing_speed = 10.0
|
||||||
|
script = ExtResource("14_0bhws")
|
||||||
|
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]
|
||||||
|
libraries/ = SubResource("AnimationLibrary_hxu8e")
|
||||||
|
|
||||||
|
[node name="ReadyBell" type="Area2D" parent="." unique_id=1350504622]
|
||||||
|
position = Vector2(0, 426)
|
||||||
|
script = ExtResource("33_tbnf8")
|
||||||
|
|
||||||
|
[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")
|
||||||
|
|
||||||
|
[node name="Table" parent="." unique_id=1315188460 instance=ExtResource("35_r1bmu")]
|
||||||
|
position = Vector2(2589, 56)
|
||||||
|
|
||||||
|
[node name="Table2" parent="." unique_id=141765359 instance=ExtResource("35_r1bmu")]
|
||||||
|
position = Vector2(2272, 285)
|
||||||
|
|
||||||
|
[node name="Table3" parent="." unique_id=569701756 instance=ExtResource("35_r1bmu")]
|
||||||
|
position = Vector2(3014, 285)
|
||||||
|
|
||||||
|
[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"]
|
||||||
|
[connection signal="mouse_exited" from="GuestList" to="." method="_on_guest_list_mouse_exited"]
|
||||||
|
[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="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_exited" from="ReadyBell" to="ReadyBell" method="_on_mouse_exited"]
|
||||||
|
[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="Table3" to="GameManager" method="on_seat_clicked"]
|
||||||
250
scenes/main/main.tscn8449123712.tmp
Normal file
250
scenes/main/main.tscn8449123712.tmp
Normal file
@@ -0,0 +1,250 @@
|
|||||||
|
[gd_scene format=3 uid="uid://cukfdjcnb5tm6"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://bqrfmft2g1agc" path="res://scenes/main/main.gd" id="1_7smn1"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://cv42wcg48s7pe" path="res://assets/audio/kenney_casino-audio/Audio/card-slide-1.ogg" id="2_m4h2d"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://bvpyqyftqhy45" path="res://scenes/character/character.tscn" id="2_raeie"]
|
||||||
|
[ext_resource type="Script" uid="uid://b1w0ocrgjkjen" path="res://scenes/managers/game_manager.gd" id="3_hxu8e"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://cfv8y85lm0rv1" path="res://assets/audio/kenney_casino-audio/Audio/card-slide-2.ogg" id="3_p8abn"]
|
||||||
|
[ext_resource type="Script" uid="uid://bwam50qxikpw4" path="res://scenes/character/chara_resource.gd" id="4_nvumn"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://b0eggikcow8xr" path="res://assets/audio/kenney_casino-audio/Audio/card-slide-3.ogg" id="4_s17dp"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://5n4xmrthp0em" path="res://assets/audio/kenney_casino-audio/Audio/card-slide-4.ogg" id="5_37hlw"]
|
||||||
|
[ext_resource type="Resource" uid="uid://c87odmn680x7" path="res://resources/characters/duchex.tres" id="5_ou6is"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://c0winrfat714w" path="res://assets/audio/kenney_casino-audio/Audio/card-slide-5.ogg" id="6_6llfj"]
|
||||||
|
[ext_resource type="Resource" uid="uid://gy4ygqrjj5ys" path="res://resources/characters/duke.tres" id="6_necax"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://cbew82s7f33tm" path="res://assets/audio/kenney_casino-audio/Audio/card-slide-6.ogg" id="7_0bhws"]
|
||||||
|
[ext_resource type="Resource" uid="uid://da2ptl3f7h0ot" path="res://resources/characters/king.tres" id="7_r4lks"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://dbwso01ip7fy3" path="res://assets/audio/kenney_casino-audio/Audio/card-slide-7.ogg" id="8_62atk"]
|
||||||
|
[ext_resource type="Resource" uid="uid://wq3g1j3l4gl6" path="res://resources/characters/queen.tres" id="8_pg34l"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://x6erlvj03nlm" path="res://assets/audio/kenney_casino-audio/Audio/card-slide-8.ogg" id="9_i7in8"]
|
||||||
|
[ext_resource type="Script" uid="uid://d26mv2xtvmpqt" path="res://scenes/mask/mask_resource.gd" id="9_m4h2d"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://vrw6idscfnei" path="res://assets/audio/kenney_casino-audio/Audio/card-shove-1.ogg" id="10_6llfj"]
|
||||||
|
[ext_resource type="Resource" uid="uid://cuf1ocb4px4m3" path="res://resources/masks/cat.tres" id="10_p8abn"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://b5ea6pr6bv85d" path="res://assets/audio/kenney_casino-audio/Audio/card-shove-2.ogg" id="11_0bhws"]
|
||||||
|
[ext_resource type="Resource" uid="uid://pdiaprcknftw" path="res://resources/masks/mute.tres" id="11_s17dp"]
|
||||||
|
[ext_resource type="Resource" uid="uid://cbcqtj8mxngfy" path="res://resources/masks/unracist.tres" id="12_37hlw"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://dpv07j0ia0ayl" path="res://assets/audio/kenney_casino-audio/Audio/card-shove-3.ogg" id="12_62atk"]
|
||||||
|
[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"]
|
||||||
|
|
||||||
|
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_gkmcc"]
|
||||||
|
random_pitch = 1.122462
|
||||||
|
streams_count = 8
|
||||||
|
stream_0/stream = ExtResource("2_m4h2d")
|
||||||
|
stream_1/stream = ExtResource("3_p8abn")
|
||||||
|
stream_2/stream = ExtResource("4_s17dp")
|
||||||
|
stream_3/stream = ExtResource("5_37hlw")
|
||||||
|
stream_4/stream = ExtResource("6_6llfj")
|
||||||
|
stream_5/stream = ExtResource("7_0bhws")
|
||||||
|
stream_6/stream = ExtResource("8_62atk")
|
||||||
|
stream_7/stream = ExtResource("9_i7in8")
|
||||||
|
|
||||||
|
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_7nlll"]
|
||||||
|
random_pitch = 1.122462
|
||||||
|
streams_count = 4
|
||||||
|
stream_0/stream = ExtResource("10_6llfj")
|
||||||
|
stream_1/stream = ExtResource("11_0bhws")
|
||||||
|
stream_2/stream = ExtResource("12_62atk")
|
||||||
|
stream_3/stream = ExtResource("13_i7in8")
|
||||||
|
|
||||||
|
[sub_resource type="AudioStreamInteractive" id="AudioStreamInteractive_7smn1"]
|
||||||
|
clip_count = 2
|
||||||
|
clip_0/name = &"list_up"
|
||||||
|
clip_0/stream = SubResource("AudioStreamRandomizer_gkmcc")
|
||||||
|
clip_0/auto_advance = 0
|
||||||
|
clip_1/name = &"list_down"
|
||||||
|
clip_1/stream = SubResource("AudioStreamRandomizer_7nlll")
|
||||||
|
clip_1/auto_advance = 0
|
||||||
|
initial_clip = 1
|
||||||
|
_transitions = {
|
||||||
|
Vector2i(-1, -1): {
|
||||||
|
"fade_beats": 1.0,
|
||||||
|
"fade_mode": 4,
|
||||||
|
"from_time": 0,
|
||||||
|
"to_time": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_trceg"]
|
||||||
|
radius = 198.0
|
||||||
|
height = 1044.0
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ya4ey"]
|
||||||
|
size = Vector2(512, 1080)
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_7smn1"]
|
||||||
|
length = 0.001
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("GuestList:position")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(-409, 523)]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("GuestList:rotation")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [-0.16732943]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_hxu8e"]
|
||||||
|
resource_name = "guest_list_down"
|
||||||
|
length = 0.5
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("GuestList:position")
|
||||||
|
tracks/0/interp = 2
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.5),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(-388, 176), Vector2(-409, 523)]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("GuestList:rotation")
|
||||||
|
tracks/1/interp = 2
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.5),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [0.0, -0.16732943]
|
||||||
|
}
|
||||||
|
tracks/2/type = "method"
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = true
|
||||||
|
tracks/2/path = NodePath(".")
|
||||||
|
tracks/2/interp = 1
|
||||||
|
tracks/2/loop_wrap = true
|
||||||
|
tracks/2/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"values": [{
|
||||||
|
"args": [],
|
||||||
|
"method": &"play_list_down_sfx"
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_raeie"]
|
||||||
|
resource_name = "guest_list_up"
|
||||||
|
length = 0.5
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("GuestList:position")
|
||||||
|
tracks/0/interp = 2
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.5),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(-409, 523), Vector2(-388, 176)]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("GuestList:rotation")
|
||||||
|
tracks/1/interp = 2
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.5),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [-0.16732943, 0.0]
|
||||||
|
}
|
||||||
|
tracks/2/type = "method"
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = true
|
||||||
|
tracks/2/path = NodePath(".")
|
||||||
|
tracks/2/interp = 1
|
||||||
|
tracks/2/loop_wrap = true
|
||||||
|
tracks/2/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"values": [{
|
||||||
|
"args": [],
|
||||||
|
"method": &"play_list_up_sfx"
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_hxu8e"]
|
||||||
|
_data = {
|
||||||
|
&"RESET": SubResource("Animation_7smn1"),
|
||||||
|
&"guest_list_down": SubResource("Animation_hxu8e"),
|
||||||
|
&"guest_list_up": SubResource("Animation_raeie")
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Main" type="Node2D" unique_id=875553242]
|
||||||
|
script = ExtResource("1_7smn1")
|
||||||
|
|
||||||
|
[node name="SFXPlayer" type="AudioStreamPlayer" parent="." unique_id=831453323]
|
||||||
|
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="GameManager" type="Node" parent="." unique_id=528989100]
|
||||||
|
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")])
|
||||||
|
|
||||||
|
[node name="GuestList" type="Node2D" parent="." unique_id=1314693850]
|
||||||
|
position = Vector2(-409, 523)
|
||||||
|
rotation = -0.16732943
|
||||||
|
|
||||||
|
[node name="Sprite2D" type="Sprite2D" parent="GuestList" unique_id=508689157]
|
||||||
|
texture = ExtResource("13_6llfj")
|
||||||
|
|
||||||
|
[node name="Area2D" type="Area2D" parent="GuestList" unique_id=416235822]
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="GuestList/Area2D" unique_id=845691842]
|
||||||
|
shape = SubResource("CapsuleShape2D_trceg")
|
||||||
|
|
||||||
|
[node name="Camera2D" type="Camera2D" parent="." unique_id=1166192115]
|
||||||
|
limit_left = -960
|
||||||
|
limit_top = -540
|
||||||
|
limit_right = 4096
|
||||||
|
limit_bottom = 540
|
||||||
|
position_smoothing_enabled = true
|
||||||
|
script = ExtResource("14_0bhws")
|
||||||
|
pan_speed = 10.0
|
||||||
|
|
||||||
|
[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]
|
||||||
|
libraries/ = SubResource("AnimationLibrary_hxu8e")
|
||||||
|
|
||||||
|
[connection signal="mouse_entered" from="GuestList/Area2D" to="." method="_on_guest_list_mouse_entered"]
|
||||||
|
[connection signal="mouse_exited" from="GuestList/Area2D" to="." method="_on_guest_list_mouse_exited"]
|
||||||
|
[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"]
|
||||||
19
scenes/main/ready_bell.gd
Normal file
19
scenes/main/ready_bell.gd
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
extends Area2D
|
||||||
|
|
||||||
|
|
||||||
|
# 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 _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)
|
||||||
1
scenes/main/ready_bell.gd.uid
Normal file
1
scenes/main/ready_bell.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://bb0od2qqdx3or
|
||||||
152
scenes/managers/game_manager.gd
Normal file
152
scenes/managers/game_manager.gd
Normal file
@@ -0,0 +1,152 @@
|
|||||||
|
@tool
|
||||||
|
extends Node
|
||||||
|
class_name GameManager
|
||||||
|
|
||||||
|
@export_category("Complete rosters")
|
||||||
|
@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
|
||||||
|
@export var lvl1_guest_2: MaskedChara
|
||||||
|
|
||||||
|
@export_group("Level 2")
|
||||||
|
@export var lvl2_guest_1: MaskedChara
|
||||||
|
@export var lvl2_guest_2: MaskedChara
|
||||||
|
|
||||||
|
@export_category("Random levels")
|
||||||
|
@export var max_roster_size: int = 3;
|
||||||
|
@export_tool_button("Create chara roster") var create_roster_action = create_new_roster
|
||||||
|
|
||||||
|
var current_chara_roster: Array[MaskedChara]
|
||||||
|
|
||||||
|
enum GameState {
|
||||||
|
READY,
|
||||||
|
GUEST_REVIEW,
|
||||||
|
FINISHED
|
||||||
|
}
|
||||||
|
enum Levels {
|
||||||
|
LVL1,
|
||||||
|
LVL2,
|
||||||
|
RANDOM
|
||||||
|
}
|
||||||
|
var current_game_state = GameState.READY
|
||||||
|
var current_level = Levels.LVL1
|
||||||
|
var first_guest = true
|
||||||
|
var current_guest: MaskedChara
|
||||||
|
var selected_seat: Seat
|
||||||
|
|
||||||
|
@onready var camera_2d: Camera2D = $"../Camera2D"
|
||||||
|
|
||||||
|
|
||||||
|
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):
|
||||||
|
# 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 face_mask = mask if mask.region == MaskResource.Region.EYES else null
|
||||||
|
var mouth_mask = mask if mask.region == MaskResource.Region.MOUTH else null
|
||||||
|
var masked_chara = MaskedChara.new(chara, face_mask, mouth_mask)
|
||||||
|
|
||||||
|
current_chara_roster.append(masked_chara)
|
||||||
|
print("Added %s to roster" % chara.name)
|
||||||
|
|
||||||
|
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
|
||||||
|
current_guest = current_chara_roster.pop_front()
|
||||||
|
if current_guest == null:
|
||||||
|
current_game_state = GameState.FINISHED
|
||||||
|
compute_ending()
|
||||||
|
return
|
||||||
|
|
||||||
|
# Process next guest
|
||||||
|
print("Guest is %s" % current_guest.character.name)
|
||||||
|
character.chara_resource = current_guest.character
|
||||||
|
character.mask_eyes.mask_resource = current_guest.face_mask
|
||||||
|
character.mask_mouth.mask_resource = current_guest.mouth_mask
|
||||||
|
|
||||||
|
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:
|
||||||
|
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()
|
||||||
|
|
||||||
|
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 on_seat_clicked(seat: Seat) -> void:
|
||||||
|
if current_guest == null and not current_game_state == GameState.GUEST_REVIEW:
|
||||||
|
return
|
||||||
|
|
||||||
|
selected_seat = seat
|
||||||
|
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(camera_2d, "position", Vector2.ZERO, 1.0)
|
||||||
|
camera_tween.tween_callback(camera_tween_cb)
|
||||||
|
|
||||||
|
func camera_tween_cb() -> void:
|
||||||
|
selected_seat.set_guest(current_guest)
|
||||||
|
review_next_guest()
|
||||||
1
scenes/managers/game_manager.gd.uid
Normal file
1
scenes/managers/game_manager.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://b1w0ocrgjkjen
|
||||||
18
scenes/managers/masked_chara.gd
Normal file
18
scenes/managers/masked_chara.gd
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
extends Resource
|
||||||
|
class_name MaskedChara
|
||||||
|
|
||||||
|
@export var character: CharacterResource
|
||||||
|
@export var face_mask: MaskResource
|
||||||
|
@export var mouth_mask: MaskResource
|
||||||
|
|
||||||
|
|
||||||
|
# Make sure that every parameter has a default value.
|
||||||
|
# Otherwise, there will be problems with creating and editing
|
||||||
|
# your resource via the inspector.
|
||||||
|
func _init(
|
||||||
|
p_character: CharacterResource = CharacterResource.new(),
|
||||||
|
p_mask_face: MaskResource = MaskResource.new(),
|
||||||
|
p_mask_mouth: MaskResource = MaskResource.new()):
|
||||||
|
character = p_character
|
||||||
|
face_mask = p_mask_face
|
||||||
|
mouth_mask = p_mask_mouth
|
||||||
1
scenes/managers/masked_chara.gd.uid
Normal file
1
scenes/managers/masked_chara.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://b8peyg02l0mrn
|
||||||
@@ -6,15 +6,15 @@ class_name Mask
|
|||||||
set(new_resource):
|
set(new_resource):
|
||||||
mask_resource = new_resource
|
mask_resource = new_resource
|
||||||
_on_mask_resource_changed()
|
_on_mask_resource_changed()
|
||||||
if mask_resource == null:
|
|
||||||
return
|
|
||||||
mask_resource.changed.connect(_on_mask_resource_changed)
|
|
||||||
|
|
||||||
@onready var mask_sprite: Sprite2D = $MaskSprite
|
@onready var mask_sprite: Sprite2D = $MaskSprite
|
||||||
|
|
||||||
|
|
||||||
func _on_mask_resource_changed() -> void:
|
func _on_mask_resource_changed() -> void:
|
||||||
mask_sprite.texture = mask_resource.mask_sprite
|
if mask_resource == null:
|
||||||
|
return
|
||||||
|
if mask_sprite != null:
|
||||||
|
mask_sprite.texture = mask_resource.mask_sprite
|
||||||
|
|
||||||
# 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:
|
||||||
|
|||||||
67
scenes/seat/seat.gd
Normal file
67
scenes/seat/seat.gd
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
@tool
|
||||||
|
extends Area2D
|
||||||
|
class_name Seat
|
||||||
|
|
||||||
|
signal seat_clicked(Seat)
|
||||||
|
|
||||||
|
@export var guest: MaskedChara:
|
||||||
|
set(new_resource):
|
||||||
|
guest = new_resource
|
||||||
|
_on_chara_resource_changed()
|
||||||
|
|
||||||
|
@onready var character: Character = $Character
|
||||||
|
@onready var empty: Sprite2D = $Empty
|
||||||
|
|
||||||
|
|
||||||
|
func _process(delta: float) -> void:
|
||||||
|
character.scale.x = 0.15
|
||||||
|
character.scale.y = 0.15
|
||||||
|
character.position.y = -135
|
||||||
|
|
||||||
|
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
func _ready() -> void:
|
||||||
|
guest = null
|
||||||
|
character.visible = false
|
||||||
|
empty.visible = true
|
||||||
|
|
||||||
|
|
||||||
|
func _on_chara_resource_changed() -> void:
|
||||||
|
if guest == null:
|
||||||
|
return
|
||||||
|
|
||||||
|
if character != null:
|
||||||
|
empty.visible = false
|
||||||
|
character.visible = true
|
||||||
|
character.chara_resource = guest.character
|
||||||
|
character.mask_eyes.mask_resource = guest.face_mask
|
||||||
|
character.mask_mouth.mask_resource = guest.mouth_mask
|
||||||
|
|
||||||
|
|
||||||
|
func set_guest(p_guest: MaskedChara) -> void:
|
||||||
|
if p_guest == null:
|
||||||
|
return
|
||||||
|
|
||||||
|
guest = p_guest
|
||||||
|
empty.visible = false
|
||||||
|
character.visible = true
|
||||||
|
character.chara_resource = guest.character
|
||||||
|
character.mask_eyes.mask_resource = guest.face_mask
|
||||||
|
character.mask_mouth.mask_resource = guest.mouth_mask
|
||||||
|
|
||||||
|
func _on_mouse_entered() -> void:
|
||||||
|
if guest != null:
|
||||||
|
return
|
||||||
|
Input.set_default_cursor_shape(Input.CursorShape.CURSOR_POINTING_HAND)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_mouse_exited() -> void:
|
||||||
|
if guest != null:
|
||||||
|
return
|
||||||
|
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() and guest == null:
|
||||||
|
Input.set_default_cursor_shape(Input.CursorShape.CURSOR_ARROW)
|
||||||
|
seat_clicked.emit(self)
|
||||||
1
scenes/seat/seat.gd.uid
Normal file
1
scenes/seat/seat.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://cuojjiwxidmwu
|
||||||
25
scenes/seat/seat.tscn
Normal file
25
scenes/seat/seat.tscn
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
[gd_scene format=3 uid="uid://l0hl170iqkgx"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://cuojjiwxidmwu" path="res://scenes/seat/seat.gd" id="1_pceab"]
|
||||||
|
[ext_resource type="Resource" uid="uid://ca2fcdibf0mdm" path="res://resources/guests/queen_unracist.tres" id="2_wnjs1"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://bvpyqyftqhy45" path="res://scenes/character/character.tscn" id="3_dxmy0"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://cftllq6l7xclt" path="res://icon.svg" id="4_wnjs1"]
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_rofvo"]
|
||||||
|
size = Vector2(128, 128)
|
||||||
|
|
||||||
|
[node name="Seat" type="Area2D" unique_id=1604639021]
|
||||||
|
script = ExtResource("1_pceab")
|
||||||
|
guest = ExtResource("2_wnjs1")
|
||||||
|
|
||||||
|
[node name="Character" parent="." unique_id=138741531 instance=ExtResource("3_dxmy0")]
|
||||||
|
|
||||||
|
[node name="Empty" type="Sprite2D" parent="." unique_id=357649392]
|
||||||
|
texture = ExtResource("4_wnjs1")
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1054126207]
|
||||||
|
shape = SubResource("RectangleShape2D_rofvo")
|
||||||
|
|
||||||
|
[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"]
|
||||||
17
scenes/table/table.gd
Normal file
17
scenes/table/table.gd
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
extends Node2D
|
||||||
|
class_name Table
|
||||||
|
|
||||||
|
signal seat_clicked(Seat)
|
||||||
|
|
||||||
|
@onready var seat_1: Seat = $Seat1
|
||||||
|
@onready var seat_2: Seat = $Seat2
|
||||||
|
@onready var seat_3: Seat = $Seat3
|
||||||
|
|
||||||
|
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
func _ready() -> void:
|
||||||
|
pass # Replace with function body.
|
||||||
|
|
||||||
|
|
||||||
|
func on_seat_clicked(seat: Seat) -> void:
|
||||||
|
seat_clicked.emit(seat)
|
||||||
1
scenes/table/table.gd.uid
Normal file
1
scenes/table/table.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://r542aaur4vsc
|
||||||
20
scenes/table/table.tscn
Normal file
20
scenes/table/table.tscn
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
[gd_scene format=3 uid="uid://cayrxqnypoytu"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://r542aaur4vsc" path="res://scenes/table/table.gd" id="1_ov72x"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://l0hl170iqkgx" path="res://scenes/seat/seat.tscn" id="1_qavd0"]
|
||||||
|
|
||||||
|
[node name="Table" type="Node2D" unique_id=1315188460]
|
||||||
|
script = ExtResource("1_ov72x")
|
||||||
|
|
||||||
|
[node name="Seat1" parent="." unique_id=1604639021 instance=ExtResource("1_qavd0")]
|
||||||
|
position = Vector2(-204, -87)
|
||||||
|
|
||||||
|
[node name="Seat2" parent="." unique_id=848918585 instance=ExtResource("1_qavd0")]
|
||||||
|
position = Vector2(-14, -117)
|
||||||
|
|
||||||
|
[node name="Seat3" parent="." unique_id=150555678 instance=ExtResource("1_qavd0")]
|
||||||
|
position = Vector2(173, -98)
|
||||||
|
|
||||||
|
[connection signal="seat_clicked" from="Seat1" to="." method="on_seat_clicked"]
|
||||||
|
[connection signal="seat_clicked" from="Seat2" to="." method="on_seat_clicked"]
|
||||||
|
[connection signal="seat_clicked" from="Seat3" to="." method="on_seat_clicked"]
|
||||||
Reference in New Issue
Block a user