This commit is contained in:
2024-10-19 19:19:46 +02:00
parent 7c50910690
commit bbf3c5e593
12 changed files with 262 additions and 13 deletions

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=33 format=3 uid="uid://bq2yxcm55h7n8"]
[gd_scene load_steps=34 format=3 uid="uid://bq2yxcm55h7n8"]
[ext_resource type="Script" path="res://script/DoorView.cs" id="1_nmul8"]
[ext_resource type="Texture2D" uid="uid://dpqc1xv3cechw" path="res://model/House1Closed.jpg" id="1_suqi6"]
@@ -26,6 +26,7 @@
[ext_resource type="Texture2D" uid="uid://drvspvx3dpe8u" path="res://model/frame_18_delay-0.1s.png" id="22_atju4"]
[ext_resource type="Texture2D" uid="uid://cggbun65n8uo6" path="res://model/frame_19_delay-0.1s.png" id="23_l4jpt"]
[ext_resource type="Texture2D" uid="uid://ob3tlldg8ta" path="res://model/frame_20_delay-0.1s.png" id="24_tjfip"]
[ext_resource type="AudioStream" uid="uid://blgk5pv3ydewn" path="res://sound/toc.mp3" id="26_7kpao"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_jooqt"]
@@ -310,8 +311,8 @@ script = ExtResource("1_nmul8")
mob = NodePath("Panel/mob")
anim = NodePath("AnimationPlayer")
text_mob = NodePath("Question/Label")
butA = NodePath("Question/Button")
butB = NodePath("Question/Button2")
butA = NodePath("Question/a")
butB = NodePath("Question/b")
[node name="Panel" type="Panel" parent="."]
layout_mode = 1
@@ -343,6 +344,7 @@ libraries = {
}
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource("26_7kpao")
[node name="Trick" type="VBoxContainer" parent="."]
visible = false
@@ -398,14 +400,14 @@ theme_override_font_sizes/font_size = 18
text = "Trick or treat salut a tous les amis moi c'est davide la farge pokemon"
autowrap_mode = 2
[node name="Button" type="Button" parent="Question"]
[node name="a" type="Button" parent="Question"]
custom_minimum_size = Vector2(128.58, 0)
layout_mode = 2
theme = ExtResource("5_50q8s")
theme_override_font_sizes/font_size = 18
text = "Trick"
[node name="Button2" type="Button" parent="Question"]
[node name="b" type="Button" parent="Question"]
layout_mode = 2
theme = ExtResource("5_50q8s")
theme_override_font_sizes/font_size = 18
@@ -413,4 +415,5 @@ text = "Treat
"
[connection signal="pressed" from="Trick/Button2" to="." method="TreatPressed"]
[connection signal="pressed" from="Question/Button2" to="." method="TreatPressed"]
[connection signal="pressed" from="Question/a" to="." method="APressed"]
[connection signal="pressed" from="Question/b" to="." method="BPressed"]

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=31 format=3 uid="uid://4ubk6w44h4s2"]
[gd_scene load_steps=33 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"]
@@ -12,7 +12,9 @@
[ext_resource type="Texture2D" uid="uid://bu5nnr2x4co38" path="res://model/PatrickLeft2.png" id="6_jii6b"]
[ext_resource type="Texture2D" uid="uid://doavv8drnetm" path="res://model/PatrickRight1.png" id="7_xptin"]
[ext_resource type="Texture2D" uid="uid://dbey2oeyhxsq8" path="res://model/PatrickRight2.png" id="8_m32jm"]
[ext_resource type="Texture2D" uid="uid://dxepey1fkkhhv" path="res://model/DiabeteMeter1.png" id="9_0ohl3"]
[ext_resource type="Texture2D" uid="uid://c0oqqh7qgohu" path="res://model/PatrickBack1.png" id="9_y1wtp"]
[ext_resource type="Texture2D" uid="uid://dqqegt7a6ng06" path="res://model/DiabeteMeter2.png" id="10_ete3q"]
[ext_resource type="Texture2D" uid="uid://dgs1topxer4a8" path="res://model/PatrickBack2.png" id="10_rvawd"]
[ext_resource type="Texture2D" uid="uid://cisefnb0eej45" path="res://model/Patrickfront1.png" id="11_wpam5"]
[ext_resource type="Texture2D" uid="uid://bex6put0xmadj" path="res://model/Patrickfront2.png" id="12_t0eem"]
@@ -354,13 +356,15 @@ _data = {
"up": SubResource("Animation_7twwg")
}
[node name="CharacterBody2D" type="CharacterBody2D" node_paths=PackedStringArray("anim", "cam", "menu")]
[node name="CharacterBody2D" type="CharacterBody2D" node_paths=PackedStringArray("anim", "cam", "bar", "menu")]
position = Vector2(1, 1)
motion_mode = 1
script = ExtResource("1_gmlsd")
Speed = 6000.0
sugar_speed = 2.0
anim = NodePath("anim")
cam = NodePath("Camera2D")
bar = NodePath("diabetmeter")
menu = NodePath("Camera2D/menu")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
@@ -371,6 +375,23 @@ shape = SubResource("RectangleShape2D_2homw")
position = Vector2(2, 1)
texture = ExtResource("2_w2lj6")
[node name="diabetmeter" type="TextureProgressBar" parent="."]
texture_filter = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 162.0
offset_top = -121.0
offset_right = 192.0
offset_bottom = 129.0
grow_horizontal = 2
grow_vertical = 2
step = 0.01
value = 50.0
fill_mode = 3
texture_under = ExtResource("9_0ohl3")
texture_progress = ExtResource("10_ete3q")
[node name="Camera2D" type="Camera2D" parent="."]
process_mode = 3
limit_smoothed = true

75
scene/principal.tscn Normal file
View File

@@ -0,0 +1,75 @@
[gd_scene load_steps=6 format=3 uid="uid://cru3yl7laeiem"]
[ext_resource type="Texture2D" uid="uid://mr6hi8icwyle" path="res://model/Trick or treatBG.png" id="1_4oira"]
[ext_resource type="Script" path="res://script/Principal.cs" id="1_5hpqm"]
[ext_resource type="Theme" uid="uid://depo4fa5p8k8m" path="res://themes/button.tres" id="2_ab0tu"]
[ext_resource type="PackedScene" uid="uid://1tfopbwug3ht" path="res://scene/city.tscn" id="2_qp7s0"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_qdt6c"]
bg_color = Color(0, 0, 0, 0.792157)
[node name="Principal" type="Control" node_paths=PackedStringArray("sub")]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_5hpqm")
sub = NodePath("sub")
play = ExtResource("2_qp7s0")
[node name="TrickOrTreatBg" type="Sprite2D" parent="."]
texture = ExtResource("1_4oira")
centered = false
[node name="Enter" type="Button" parent="."]
layout_mode = 0
offset_left = 24.0
offset_top = 238.0
offset_right = 121.0
offset_bottom = 290.0
theme = ExtResource("2_ab0tu")
theme_override_font_sizes/font_size = 42
text = "Enter"
[node name="sub" type="Panel" parent="."]
visible = false
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_qdt6c")
[node name="Play" type="Button" parent="sub"]
layout_mode = 0
offset_left = 284.0
offset_top = 53.0
offset_right = 343.0
offset_bottom = 91.0
theme = ExtResource("2_ab0tu")
text = "Play
"
[node name="Credits" type="Button" parent="sub"]
layout_mode = 0
offset_left = 247.0
offset_top = 149.0
offset_right = 338.0
offset_bottom = 187.0
theme = ExtResource("2_ab0tu")
text = "Credits"
[node name="Exit" type="Button" parent="sub"]
layout_mode = 0
offset_left = 181.0
offset_top = 230.0
offset_right = 233.0
offset_bottom = 268.0
theme = ExtResource("2_ab0tu")
text = "Exit
"
[connection signal="pressed" from="Enter" to="." method="EnterPressed"]