toutGlobalement

This commit is contained in:
2024-10-19 15:17:39 +02:00
parent 93a468a604
commit dbad63f3b0
19 changed files with 1464 additions and 47 deletions

34
model/Glitch1.png.import Normal file
View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cgql6fnplgyeo"
path="res://.godot/imported/Glitch1.png-bb9c2548ef4383b5ff02d816da002a73.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://model/Glitch1.png"
dest_files=["res://.godot/imported/Glitch1.png-bb9c2548ef4383b5ff02d816da002a73.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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

34
model/Glitch2.png.import Normal file
View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b4dlsfi5glbqf"
path="res://.godot/imported/Glitch2.png-b12005bbd71c2ca903eeea9c0f1000f8.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://model/Glitch2.png"
dest_files=["res://.godot/imported/Glitch2.png-b12005bbd71c2ca903eeea9c0f1000f8.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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

34
model/Glitch3.png.import Normal file
View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dwd4cqn0sfv0i"
path="res://.godot/imported/Glitch3.png-f32eaabd4dcfd42e515b7c47271f9dfb.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://model/Glitch3.png"
dest_files=["res://.godot/imported/Glitch3.png-f32eaabd4dcfd42e515b7c47271f9dfb.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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

34
model/Glitch4.png.import Normal file
View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dyi5a1hlwio71"
path="res://.godot/imported/Glitch4.png-2aacd781476aac03c9fdd980ef9e5106.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://model/Glitch4.png"
dest_files=["res://.godot/imported/Glitch4.png-2aacd781476aac03c9fdd980ef9e5106.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bna4larududon"
path="res://.godot/imported/HouseTileMap.png-ffbe6b6af49d0482327d6eef0b310ca1.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://model/HouseTileMap.png"
dest_files=["res://.godot/imported/HouseTileMap.png-ffbe6b6af49d0482327d6eef0b310ca1.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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

34
model/Light.png.import Normal file
View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cfljnqr8b3gki"
path="res://.godot/imported/Light.png-4dd3865e34795b01d4f14f59b9df1196.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://model/Light.png"
dest_files=["res://.godot/imported/Light.png-4dd3865e34795b01d4f14f59b9df1196.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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

34
model/TileMap.png.import Normal file
View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dkg613gwabtd2"
path="res://.godot/imported/TileMap.png-f1358d46f7d1da7ca84753efa6f48eee.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://model/TileMap.png"
dest_files=["res://.godot/imported/TileMap.png-f1358d46f7d1da7ca84753efa6f48eee.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
model/back_menu.png~ Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@@ -21,6 +21,8 @@ window/size/viewport_width=400
window/size/viewport_height=300 window/size/viewport_height=300
window/size/mode=2 window/size/mode=2
window/stretch/mode="viewport" window/stretch/mode="viewport"
window/stretch/scale_mode="integer"
window/per_pixel_transparency/allowed=true
[dotnet] [dotnet]
@@ -57,8 +59,15 @@ down={
, 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":4194322,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) , 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":4194322,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
] ]
} }
interact={
"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":69,"key_label":0,"unicode":101,"location":0,"echo":false,"script":null)
, 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)
]
}
[rendering] [rendering]
textures/canvas_textures/default_texture_filter=0
2d/snap/snap_2d_transforms_to_pixel=true 2d/snap/snap_2d_transforms_to_pixel=true
2d/snap/snap_2d_vertices_to_pixel=true 2d/snap/snap_2d_vertices_to_pixel=true

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,9 @@
[gd_scene format=3 uid="uid://bq2yxcm55h7n8"]
[node name="door_view" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=6 format=3 uid="uid://co0u7xd45nxv1"] [gd_scene load_steps=7 format=3 uid="uid://co0u7xd45nxv1"]
[ext_resource type="FontFile" uid="uid://c0i81edd5mitx" path="res://font/October Crow.ttf" id="1_ndt1a"] [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="Script" path="res://script/Menu.cs" id="1_pfhrs"]
@@ -7,6 +7,8 @@
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ukgpa"] [sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ukgpa"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_1bsfp"]
[node name="menu" type="Control"] [node name="menu" type="Control"]
process_mode = 3 process_mode = 3
layout_mode = 3 layout_mode = 3
@@ -17,7 +19,7 @@ grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
script = ExtResource("1_pfhrs") script = ExtResource("1_pfhrs")
[node name="Panel" type="Panel" parent="."] [node name="background" type="Panel" parent="."]
layout_mode = 1 layout_mode = 1
anchors_preset = 15 anchors_preset = 15
anchor_right = 1.0 anchor_right = 1.0
@@ -26,11 +28,17 @@ grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
theme_override_styles/panel = SubResource("StyleBoxEmpty_ukgpa") theme_override_styles/panel = SubResource("StyleBoxEmpty_ukgpa")
[node name="Sprite2D" type="Sprite2D" parent="Panel"] [node name="Sprite2D" type="Sprite2D" parent="background"]
position = Vector2(200, 150) position = Vector2(200, 150)
texture = ExtResource("2_e3nc5") texture = ExtResource("2_e3nc5")
[node name="Paused" type="Label" parent="."] [node name="Panel" type="Panel" parent="."]
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
theme_override_styles/panel = SubResource("StyleBoxEmpty_1bsfp")
[node name="Paused" type="Label" parent="Panel"]
layout_mode = 2 layout_mode = 2
offset_left = 28.0 offset_left = 28.0
offset_top = 17.0 offset_top = 17.0
@@ -40,7 +48,7 @@ theme_override_fonts/font = ExtResource("1_ndt1a")
theme_override_font_sizes/font_size = 64 theme_override_font_sizes/font_size = 64
text = "Paused" text = "Paused"
[node name="VBoxContainer" type="VBoxContainer" parent="."] [node name="VBoxContainer" type="VBoxContainer" parent="Panel"]
custom_minimum_size = Vector2(100, 0) custom_minimum_size = Vector2(100, 0)
layout_mode = 2 layout_mode = 2
offset_left = 250.0 offset_left = 250.0
@@ -51,24 +59,29 @@ size_flags_horizontal = 4
theme_override_constants/separation = 16 theme_override_constants/separation = 16
alignment = 1 alignment = 1
[node name="Resume" type="Button" parent="VBoxContainer"] [node name="Resume" type="Button" parent="Panel/VBoxContainer"]
layout_mode = 2 layout_mode = 2
theme = ExtResource("2_166c6") theme = ExtResource("2_166c6")
text = "Resume text = "Resume
" "
[node name="option" type="Button" parent="VBoxContainer"] [node name="Trick" type="Button" parent="Panel/VBoxContainer"]
layout_mode = 2 layout_mode = 2
theme = ExtResource("2_166c6") theme = ExtResource("2_166c6")
text = "Options text = "Trick
" "
[node name="exit" type="Button" parent="VBoxContainer"] [node name="exit" type="Button" parent="Panel/VBoxContainer"]
layout_mode = 2 layout_mode = 2
theme = ExtResource("2_166c6") theme = ExtResource("2_166c6")
text = "Exit text = "Exit
" "
[connection signal="button_down" from="VBoxContainer/Resume" to="." method="ResumeDown"] [node name="TrickMenu" type="Control" parent="."]
[connection signal="button_down" from="VBoxContainer/option" to="." method="OptionDown"] anchors_preset = 0
[connection signal="button_down" from="VBoxContainer/exit" to="." method="ExitDown"] offset_right = 40.0
offset_bottom = 40.0
[connection signal="button_down" from="Panel/VBoxContainer/Resume" to="." method="ResumeDown"]
[connection signal="button_down" from="Panel/VBoxContainer/Trick" to="." method="OptionDown"]
[connection signal="button_down" from="Panel/VBoxContainer/exit" to="." method="ExitDown"]

17
scene/door.tscn Normal file
View File

@@ -0,0 +1,17 @@
[gd_scene load_steps=3 format=3 uid="uid://bmt2uv41t2dte"]
[ext_resource type="Script" path="res://script/Door.cs" id="1_xvwbq"]
[sub_resource type="CircleShape2D" id="CircleShape2D_aityf"]
radius = 32.0
[node name="door" type="Node2D"]
script = ExtResource("1_xvwbq")
[node name="Area2D" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
shape = SubResource("CircleShape2D_aityf")
[connection signal="body_entered" from="Area2D" to="." method="BodyEntered"]
[connection signal="body_exited" from="Area2D" to="." method="BodyExited"]

View File

@@ -1,35 +1,411 @@
[gd_scene load_steps=5 format=3 uid="uid://4ubk6w44h4s2"] [gd_scene load_steps=31 format=3 uid="uid://4ubk6w44h4s2"]
[ext_resource type="Script" path="res://script/Player.cs" id="1_gmlsd"] [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"] [ext_resource type="Texture2D" uid="uid://bo4q2rvn056p3" path="res://model/PatrickIdle1.png" id="2_w2lj6"]
[ext_resource type="PackedScene" uid="uid://co0u7xd45nxv1" path="res://scene/control/menu.tscn" id="3_6uvd0"] [ext_resource type="PackedScene" uid="uid://co0u7xd45nxv1" path="res://scene/control/menu.tscn" id="3_6uvd0"]
[ext_resource type="Texture2D" uid="uid://cgql6fnplgyeo" path="res://model/Glitch1.png" id="3_kao8s"]
[ext_resource type="PackedScene" uid="uid://bq2yxcm55h7n8" path="res://scene/control/door_view.tscn" id="4_0vwed"]
[ext_resource type="Texture2D" uid="uid://b4dlsfi5glbqf" path="res://model/Glitch2.png" id="4_smidx"]
[ext_resource type="Texture2D" uid="uid://dwd4cqn0sfv0i" path="res://model/Glitch3.png" id="5_pmits"]
[ext_resource type="Texture2D" uid="uid://b5mfnew4kh6ht" path="res://model/PatrickLeft1.png" id="5_vnnjt"]
[ext_resource type="Texture2D" uid="uid://dyi5a1hlwio71" path="res://model/Glitch4.png" id="6_73f32"]
[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://c0oqqh7qgohu" path="res://model/PatrickBack1.png" id="9_y1wtp"]
[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"]
[ext_resource type="Texture2D" uid="uid://rbp38pbtd8e0" path="res://model/PatrickIdle2.png" id="13_2yj6y"]
[sub_resource type="CircleShape2D" id="CircleShape2D_5g3cc"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_2homw"]
size = Vector2(34, 53)
[node name="CharacterBody2D" type="CharacterBody2D" node_paths=PackedStringArray("menu")] [sub_resource type="Animation" id="Animation_8ug73"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:texture")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [ExtResource("3_kao8s")]
}
[sub_resource type="Animation" id="Animation_q8biw"]
resource_name = "glitch"
length = 2.0
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:texture")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.5, 1, 1.5, 2.03333),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1),
"update": 1,
"values": [ExtResource("3_kao8s"), ExtResource("4_smidx"), ExtResource("5_pmits"), ExtResource("6_73f32"), ExtResource("3_kao8s")]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_jlbns"]
_data = {
"RESET": SubResource("Animation_8ug73"),
"glitch": SubResource("Animation_q8biw")
}
[sub_resource type="Animation" id="Animation_epvli"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Camera2D:zoom")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(1, 1)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Camera2D:offset")
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("Camera2D/menu:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Camera2D:position")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(0, 0)]
}
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("Camera2D:position_smoothing_enabled")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/5/type = "value"
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/path = NodePath("Icon1:texture")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [ExtResource("2_w2lj6")]
}
[sub_resource type="Animation" id="Animation_shn62"]
resource_name = "down"
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Icon1:texture")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.5, 1),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [ExtResource("11_wpam5"), ExtResource("12_t0eem"), ExtResource("11_wpam5")]
}
[sub_resource type="Animation" id="Animation_mf8ie"]
resource_name = "idle"
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Icon1:texture")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.5, 1),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [ExtResource("2_w2lj6"), ExtResource("13_2yj6y"), ExtResource("2_w2lj6")]
}
[sub_resource type="Animation" id="Animation_8foih"]
resource_name = "left"
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Icon1:texture")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.5, 1),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [ExtResource("5_vnnjt"), ExtResource("6_jii6b"), ExtResource("5_vnnjt")]
}
[sub_resource type="Animation" id="Animation_0ydoq"]
resource_name = "paused"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Camera2D:zoom")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1),
"transitions": PackedFloat32Array(1, 1.5),
"update": 0,
"values": [Vector2(1, 1), Vector2(3, 3)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Camera2D:offset")
tracks/1/interp = 2
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 1),
"transitions": PackedFloat32Array(1, 1.5),
"update": 0,
"values": [Vector2(0, 0), Vector2(20, -10)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Camera2D/menu:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 1),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [false, true]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Camera2D:position_smoothing_enabled")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
[sub_resource type="Animation" id="Animation_d3u02"]
resource_name = "resume"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Camera2D:zoom")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Vector2(3, 3), Vector2(1, 1)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Camera2D:offset")
tracks/1/interp = 2
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 1),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Vector2(20, -10), Vector2(0, 0)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Camera2D/menu:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Camera2D:position")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0, 1),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Vector2(0, 0), Vector2(0, 0)]
}
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("Camera2D:position_smoothing_enabled")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/5/type = "method"
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/path = NodePath("Camera2D/menu")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
"times": PackedFloat32Array(1),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [],
"method": &"Res"
}]
}
[sub_resource type="Animation" id="Animation_qfm7l"]
resource_name = "right"
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Icon1:texture")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.5, 1.03333),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [ExtResource("7_xptin"), ExtResource("8_m32jm"), ExtResource("7_xptin")]
}
[sub_resource type="Animation" id="Animation_7twwg"]
resource_name = "up"
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Icon1:texture")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.5, 1),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [ExtResource("9_y1wtp"), ExtResource("10_rvawd"), ExtResource("9_y1wtp")]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_1e41b"]
_data = {
"RESET": SubResource("Animation_epvli"),
"down": SubResource("Animation_shn62"),
"idle": SubResource("Animation_mf8ie"),
"left": SubResource("Animation_8foih"),
"paused": SubResource("Animation_0ydoq"),
"resume": SubResource("Animation_d3u02"),
"right": SubResource("Animation_qfm7l"),
"up": SubResource("Animation_7twwg")
}
[node name="CharacterBody2D" type="CharacterBody2D" node_paths=PackedStringArray("anim", "cam", "menu")]
position = Vector2(1, 1) position = Vector2(1, 1)
motion_mode = 1 motion_mode = 1
script = ExtResource("1_gmlsd") script = ExtResource("1_gmlsd")
Speed = 5000.0 Speed = 6000.0
anim = NodePath("anim")
cam = NodePath("Camera2D")
menu = NodePath("Camera2D/menu") menu = NodePath("Camera2D/menu")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."] [node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_5g3cc") position = Vector2(0, -2.5)
shape = SubResource("RectangleShape2D_2homw")
[node name="Icon1" type="Sprite2D" parent="."] [node name="Icon1" type="Sprite2D" parent="."]
position = Vector2(2, 1) position = Vector2(2, 1)
texture = ExtResource("2_w2lj6") texture = ExtResource("2_w2lj6")
[node name="Camera2D" type="Camera2D" parent="."] [node name="Camera2D" type="Camera2D" parent="."]
limit_smoothed = true
position_smoothing_enabled = true
rotation_smoothing_speed = 7.0
[node name="menu" parent="Camera2D" instance=ExtResource("3_6uvd0")] [node name="menu" parent="Camera2D" node_paths=PackedStringArray("anim") instance=ExtResource("3_6uvd0")]
visible = false visible = false
anchors_preset = 8 offset_left = -47.0
anchor_left = 0.5 offset_top = -60.0
anchor_top = 0.5 offset_right = -47.0
anchor_right = 0.5 offset_bottom = -60.0
anchor_bottom = 0.5 scale = Vector2(0.334, 0.334)
offset_left = -200.0 anim = NodePath("../../anim")
offset_top = -150.0
offset_right = -200.0 [node name="door_view" parent="Camera2D" instance=ExtResource("4_0vwed")]
offset_bottom = -150.0
[node name="CanvasLayer" type="CanvasLayer" parent="Camera2D"]
[node name="glitch" type="Sprite2D" parent="Camera2D/CanvasLayer"]
position = Vector2(200, 150)
texture = ExtResource("3_kao8s")
[node name="AnimationPlayer" type="AnimationPlayer" parent="Camera2D/CanvasLayer"]
root_node = NodePath("../glitch")
libraries = {
"": SubResource("AnimationLibrary_jlbns")
}
autoplay = "glitch"
speed_scale = 1.5
[node name="anim" type="AnimationPlayer" parent="."]
process_mode = 3
libraries = {
"": SubResource("AnimationLibrary_1e41b")
}
autoplay = "idle"
[node name="PointLight2D" type="PointLight2D" parent="."]

40
script/Door.cs Normal file
View File

@@ -0,0 +1,40 @@
using Godot;
using System;
public partial class Door : Node2D
{
[ExportGroup("text")]
[Export] string text_char;
[Export] string answerA;
[Export] string answerB;
[Export] bool answerA_good;
bool player_in = false;
public override void _Ready()
{
}
// Called every frame. 'delta' is the elapsed time since the previous frame.
public override void _Process(double delta)
{
if(player_in && Input.IsActionPressed("interact"))
{
}
}
public void BodyEntered(Node body)
{
if(body is CharacterBody2D)
{
player_in = true;
}
}
public void BodyExited(Node body)
{
if(body is CharacterBody2D)
{
player_in = false;
}
}
}

View File

@@ -3,6 +3,7 @@ using System;
public partial class Menu : Control public partial class Menu : Control
{ {
[Export] AnimationPlayer anim;
// Called when the node enters the scene tree for the first time. // Called when the node enters the scene tree for the first time.
public override void _Ready() public override void _Ready()
{ {
@@ -15,9 +16,9 @@ public partial class Menu : Control
public void ResumeDown() public void ResumeDown()
{ {
GetTree().Paused = false;
Input.MouseMode = Input.MouseModeEnum.Hidden; Input.MouseMode = Input.MouseModeEnum.Hidden;
Visible = false; anim.Play("resume");
} }
public void OptionDown() public void OptionDown()
@@ -29,4 +30,9 @@ public partial class Menu : Control
{ {
GetTree().Quit(); GetTree().Quit();
} }
public void Res()
{
GetTree().Paused = false;
}
} }

View File

@@ -4,22 +4,19 @@ using System;
public partial class Player : CharacterBody2D public partial class Player : CharacterBody2D
{ {
[Export] float Speed; [Export] float Speed;
[Export] AnimationPlayer anim;
[Export] Camera2D cam;
[ExportGroup("controls")] [ExportGroup("controls")]
[Export] Control menu; [Export] Control menu;
public float PixelSize = 1.0f; public float PixelSize = 1.0f;
public override void _PhysicsProcess(double delta) public override void _PhysicsProcess(double delta)
{ {
Vector2 velocity = Velocity; Vector2 velocity = Velocity;
if(Input.IsActionPressed("quit"))
{
Input.MouseMode = Input.MouseModeEnum.Visible;
GetTree().Paused= true;
menu.Visible = true;
}
Vector2 direction = Input.GetVector("left", "right", "up", "down"); Vector2 direction = Input.GetVector("left", "right", "up", "down");
@@ -32,7 +29,39 @@ public partial class Player : CharacterBody2D
{ {
velocity.X = Mathf.MoveToward(Velocity.X, 0, Speed); velocity.X = Mathf.MoveToward(Velocity.X, 0, Speed);
velocity.Y = Mathf.MoveToward(Velocity.Y, 0, Speed); velocity.Y = Mathf.MoveToward(Velocity.Y, 0, Speed);
velocity = velocity.Round();
} }
if(Input.IsActionPressed("quit"))
{
Input.MouseMode = Input.MouseModeEnum.Visible;
anim.Play("paused");
GetTree().Paused= true;
}
else if(velocity.X > 0)
{
anim.Play("right");
}
else if (velocity.X < 0)
{
anim.Play("left");
}
else if (velocity.Y > 0)
{
anim.Play("down");
}
else if (velocity.Y < 0)
{
anim.Play("up");
}
else
{
anim.Play("idle");
}
Velocity = velocity; Velocity = velocity;
MoveAndSlide(); MoveAndSlide();

View File

@@ -77,7 +77,7 @@ Button/constants/align_to_largest_stylebox = 0
Button/constants/h_separation = 4 Button/constants/h_separation = 4
Button/constants/icon_max_width = 0 Button/constants/icon_max_width = 0
Button/constants/outline_size = 0 Button/constants/outline_size = 0
Button/font_sizes/font_size = 16 Button/font_sizes/font_size = 28
Button/fonts/font = ExtResource("1_r1ivl") Button/fonts/font = ExtResource("1_r1ivl")
Button/styles/disabled = SubResource("StyleBoxFlat_v5x8b") Button/styles/disabled = SubResource("StyleBoxFlat_v5x8b")
Button/styles/focus = SubResource("StyleBoxFlat_sr5rc") Button/styles/focus = SubResource("StyleBoxFlat_sr5rc")