remplissage, menu, gamin audio et autre

This commit is contained in:
Dukantic
2024-10-22 22:11:03 +02:00
parent 8bfc2c8515
commit b9c3f980f6
18 changed files with 2649 additions and 479 deletions

1
.gitignore vendored
View File

@@ -2,3 +2,4 @@
.vscode/
.godot/
/android/
.vs/

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://d7qmjo075s87"
path="res://.godot/imported/Guy28.png-34c5655cd689aa00b3b96eafc6fe2cac.ctex"
path="res://.godot/imported/Nope1.png-65212b1ea93f1a217b5540002a68cf9b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://model/Guy28.png"
dest_files=["res://.godot/imported/Guy28.png-34c5655cd689aa00b3b96eafc6fe2cac.ctex"]
source_file="res://model/Nope1.png"
dest_files=["res://.godot/imported/Nope1.png-65212b1ea93f1a217b5540002a68cf9b.ctex"]
[params]

1972
model/city.tscn Normal file

File diff suppressed because one or more lines are too long

View File

@@ -71,6 +71,7 @@ interact={
valid={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194309,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
, Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":1,"canceled":false,"pressed":false,"double_click":false,"script":null)
]
}

View File

@@ -0,0 +1,18 @@
using Godot;
using System;
public partial class AudioStreamPlayer2d : AudioStreamPlayer2D
{
[Export] AudioStream audio;
// Called every frame. 'delta' is the elapsed time since the previous frame.
public override void _Process(double delta)
{
if (this.HasStreamPlayback() == false)
{
this.Stream = audio;
Play();
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -149,7 +149,7 @@ length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Panel/back:texture")
tracks/0/path = NodePath("CanvasLayer/Panel/back:texture")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
@@ -161,7 +161,7 @@ tracks/0/keys = {
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("AudioStreamPlayer:playing")
tracks/1/path = NodePath("CanvasLayer/AudioStreamPlayer:playing")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
@@ -173,7 +173,7 @@ tracks/1/keys = {
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Trick:visible")
tracks/2/path = NodePath("CanvasLayer/MarginContainer/Trick:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
@@ -185,7 +185,7 @@ tracks/2/keys = {
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Panel/mob:modulate")
tracks/3/path = NodePath("CanvasLayer/Panel/mob:modulate")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
@@ -197,7 +197,7 @@ tracks/3/keys = {
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("Panel/AnimatedSprite2D:visible")
tracks/4/path = NodePath("CanvasLayer/Panel/AnimatedSprite2D:visible")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
@@ -209,7 +209,7 @@ tracks/4/keys = {
tracks/5/type = "value"
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/path = NodePath("Panel/AnimatedSprite2D:frame")
tracks/5/path = NodePath("CanvasLayer/Panel/AnimatedSprite2D:frame")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
@@ -221,19 +221,19 @@ tracks/5/keys = {
tracks/6/type = "value"
tracks/6/imported = false
tracks/6/enabled = true
tracks/6/path = NodePath("Panel/mob:position")
tracks/6/path = NodePath("CanvasLayer/Panel/mob:position")
tracks/6/interp = 1
tracks/6/loop_wrap = true
tracks/6/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(-56, -101)]
"values": [Vector2(50, 50)]
}
tracks/7/type = "value"
tracks/7/imported = false
tracks/7/enabled = true
tracks/7/path = NodePath("Panel/mob:scale")
tracks/7/path = NodePath("CanvasLayer/Panel/mob:scale")
tracks/7/interp = 1
tracks/7/loop_wrap = true
tracks/7/keys = {
@@ -245,7 +245,7 @@ tracks/7/keys = {
tracks/8/type = "value"
tracks/8/imported = false
tracks/8/enabled = true
tracks/8/path = NodePath("Panel/Sprite2D:visible")
tracks/8/path = NodePath("CanvasLayer/Panel/Sprite2D:visible")
tracks/8/interp = 1
tracks/8/loop_wrap = true
tracks/8/keys = {
@@ -257,7 +257,7 @@ tracks/8/keys = {
tracks/9/type = "value"
tracks/9/imported = false
tracks/9/enabled = true
tracks/9/path = NodePath("AudioStreamPlayer:stream")
tracks/9/path = NodePath("CanvasLayer/AudioStreamPlayer:stream")
tracks/9/interp = 1
tracks/9/loop_wrap = true
tracks/9/keys = {
@@ -269,7 +269,7 @@ tracks/9/keys = {
tracks/10/type = "value"
tracks/10/imported = false
tracks/10/enabled = true
tracks/10/path = NodePath("Panel/mob:texture")
tracks/10/path = NodePath("CanvasLayer/Panel/mob:texture")
tracks/10/interp = 1
tracks/10/loop_wrap = true
tracks/10/keys = {
@@ -281,7 +281,7 @@ tracks/10/keys = {
tracks/11/type = "value"
tracks/11/imported = false
tracks/11/enabled = true
tracks/11/path = NodePath("Question:modulate")
tracks/11/path = NodePath("CanvasLayer/MarginContainer/Question:modulate")
tracks/11/interp = 1
tracks/11/loop_wrap = true
tracks/11/keys = {
@@ -293,7 +293,7 @@ tracks/11/keys = {
tracks/12/type = "value"
tracks/12/imported = false
tracks/12/enabled = true
tracks/12/path = NodePath("Question:visible")
tracks/12/path = NodePath("CanvasLayer/MarginContainer/Question:visible")
tracks/12/interp = 1
tracks/12/loop_wrap = true
tracks/12/keys = {
@@ -305,7 +305,7 @@ tracks/12/keys = {
tracks/13/type = "value"
tracks/13/imported = false
tracks/13/enabled = true
tracks/13/path = NodePath("Panel/caniche:visible")
tracks/13/path = NodePath("CanvasLayer/Panel/caniche:visible")
tracks/13/interp = 1
tracks/13/loop_wrap = true
tracks/13/keys = {
@@ -317,7 +317,7 @@ tracks/13/keys = {
tracks/14/type = "value"
tracks/14/imported = false
tracks/14/enabled = true
tracks/14/path = NodePath("Panel/caniche:frame")
tracks/14/path = NodePath("CanvasLayer/Panel/caniche:frame")
tracks/14/interp = 1
tracks/14/loop_wrap = true
tracks/14/keys = {
@@ -329,7 +329,7 @@ tracks/14/keys = {
tracks/15/type = "value"
tracks/15/imported = false
tracks/15/enabled = true
tracks/15/path = NodePath("AudioStreamPlayer2:stream")
tracks/15/path = NodePath("CanvasLayer/AudioStreamPlayer2:stream")
tracks/15/interp = 1
tracks/15/loop_wrap = true
tracks/15/keys = {
@@ -341,7 +341,7 @@ tracks/15/keys = {
tracks/16/type = "value"
tracks/16/imported = false
tracks/16/enabled = true
tracks/16/path = NodePath("AudioStreamPlayer2:playing")
tracks/16/path = NodePath("CanvasLayer/AudioStreamPlayer2:playing")
tracks/16/interp = 1
tracks/16/loop_wrap = true
tracks/16/keys = {
@@ -357,7 +357,7 @@ length = 4.0
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Panel/back:texture")
tracks/0/path = NodePath("CanvasLayer/Panel/back:texture")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
@@ -369,7 +369,7 @@ tracks/0/keys = {
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("AudioStreamPlayer:playing")
tracks/1/path = NodePath("CanvasLayer/AudioStreamPlayer:playing")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
@@ -381,7 +381,7 @@ tracks/1/keys = {
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Panel/AnimatedSprite2D:visible")
tracks/2/path = NodePath("CanvasLayer/Panel/AnimatedSprite2D:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
@@ -393,7 +393,7 @@ tracks/2/keys = {
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Panel/AnimatedSprite2D:frame")
tracks/3/path = NodePath("CanvasLayer/Panel/AnimatedSprite2D:frame")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
@@ -405,7 +405,7 @@ tracks/3/keys = {
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("Panel/caniche:visible")
tracks/4/path = NodePath("CanvasLayer/Panel/caniche:visible")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
@@ -417,7 +417,7 @@ tracks/4/keys = {
tracks/5/type = "value"
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/path = NodePath("Panel/caniche:frame")
tracks/5/path = NodePath("CanvasLayer/Panel/caniche:frame")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
@@ -429,7 +429,7 @@ tracks/5/keys = {
tracks/6/type = "value"
tracks/6/imported = false
tracks/6/enabled = true
tracks/6/path = NodePath("AudioStreamPlayer:stream")
tracks/6/path = NodePath("CanvasLayer/AudioStreamPlayer:stream")
tracks/6/interp = 1
tracks/6/loop_wrap = true
tracks/6/keys = {
@@ -441,7 +441,7 @@ tracks/6/keys = {
tracks/7/type = "value"
tracks/7/imported = false
tracks/7/enabled = true
tracks/7/path = NodePath("AudioStreamPlayer2:stream")
tracks/7/path = NodePath("CanvasLayer/AudioStreamPlayer2:stream")
tracks/7/interp = 1
tracks/7/loop_wrap = true
tracks/7/keys = {
@@ -453,7 +453,7 @@ tracks/7/keys = {
tracks/8/type = "value"
tracks/8/imported = false
tracks/8/enabled = true
tracks/8/path = NodePath("AudioStreamPlayer2:playing")
tracks/8/path = NodePath("CanvasLayer/AudioStreamPlayer2:playing")
tracks/8/interp = 1
tracks/8/loop_wrap = true
tracks/8/keys = {
@@ -469,7 +469,7 @@ length = 0.5
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Panel/back:texture")
tracks/0/path = NodePath("CanvasLayer/Panel/back:texture")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
@@ -485,7 +485,7 @@ length = 4.0
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Panel/back:texture")
tracks/0/path = NodePath("CanvasLayer/Panel/back:texture")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
@@ -497,7 +497,7 @@ tracks/0/keys = {
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("AudioStreamPlayer:playing")
tracks/1/path = NodePath("CanvasLayer/AudioStreamPlayer:playing")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
@@ -509,7 +509,7 @@ tracks/1/keys = {
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Trick:visible")
tracks/2/path = NodePath("CanvasLayer/MarginContainer/Trick:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
@@ -521,7 +521,7 @@ tracks/2/keys = {
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Panel/mob:modulate")
tracks/3/path = NodePath("CanvasLayer/Panel/mob:modulate")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
@@ -533,7 +533,7 @@ tracks/3/keys = {
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("Panel/AnimatedSprite2D:visible")
tracks/4/path = NodePath("CanvasLayer/Panel/AnimatedSprite2D:visible")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
@@ -545,7 +545,7 @@ tracks/4/keys = {
tracks/5/type = "value"
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/path = NodePath("Panel/AnimatedSprite2D:frame")
tracks/5/path = NodePath("CanvasLayer/Panel/AnimatedSprite2D:frame")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
@@ -560,7 +560,7 @@ resource_name = "question"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Trick:visible")
tracks/0/path = NodePath("CanvasLayer/MarginContainer/Trick:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
@@ -572,7 +572,7 @@ tracks/0/keys = {
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("AudioStreamPlayer:stream")
tracks/1/path = NodePath("CanvasLayer/AudioStreamPlayer:stream")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
@@ -584,7 +584,7 @@ tracks/1/keys = {
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("AudioStreamPlayer:playing")
tracks/2/path = NodePath("CanvasLayer/AudioStreamPlayer:playing")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
@@ -596,7 +596,7 @@ tracks/2/keys = {
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Question:modulate")
tracks/3/path = NodePath("CanvasLayer/MarginContainer/Question:modulate")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
@@ -608,7 +608,7 @@ tracks/3/keys = {
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("Question:visible")
tracks/4/path = NodePath("CanvasLayer/MarginContainer/Question:visible")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
@@ -624,7 +624,7 @@ length = 2.0
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Panel/back:texture")
tracks/0/path = NodePath("CanvasLayer/Panel/back:texture")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
@@ -636,7 +636,7 @@ tracks/0/keys = {
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Panel/mob:position")
tracks/1/path = NodePath("CanvasLayer/Panel/mob:position")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
@@ -648,7 +648,7 @@ tracks/1/keys = {
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Panel/AnimatedSprite2D:visible")
tracks/2/path = NodePath("CanvasLayer/Panel/AnimatedSprite2D:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
@@ -660,7 +660,7 @@ tracks/2/keys = {
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Panel/mob:scale")
tracks/3/path = NodePath("CanvasLayer/Panel/mob:scale")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
@@ -672,7 +672,7 @@ tracks/3/keys = {
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("Panel/Sprite2D:visible")
tracks/4/path = NodePath("CanvasLayer/Panel/Sprite2D:visible")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
@@ -684,7 +684,7 @@ tracks/4/keys = {
tracks/5/type = "value"
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/path = NodePath("AudioStreamPlayer:stream")
tracks/5/path = NodePath("CanvasLayer/AudioStreamPlayer:stream")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
@@ -696,7 +696,7 @@ tracks/5/keys = {
tracks/6/type = "value"
tracks/6/imported = false
tracks/6/enabled = true
tracks/6/path = NodePath("AudioStreamPlayer:playing")
tracks/6/path = NodePath("CanvasLayer/AudioStreamPlayer:playing")
tracks/6/interp = 1
tracks/6/loop_wrap = true
tracks/6/keys = {
@@ -708,7 +708,7 @@ tracks/6/keys = {
tracks/7/type = "value"
tracks/7/imported = false
tracks/7/enabled = true
tracks/7/path = NodePath("Panel/mob:texture")
tracks/7/path = NodePath("CanvasLayer/Panel/mob:texture")
tracks/7/interp = 1
tracks/7/loop_wrap = true
tracks/7/keys = {
@@ -720,7 +720,7 @@ tracks/7/keys = {
tracks/8/type = "value"
tracks/8/imported = false
tracks/8/enabled = true
tracks/8/path = NodePath("Panel/mob:modulate")
tracks/8/path = NodePath("CanvasLayer/Panel/mob:modulate")
tracks/8/interp = 0
tracks/8/loop_wrap = true
tracks/8/keys = {
@@ -740,7 +740,7 @@ _data = {
"shot": SubResource("Animation_0jdtk")
}
[node name="door_view" type="Control" node_paths=PackedStringArray("mob", "anim", "text_mob", "butA", "butB")]
[node name="door_view" type="Control" node_paths=PackedStringArray("mob", "anim", "layer", "text_mob", "butA", "butB")]
process_mode = 3
layout_mode = 3
anchors_preset = 15
@@ -749,132 +749,147 @@ anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_nmul8")
mob = NodePath("Panel/mob")
anim = NodePath("AnimationPlayer")
text_mob = NodePath("Question/Label")
butA = NodePath("Question/a")
butB = NodePath("Question/b")
mob = NodePath("CanvasLayer/Panel/mob")
anim = NodePath("CanvasLayer/AnimationPlayer")
layer = NodePath("CanvasLayer")
text_mob = NodePath("CanvasLayer/MarginContainer/Question/Label")
butA = NodePath("CanvasLayer/MarginContainer/Question/a")
butB = NodePath("CanvasLayer/MarginContainer/Question/b")
metadata/_edit_use_anchors_ = true
[node name="Panel" type="Panel" parent="."]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
[node name="CanvasLayer" type="CanvasLayer" parent="."]
visible = false
[node name="Panel" type="Panel" parent="CanvasLayer"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 0
size_flags_vertical = 0
theme_override_styles/panel = SubResource("StyleBoxEmpty_jooqt")
[node name="back" type="Sprite2D" parent="Panel"]
[node name="back" type="Sprite2D" parent="CanvasLayer/Panel"]
texture = ExtResource("1_suqi6")
centered = false
[node name="mob" type="Sprite2D" parent="Panel"]
[node name="mob" type="Sprite2D" parent="CanvasLayer/Panel"]
modulate = Color(1, 1, 1, 0)
position = Vector2(-56, -101)
position = Vector2(50, 50)
texture = ExtResource("3_7edmr")
centered = false
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="Panel"]
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="CanvasLayer/Panel"]
visible = false
position = Vector2(56, 49)
position = Vector2(233, 198)
sprite_frames = SubResource("SpriteFrames_gtid6")
autoplay = "default"
[node name="Sprite2D" type="Sprite2D" parent="Panel"]
[node name="Sprite2D" type="Sprite2D" parent="CanvasLayer/Panel"]
visible = false
position = Vector2(200, 150)
texture = ExtResource("25_l02i0")
[node name="caniche" type="AnimatedSprite2D" parent="Panel"]
[node name="caniche" type="AnimatedSprite2D" parent="CanvasLayer/Panel"]
visible = false
position = Vector2(208, 174)
sprite_frames = SubResource("SpriteFrames_lu262")
autoplay = "default"
frame = 2
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_b36fu")
}
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource("26_7kpao")
volume_db = -20.0
[node name="Trick" type="VBoxContainer" parent="."]
visible = false
layout_mode = 1
[node name="MarginContainer" type="MarginContainer" parent="CanvasLayer"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_top = 155.0
offset_bottom = -2.0
grow_horizontal = 2
grow_vertical = 2
metadata/_edit_use_anchors_ = true
theme_override_constants/margin_left = 8
theme_override_constants/margin_top = 8
theme_override_constants/margin_right = 8
theme_override_constants/margin_bottom = 8
[node name="Label" type="Label" parent="Trick"]
custom_minimum_size = Vector2(263.595, 79.17)
[node name="Trick" type="VBoxContainer" parent="CanvasLayer/MarginContainer"]
visible = false
layout_mode = 2
size_flags_vertical = 8
alignment = 2
[node name="Label" type="Label" parent="CanvasLayer/MarginContainer/Trick"]
custom_minimum_size = Vector2(0, 9.665)
layout_mode = 2
theme = ExtResource("5_50q8s")
theme_override_font_sizes/font_size = 18
text = "Trick or treat ?"
autowrap_mode = 2
horizontal_alignment = 1
vertical_alignment = 2
autowrap_mode = 3
[node name="Button" type="Button" parent="Trick"]
[node name="Button" type="Button" parent="CanvasLayer/MarginContainer/Trick"]
custom_minimum_size = Vector2(128.58, 0)
layout_mode = 2
size_flags_vertical = 4
theme = ExtResource("5_50q8s")
theme_override_font_sizes/font_size = 18
text = "Trick"
[node name="Button2" type="Button" parent="Trick"]
[node name="Button2" type="Button" parent="CanvasLayer/MarginContainer/Trick"]
layout_mode = 2
theme = ExtResource("5_50q8s")
theme_override_font_sizes/font_size = 18
text = "Treat
"
[node name="Question" type="VBoxContainer" parent="."]
[node name="Question" type="VBoxContainer" parent="CanvasLayer/MarginContainer"]
visible = false
modulate = Color(1, 1, 1, 0)
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_top = 155.0
offset_bottom = -2.0
grow_horizontal = 2
grow_vertical = 2
metadata/_edit_use_anchors_ = true
custom_minimum_size = Vector2(0, 0.09)
layout_mode = 2
size_flags_vertical = 8
alignment = 2
[node name="Label" type="Label" parent="Question"]
custom_minimum_size = Vector2(263.595, 79.17)
[node name="Label" type="Label" parent="CanvasLayer/MarginContainer/Question"]
custom_minimum_size = Vector2(0, 10)
layout_mode = 2
theme = ExtResource("5_50q8s")
theme_override_font_sizes/font_size = 18
text = "Trick or treat salut a tous les amis moi c'est davide la farge pokemon"
horizontal_alignment = 1
vertical_alignment = 2
autowrap_mode = 2
[node name="a" type="Button" parent="Question"]
[node name="a" type="Button" parent="CanvasLayer/MarginContainer/Question"]
custom_minimum_size = Vector2(128.58, 0)
layout_mode = 2
theme = ExtResource("5_50q8s")
theme_override_font_sizes/font_size = 18
text = "Trick"
autowrap_mode = 3
[node name="b" type="Button" parent="Question"]
[node name="b" type="Button" parent="CanvasLayer/MarginContainer/Question"]
layout_mode = 2
theme = ExtResource("5_50q8s")
theme_override_font_sizes/font_size = 18
text = "Treat
"
autowrap_mode = 3
[node name="AudioStreamPlayer2" type="AudioStreamPlayer" parent="."]
[node name="AnimationPlayer" type="AnimationPlayer" parent="CanvasLayer"]
root_node = NodePath("../..")
libraries = {
"": SubResource("AnimationLibrary_b36fu")
}
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="CanvasLayer"]
stream = ExtResource("26_7kpao")
volume_db = -20.0
[node name="AudioStreamPlayer2" type="AudioStreamPlayer" parent="CanvasLayer"]
process_mode = 3
stream = ExtResource("36_7m6d4")
volume_db = -20.0
[connection signal="pressed" from="Trick/Button" to="." method="TrickPressed"]
[connection signal="pressed" from="Trick/Button2" to="." method="TreatPressed"]
[connection signal="pressed" from="Question/a" to="." method="APressed"]
[connection signal="pressed" from="Question/b" to="." method="BPressed"]
[connection signal="pressed" from="CanvasLayer/MarginContainer/Trick/Button" to="." method="TrickPressed"]
[connection signal="pressed" from="CanvasLayer/MarginContainer/Trick/Button2" to="." method="TreatPressed"]
[connection signal="pressed" from="CanvasLayer/MarginContainer/Question/a" to="." method="APressed"]
[connection signal="pressed" from="CanvasLayer/MarginContainer/Question/b" to="." method="BPressed"]

View File

@@ -1,9 +1,10 @@
[gd_scene load_steps=8 format=3 uid="uid://co0u7xd45nxv1"]
[gd_scene load_steps=9 format=3 uid="uid://co0u7xd45nxv1"]
[ext_resource type="FontFile" uid="uid://c0i81edd5mitx" path="res://font/October Crow.ttf" id="1_ndt1a"]
[ext_resource type="Script" path="res://script/Menu.cs" id="1_pfhrs"]
[ext_resource type="Theme" uid="uid://depo4fa5p8k8m" path="res://themes/button.tres" id="2_166c6"]
[ext_resource type="Texture2D" uid="uid://surjj4dbldjy" path="res://model/back_menu.png" id="2_e3nc5"]
[ext_resource type="Theme" uid="uid://d0wymiuig18m3" path="res://themes/label.tres" id="5_4sgtc"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ukgpa"]
@@ -108,7 +109,7 @@ columns = 2
modulate = Color(1, 1, 1, 0.247059)
custom_minimum_size = Vector2(145.415, 0)
layout_mode = 2
theme = ExtResource("2_166c6")
theme = ExtResource("5_4sgtc")
theme_override_font_sizes/font_size = 18
text = "Black spell of destruction"
horizontal_alignment = 1
@@ -118,7 +119,7 @@ autowrap_mode = 2
modulate = Color(1, 1, 1, 0.247059)
custom_minimum_size = Vector2(145.415, 0)
layout_mode = 2
theme = ExtResource("2_166c6")
theme = ExtResource("5_4sgtc")
theme_override_font_sizes/font_size = 18
text = "Necromancy"
horizontal_alignment = 1
@@ -128,7 +129,7 @@ autowrap_mode = 2
modulate = Color(1, 1, 1, 0.247059)
custom_minimum_size = Vector2(145.415, 0)
layout_mode = 2
theme = ExtResource("2_166c6")
theme = ExtResource("5_4sgtc")
theme_override_font_sizes/font_size = 18
text = "Freezing Moon"
horizontal_alignment = 1
@@ -138,7 +139,7 @@ autowrap_mode = 2
modulate = Color(1, 1, 1, 0.247059)
custom_minimum_size = Vector2(145.415, 0)
layout_mode = 2
theme = ExtResource("2_166c6")
theme = ExtResource("5_4sgtc")
theme_override_font_sizes/font_size = 18
text = "Journey to the stars"
horizontal_alignment = 1
@@ -148,7 +149,7 @@ autowrap_mode = 2
modulate = Color(1, 1, 1, 0.247059)
custom_minimum_size = Vector2(145.415, 0)
layout_mode = 2
theme = ExtResource("2_166c6")
theme = ExtResource("5_4sgtc")
theme_override_font_sizes/font_size = 18
text = "The power of souls"
horizontal_alignment = 1
@@ -158,7 +159,7 @@ autowrap_mode = 2
modulate = Color(1, 1, 1, 0.247059)
custom_minimum_size = Vector2(145.415, 0)
layout_mode = 2
theme = ExtResource("2_166c6")
theme = ExtResource("5_4sgtc")
theme_override_font_sizes/font_size = 18
text = "Mutilations internes"
horizontal_alignment = 1
@@ -168,7 +169,7 @@ autowrap_mode = 2
modulate = Color(1, 1, 1, 0.247059)
custom_minimum_size = Vector2(145.415, 0)
layout_mode = 2
theme = ExtResource("2_166c6")
theme = ExtResource("5_4sgtc")
theme_override_font_sizes/font_size = 18
text = "Manual Breathing"
horizontal_alignment = 1
@@ -178,7 +179,7 @@ autowrap_mode = 2
modulate = Color(1, 1, 1, 0.247059)
custom_minimum_size = Vector2(145.415, 0)
layout_mode = 2
theme = ExtResource("2_166c6")
theme = ExtResource("5_4sgtc")
theme_override_font_sizes/font_size = 18
text = "Spectral visions of mental warfare"
horizontal_alignment = 1

View File

@@ -1,7 +1,8 @@
[gd_scene load_steps=4 format=3 uid="uid://cvos258vtnsju"]
[gd_scene load_steps=5 format=3 uid="uid://cvos258vtnsju"]
[ext_resource type="Texture2D" uid="uid://gnnvs3vb6gbp" path="res://model/Kid1.png" id="1_lgn5e"]
[ext_resource type="AudioStream" uid="uid://cpc4p4a7cly1j" path="res://Whisper.wav" id="2_bqbtd"]
[ext_resource type="Script" path="res://scene/AudioStreamPlayer2d.cs" id="3_xfmw7"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_34g5i"]
@@ -19,3 +20,5 @@ stream = ExtResource("2_bqbtd")
volume_db = -20.0
autoplay = true
max_distance = 128.0
script = ExtResource("3_xfmw7")
audio = ExtResource("2_bqbtd")

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=47 format=3 uid="uid://4ubk6w44h4s2"]
[gd_scene load_steps=48 format=3 uid="uid://4ubk6w44h4s2"]
[ext_resource type="Script" path="res://script/Player.cs" id="1_gmlsd"]
[ext_resource type="Texture2D" uid="uid://bo4q2rvn056p3" path="res://model/PatrickIdle1.png" id="2_w2lj6"]
@@ -32,9 +32,10 @@
[ext_resource type="Texture2D" uid="uid://bex6put0xmadj" path="res://model/Patrickfront2.png" id="12_t0eem"]
[ext_resource type="AudioStream" uid="uid://cpekdylimwdq7" path="res://sound/GameOver6.wav" id="13_0akal"]
[ext_resource type="Texture2D" uid="uid://rbp38pbtd8e0" path="res://model/PatrickIdle2.png" id="13_2yj6y"]
[ext_resource type="Theme" uid="uid://d0wymiuig18m3" path="res://themes/label.tres" id="15_hsss5"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_2homw"]
size = Vector2(34, 53)
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_qxy68"]
height = 40.4
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_eh2ky"]
@@ -400,8 +401,8 @@ aud_voiture = ExtResource("12_dv7eh")
aud_win = ExtResource("13_0akal")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0, -2.5)
shape = SubResource("RectangleShape2D_2homw")
position = Vector2(0, 3.8)
shape = SubResource("CapsuleShape2D_qxy68")
[node name="Icon1" type="Sprite2D" parent="."]
position = Vector2(2, 1)
@@ -416,7 +417,7 @@ offset_top = -118.0
offset_right = 21.0
offset_bottom = -90.0
grow_horizontal = 2
theme = ExtResource("3_4cy24")
theme = ExtResource("15_hsss5")
theme_override_font_sizes/font_size = 26
text = "18:10"
horizontal_alignment = 1
@@ -457,6 +458,7 @@ player = NodePath("../..")
[node name="door_view" parent="Camera2D" node_paths=PackedStringArray("menu") instance=ExtResource("4_0vwed")]
visible = false
size_flags_horizontal = 4
menu = NodePath("../menu")
[node name="gameover" type="CanvasLayer" parent="Camera2D"]

93
scene/remplissage.cs Normal file
View File

@@ -0,0 +1,93 @@
using Godot;
using Godot.Collections;
using System;
using System.Collections.Generic;
public partial class remplissage : Node2D
{
[Export] Array<Texture2D> _textures;
[Export] Array<string> _text;
List<string> questions = new List<string>
{
"Why should I give you a candy ?",
"Is SAO a good anime ?",
"Is the earth flat ?",
"Whats the answer to 1+1 ?",
"Whats the answer to life ?",
"I dont like your cosplay",
"Man or bear ?",
"Is it Spooky Month already ?",
"Do people always smile when they see a dead body ?",
"Why did the girl fall off the swing ?",
"▯▉▓◢▍▯▓▓▌▯▓▯▍▯▌▯▯▕◢",
"What do you taste like ?",
"With the lights out, is it less dangerous ?",
"Are you my lover ?",
"I want your teeth.",
"Theres so many monsters tonight ! Its creepy !",
"Tell me your best villain line !",
"Is it Christmas ?",
"Where is my grandma ?",
"Be honest with me… Am I ugly ?",
"The sky is so pretty !",
"Did you have a good day ? Mine was the worst ever.",
"Can you show me your house ?",
"Do you believe in ghosts ?",
"I like going to the cemetery a lot. We can go there together !",
"Do you know Bob ? I saw him last night going somewhere with a knife.",
"That guy Bob, I saw him running near the park last night.",
"I was at the park last night and I heard someone screaming !",
"My friend Bob asked me two days ago if he could borrow my shovel, but he didn't give it back to me !",
"I saw a new flower bed in the park this morning. But it was very ugly and there was a flower that looked like a hand.",
"I discovered this morning that someone stole my car ! There was just a shovel left on the floor !",
"I heard that the little Georgie is dead. Its sad to die at this age. No one is safe nowadays.",
"You know, sometimes I feel like I shouldnt be here",
"This book is not good ! I should have known when I saw the creepy face on the cover. Do you want it ?",
"A weird guy with a mask stalks me everyday ! Can you help me ?",
"Do you think the sun is black ?",
"I ate my family. Would you like to taste them ?",
"I dont have a good memory. What day is it ?"
};
List<Node2D> _nodes;
private int RandSeed = 69;
// Called when the node enters the scene tree for the first time.
public override void _Ready()
{
int i = 0;
_nodes = new List<Node2D>();
foreach (Node2D node in this.GetChildren())
{
_nodes.Add(node);
}
shuffle(_nodes, RandSeed);
foreach (Node2D node in _nodes)
{
if (i < _textures.Count) node.Set("image_mob", _textures[i]);
i++;
}
}
private void shuffle(List<Node2D> nodes, int seed)
{
Random rnd = new Random(seed);
int n = nodes.Count;
while(n > 1)
{
n--;
int k = rnd.Next(n + 1);
Node2D value = nodes[k];
nodes[k] = nodes[n];
nodes[n] = value;
}
}
}

View File

@@ -13,7 +13,7 @@ public partial class Door : Node2D
[Export] AudioStream audio;
[ExportGroup("image")]
[Export] Texture2D image_mob;
[Export] Texture2D image_mob { get; set; }
bool player_in = false;
CharacterBody2D player;
bool open = false;

View File

@@ -2,12 +2,14 @@ using Godot;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection.Emit;
public partial class DoorView : Control
{
[Export] Sprite2D mob;
[Export] AnimationPlayer anim;
[Export] Control menu;
[Export] CanvasLayer layer;
Texture2D mobTex {get; set;}
@@ -23,7 +25,7 @@ public partial class DoorView : Control
CharacterBody2D player;
[Export] Label text_mob;
[Export] Godot.Label text_mob;
[Export] Button butA;
[Export] Button butB;
@@ -46,11 +48,12 @@ public partial class DoorView : Control
txt.Add("Spectral visions of mental warfare");
player = (CharacterBody2D)GetParent().GetParent();
}
public async void start()
{
public void start()
{
trick_bool = false;
GetParent<Camera2D>().PositionSmoothingEnabled = false;
Input.MouseMode = Input.MouseModeEnum.Visible;
layer.Visible = true;
Input.MouseMode = Input.MouseModeEnum.Visible;
GetTree().Paused = true;
Visible = true;
mob.Texture = mobTex;
@@ -73,9 +76,12 @@ public partial class DoorView : Control
public void stop()
{
Input.MouseMode = Input.MouseModeEnum.Hidden;
layer.Visible = false;
Input.MouseMode = Input.MouseModeEnum.Hidden;
GetParent<Camera2D>().PositionSmoothingEnabled = false;
GetTree().Paused = false;
GetTree().Paused = false;
Visible = false;
anim.Play("RESET");
}

View File

@@ -48,7 +48,8 @@ public partial class Player : CharacterBody2D
public override void _Ready()
{
this.AddToGroup("player");
cam.PositionSmoothingEnabled = false;
this.AddToGroup("player");
}
@@ -95,7 +96,7 @@ public partial class Player : CharacterBody2D
}
Vector2 direction = Input.GetVector("left", "right", "up", "down");
direction = direction.Normalized();
//direction = direction.Normalized();
if (direction != Vector2.Zero)
{
velocity = direction * Speed * (float)delta;

View File

@@ -17,8 +17,9 @@ public partial class Principal : Control
{
GetTree().Paused = false;
parent = GetParent();
sub.Visible = false;
}
sub.Visible = false;
}
// Called every frame. 'delta' is the elapsed time since the previous frame.
public override void _Process(double delta)
@@ -30,7 +31,7 @@ public partial class Principal : Control
}else if (enter && Input.IsActionJustPressed("valid"))
{
Input.MouseMode = Input.MouseModeEnum.Hidden;
//GetTree().Paused = false;
parent.Call("ToCityFunc");
}

View File

@@ -1,4 +1,4 @@
[gd_resource type="Theme" load_steps=7 format=3 uid="uid://depo4fa5p8k8m"]
[gd_resource type="Theme" load_steps=8 format=3 uid="uid://depo4fa5p8k8m"]
[ext_resource type="FontFile" uid="uid://c0i81edd5mitx" path="res://font/October Crow.ttf" id="1_r1ivl"]
@@ -7,7 +7,7 @@ content_margin_left = 4.0
content_margin_top = 4.0
content_margin_right = 4.0
content_margin_bottom = 4.0
bg_color = Color(0.1, 0.1, 0.1, 0.3)
bg_color = Color(0, 0, 0, 0.509804)
corner_detail = 5
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_sr5rc"]
@@ -40,7 +40,7 @@ content_margin_left = 4.0
content_margin_top = 4.0
content_margin_right = 4.0
content_margin_bottom = 4.0
bg_color = Color(0.1, 0.1, 0.1, 0.6)
bg_color = Color(0, 0, 0, 0.509804)
border_width_left = 2
border_width_top = 2
border_width_right = 2
@@ -59,6 +59,9 @@ border_width_right = 2
border_width_bottom = 2
corner_detail = 5
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_jj5qs"]
bg_color = Color(0, 0, 0, 0.509804)
[resource]
default_font = ExtResource("1_r1ivl")
Button/colors/font_color = Color(0.875, 0.875, 0.875, 1)
@@ -85,3 +88,14 @@ Button/styles/focus = SubResource("StyleBoxFlat_sr5rc")
Button/styles/hover = SubResource("StyleBoxFlat_5cr8x")
Button/styles/normal = SubResource("StyleBoxFlat_shsof")
Button/styles/pressed = SubResource("StyleBoxFlat_jlobp")
Label/colors/font_color = Color(1, 1, 1, 1)
Label/colors/font_outline_color = Color(0, 0, 0, 1)
Label/colors/font_shadow_color = Color(0, 0, 0, 0)
Label/constants/line_spacing = 3
Label/constants/outline_size = 0
Label/constants/shadow_offset_x = 10
Label/constants/shadow_offset_y = 1
Label/constants/shadow_outline_size = 1
Label/font_sizes/font_size = 16
Label/fonts/font = ExtResource("1_r1ivl")
Label/styles/normal = SubResource("StyleBoxFlat_jj5qs")

19
themes/label.tres Normal file
View File

@@ -0,0 +1,19 @@
[gd_resource type="Theme" load_steps=3 format=3 uid="uid://d0wymiuig18m3"]
[ext_resource type="FontFile" uid="uid://c0i81edd5mitx" path="res://font/October Crow.ttf" id="1_4sewc"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_snn1p"]
[resource]
default_font = ExtResource("1_4sewc")
Label/colors/font_color = Color(1, 1, 1, 1)
Label/colors/font_outline_color = Color(0, 0, 0, 1)
Label/colors/font_shadow_color = Color(0, 0, 0, 0)
Label/constants/line_spacing = 3
Label/constants/outline_size = 0
Label/constants/shadow_offset_x = 1
Label/constants/shadow_offset_y = 1
Label/constants/shadow_outline_size = 1
Label/font_sizes/font_size = 16
Label/fonts/font = ExtResource("1_4sewc")
Label/styles/normal = SubResource("StyleBoxEmpty_snn1p")