Compare commits
8
Commits
c03a58b042
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b27d83576c | ||
|
|
092f5bad3e | ||
|
|
ec7db9faae | ||
|
|
bb9682cd16 | ||
|
|
2315add8ec | ||
|
|
978fb7aded | ||
|
|
1eccb9bc67 | ||
|
|
55dc6719da |
No files matched your search
BIN
Binary file not shown.
@@ -0,0 +1,19 @@
|
||||
[remap]
|
||||
|
||||
importer="mp3"
|
||||
type="AudioStreamMP3"
|
||||
uid="uid://6plxlmpgut38"
|
||||
path="res://.godot/imported/0.mp3-424b0f7aeee18ccb8b3568142caab51d.mp3str"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/0.mp3"
|
||||
dest_files=["res://.godot/imported/0.mp3-424b0f7aeee18ccb8b3568142caab51d.mp3str"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,19 @@
|
||||
[remap]
|
||||
|
||||
importer="mp3"
|
||||
type="AudioStreamMP3"
|
||||
uid="uid://du02reo6oet7e"
|
||||
path="res://.godot/imported/1.mp3-8249ffbd379df4568a56660e54b71b58.mp3str"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/1.mp3"
|
||||
dest_files=["res://.godot/imported/1.mp3-8249ffbd379df4568a56660e54b71b58.mp3str"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,19 @@
|
||||
[remap]
|
||||
|
||||
importer="mp3"
|
||||
type="AudioStreamMP3"
|
||||
uid="uid://cve6byu0v6rpo"
|
||||
path="res://.godot/imported/2.mp3-c7cf5564039784282e2c058b85f31af4.mp3str"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/2.mp3"
|
||||
dest_files=["res://.godot/imported/2.mp3-c7cf5564039784282e2c058b85f31af4.mp3str"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,19 @@
|
||||
[remap]
|
||||
|
||||
importer="mp3"
|
||||
type="AudioStreamMP3"
|
||||
uid="uid://bq1q527xfecgm"
|
||||
path="res://.godot/imported/3.mp3-2a033077c34e7db70ad702adef172a25.mp3str"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/3.mp3"
|
||||
dest_files=["res://.godot/imported/3.mp3-2a033077c34e7db70ad702adef172a25.mp3str"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,19 @@
|
||||
[remap]
|
||||
|
||||
importer="mp3"
|
||||
type="AudioStreamMP3"
|
||||
uid="uid://bt1gt743xeode"
|
||||
path="res://.godot/imported/4.mp3-581be5890aecc9069741cd559013e363.mp3str"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/4.mp3"
|
||||
dest_files=["res://.godot/imported/4.mp3-581be5890aecc9069741cd559013e363.mp3str"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,19 @@
|
||||
[remap]
|
||||
|
||||
importer="mp3"
|
||||
type="AudioStreamMP3"
|
||||
uid="uid://c1spyvwruvk67"
|
||||
path="res://.godot/imported/5.mp3-02a6c6a13ed93beee6fb61e49fddc60a.mp3str"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/5.mp3"
|
||||
dest_files=["res://.godot/imported/5.mp3-02a6c6a13ed93beee6fb61e49fddc60a.mp3str"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,19 @@
|
||||
[remap]
|
||||
|
||||
importer="mp3"
|
||||
type="AudioStreamMP3"
|
||||
uid="uid://37eyd54u7ygg"
|
||||
path="res://.godot/imported/6.mp3-39861cd13677b3630721352de1304cde.mp3str"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/6.mp3"
|
||||
dest_files=["res://.godot/imported/6.mp3-39861cd13677b3630721352de1304cde.mp3str"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,19 @@
|
||||
[remap]
|
||||
|
||||
importer="mp3"
|
||||
type="AudioStreamMP3"
|
||||
uid="uid://ckhrvslvgjttw"
|
||||
path="res://.godot/imported/7.mp3-5bfdffca7ad3962d6463b89fca814bcc.mp3str"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/7.mp3"
|
||||
dest_files=["res://.godot/imported/7.mp3-5bfdffca7ad3962d6463b89fca814bcc.mp3str"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,19 @@
|
||||
[remap]
|
||||
|
||||
importer="mp3"
|
||||
type="AudioStreamMP3"
|
||||
uid="uid://bqvnmvhrtqxpk"
|
||||
path="res://.godot/imported/8.mp3-2bbbb8fe15d3a34e84b59a93aaccc2ce.mp3str"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/8.mp3"
|
||||
dest_files=["res://.godot/imported/8.mp3-2bbbb8fe15d3a34e84b59a93aaccc2ce.mp3str"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,19 @@
|
||||
[remap]
|
||||
|
||||
importer="mp3"
|
||||
type="AudioStreamMP3"
|
||||
uid="uid://dnpyhwaknblo5"
|
||||
path="res://.godot/imported/9.mp3-c14e3c8e4465cc4bf59970048975e72f.mp3str"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/9.mp3"
|
||||
dest_files=["res://.godot/imported/9.mp3-c14e3c8e4465cc4bf59970048975e72f.mp3str"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
@@ -11,6 +11,7 @@ config_version=5
|
||||
[application]
|
||||
|
||||
config/name="wgj26"
|
||||
run/main_scene="uid://btktv5aqpafau"
|
||||
config/features=PackedStringArray("4.7", "Forward Plus")
|
||||
config/icon="res://icon.svg"
|
||||
|
||||
@@ -19,6 +20,59 @@ config/icon="res://icon.svg"
|
||||
window/stretch/mode="canvas_items"
|
||||
window/stretch/aspect="expand"
|
||||
|
||||
[input]
|
||||
|
||||
left={
|
||||
"deadzone": 0.2,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":16,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
right={
|
||||
"deadzone": 0.2,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":16,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
jump={
|
||||
"deadzone": 0.2,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":16,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
dash={
|
||||
"deadzone": 0.2,
|
||||
"events": [null, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":16,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194325,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
up={
|
||||
"deadzone": 0.2,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":16,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
down={
|
||||
"deadzone": 0.2,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":16,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
roll={
|
||||
"deadzone": 0.2,
|
||||
"events": [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":2,"canceled":false,"pressed":false,"double_click":false,"script":null)
|
||||
]
|
||||
}
|
||||
latch={
|
||||
"deadzone": 0.2,
|
||||
"events": [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)
|
||||
]
|
||||
}
|
||||
twirl={
|
||||
"deadzone": 0.2,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":16,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194329,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
run={
|
||||
"deadzone": 0.2,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":16,"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":0,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
[physics]
|
||||
|
||||
3d/physics_engine="Jolt Physics"
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
[gd_scene format=3 uid="uid://bjk1cmuogswyd"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://2jmspsmp5wpm" path="res://scripts/enemy.gd" id="1_7p1mj"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_aqe1g"]
|
||||
size = Vector2(168, 167)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_yg5ta"]
|
||||
size = Vector2(178, 168)
|
||||
|
||||
[node name="enemy" type="CharacterBody2D" unique_id=1471932521]
|
||||
collision_layer = 4
|
||||
collision_mask = 3
|
||||
script = ExtResource("1_7p1mj")
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="." unique_id=519837051]
|
||||
offset_right = 169.0
|
||||
offset_bottom = 166.0
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1567529793]
|
||||
position = Vector2(85, 82)
|
||||
shape = SubResource("RectangleShape2D_aqe1g")
|
||||
|
||||
[node name="Timer" type="Timer" parent="." unique_id=356300230]
|
||||
|
||||
[node name="Area2D" type="Area2D" parent="." unique_id=461696644]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D" unique_id=72940614]
|
||||
position = Vector2(84, 79)
|
||||
shape = SubResource("RectangleShape2D_yg5ta")
|
||||
|
||||
[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"]
|
||||
@@ -0,0 +1,62 @@
|
||||
[gd_scene format=3 uid="uid://cmtdq6tedv1mm"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://2ig5okof0vaa" path="res://scripts/UltimatePlatformerController.gd" id="1_3vyb7"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_d2by0"]
|
||||
size = Vector2(111, 105)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_aqe1g"]
|
||||
size = Vector2(114.5, 109)
|
||||
|
||||
[node name="player" type="CharacterBody2D" unique_id=1596338883]
|
||||
collision_mask = 6
|
||||
script = ExtResource("1_3vyb7")
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="." unique_id=42689460]
|
||||
offset_right = 111.0
|
||||
offset_bottom = 105.0
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." unique_id=440932344]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1496788104]
|
||||
position = Vector2(55.5, 52.5)
|
||||
shape = SubResource("RectangleShape2D_d2by0")
|
||||
|
||||
[node name="Area2D" type="Area2D" parent="." unique_id=680224441]
|
||||
collision_mask = 4
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D" unique_id=736937610]
|
||||
position = Vector2(55.25, 52.5)
|
||||
shape = SubResource("RectangleShape2D_aqe1g")
|
||||
|
||||
[node name="health" type="Control" parent="." unique_id=1976293596]
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="health" unique_id=110340136]
|
||||
self_modulate = Color(1, 0, 0, 1)
|
||||
layout_mode = 0
|
||||
offset_left = 3.0
|
||||
offset_top = -42.0
|
||||
offset_right = 26.0
|
||||
offset_bottom = -20.0
|
||||
|
||||
[node name="ColorRect2" type="ColorRect" parent="health" unique_id=1043497392]
|
||||
self_modulate = Color(1, 0, 0, 1)
|
||||
layout_mode = 0
|
||||
offset_left = 37.0
|
||||
offset_top = -42.0
|
||||
offset_right = 60.0
|
||||
offset_bottom = -20.0
|
||||
|
||||
[node name="ColorRect3" type="ColorRect" parent="health" unique_id=175994440]
|
||||
self_modulate = Color(1, 0, 0, 1)
|
||||
layout_mode = 0
|
||||
offset_left = 70.0
|
||||
offset_top = -42.0
|
||||
offset_right = 93.0
|
||||
offset_bottom = -20.0
|
||||
|
||||
[connection signal="body_entered" from="Area2D" to="." method="_on_area_2d_body_entered"]
|
||||
@@ -0,0 +1,32 @@
|
||||
[gd_scene format=3 uid="uid://btj7tpfvqfelu"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c7fhd1eqlgwr4" path="res://scripts/Phonephreak.gd" id="1_knn0u"]
|
||||
[ext_resource type="FontFile" uid="uid://dkytywan8eapf" path="res://assets/fonts/PixelOperator8.ttf" id="2_bg4gc"]
|
||||
|
||||
[node name="Phonephreak" type="Node2D" unique_id=1830177910]
|
||||
script = ExtResource("1_knn0u")
|
||||
|
||||
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="." unique_id=519900134]
|
||||
|
||||
[node name="Button0" type="Button" parent="." unique_id=1619377723]
|
||||
offset_left = 568.0
|
||||
offset_top = 494.0
|
||||
offset_right = 668.0
|
||||
offset_bottom = 594.0
|
||||
|
||||
[node name="Label" type="Label" parent="Button0" unique_id=1004291322]
|
||||
layout_mode = 0
|
||||
offset_left = 15.0
|
||||
offset_top = 14.0
|
||||
offset_right = 85.0
|
||||
offset_bottom = 94.0
|
||||
theme_override_fonts/font = ExtResource("2_bg4gc")
|
||||
theme_override_font_sizes/font_size = 80
|
||||
text = "0"
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="Button0" unique_id=582830561]
|
||||
layout_mode = 0
|
||||
offset_right = 100.0
|
||||
offset_bottom = 100.0
|
||||
mouse_filter = 2
|
||||
color = Color(1, 1, 1, 0)
|
||||
@@ -0,0 +1,28 @@
|
||||
[gd_scene format=3 uid="uid://d1xirc54wud0s"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://cmtdq6tedv1mm" path="res://scenes/player.tscn" id="1_g7g4h"]
|
||||
[ext_resource type="PackedScene" uid="uid://bjk1cmuogswyd" path="res://scenes/enemy.tscn" id="2_j8ivh"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_aqe1g"]
|
||||
size = Vector2(1116.25, 73)
|
||||
|
||||
[node name="test_scene" type="Node2D" unique_id=1970054744]
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="." unique_id=1255479846]
|
||||
offset_left = 2.0
|
||||
offset_top = 530.0
|
||||
offset_right = 1121.0
|
||||
offset_bottom = 606.0
|
||||
|
||||
[node name="player" parent="." unique_id=1596338883 instance=ExtResource("1_g7g4h")]
|
||||
position = Vector2(64, 386)
|
||||
|
||||
[node name="floor" type="StaticBody2D" parent="." unique_id=866269158]
|
||||
collision_layer = 2
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="floor" unique_id=1146724072]
|
||||
position = Vector2(561.125, 569)
|
||||
shape = SubResource("RectangleShape2D_aqe1g")
|
||||
|
||||
[node name="enemy" parent="floor" unique_id=1471932521 instance=ExtResource("2_j8ivh")]
|
||||
position = Vector2(527, 311)
|
||||
@@ -1,5 +1,7 @@
|
||||
[gd_scene format=3 uid="uid://btktv5aqpafau"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://dkytywan8eapf" path="res://assets/fonts/PixelOperator8.ttf" id="1_4ignj"]
|
||||
|
||||
[node name="Title" type="Control" unique_id=715100706]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
@@ -7,3 +9,29 @@ anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="." unique_id=1504521213]
|
||||
layout_mode = 0
|
||||
offset_right = 1152.0
|
||||
offset_bottom = 648.0
|
||||
color = Color(0, 0, 0, 1)
|
||||
|
||||
[node name="Label" type="Label" parent="." unique_id=1433094765]
|
||||
layout_mode = 0
|
||||
offset_left = 107.0
|
||||
offset_top = 50.0
|
||||
offset_right = 1013.0
|
||||
offset_bottom = 301.0
|
||||
theme_override_fonts/font = ExtResource("1_4ignj")
|
||||
theme_override_font_sizes/font_size = 250
|
||||
text = "title"
|
||||
|
||||
[node name="Button" type="Button" parent="." unique_id=963162220]
|
||||
layout_mode = 0
|
||||
offset_left = 149.0
|
||||
offset_top = 375.0
|
||||
offset_right = 982.0
|
||||
offset_bottom = 583.0
|
||||
theme_override_fonts/font = ExtResource("1_4ignj")
|
||||
theme_override_font_sizes/font_size = 150
|
||||
text = "start"
|
||||
@@ -0,0 +1,76 @@
|
||||
extends Node
|
||||
|
||||
var Rounds: int = 5
|
||||
|
||||
var pieces: Array[int] = []
|
||||
var guessed: Array[int] = []
|
||||
var to_play: Array[int] = []
|
||||
var buttons: Array[Button] = []
|
||||
|
||||
const PhoneSounds = [
|
||||
preload("res://assets/sounds/0.mp3"),
|
||||
preload("res://assets/sounds/1.mp3"),
|
||||
preload("res://assets/sounds/2.mp3"),
|
||||
preload("res://assets/sounds/3.mp3"),
|
||||
preload("res://assets/sounds/4.mp3"),
|
||||
preload("res://assets/sounds/5.mp3"),
|
||||
preload("res://assets/sounds/6.mp3"),
|
||||
preload("res://assets/sounds/7.mp3"),
|
||||
preload("res://assets/sounds/8.mp3"),
|
||||
preload("res://assets/sounds/9.mp3"),
|
||||
]
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
var origin = Vector2(0, 0)
|
||||
var offset = 125
|
||||
$Button0.position.x = origin.x + 1 * offset
|
||||
$Button0.position.y = origin.y + 3 * offset
|
||||
buttons.append($Button0)
|
||||
for i in range(0, 9):
|
||||
var col = i % 3
|
||||
var row = i / 3
|
||||
var b: Button = $Button0.duplicate()
|
||||
var label: Label = b.get_child(0)
|
||||
label.text = "%s" %(i+1)
|
||||
var rect: ColorRect = b.get_child(1)
|
||||
rect.color = Color.from_rgba8(255, 255, 255, 0)
|
||||
b.position.x = origin.x + col * offset
|
||||
b.position.y = origin.y + row * offset
|
||||
b.pressed.connect(_on_button_pressed.bind(i+1))
|
||||
buttons.append(b)
|
||||
b.name = "Button%i" %(i)
|
||||
add_child(b)
|
||||
$Button0.pressed.connect(_on_button_pressed.bind(0))
|
||||
|
||||
for i in Rounds:
|
||||
var item = randi() % len(PhoneSounds)
|
||||
pieces.append(item)
|
||||
to_play.append(item)
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
if guessed.size() >= pieces.size():
|
||||
if guessed == pieces:
|
||||
print("Got it")
|
||||
else:
|
||||
print("Nope")
|
||||
|
||||
if !$AudioStreamPlayer2D.playing and !to_play.is_empty():
|
||||
actuate_button(to_play.pop_front())
|
||||
|
||||
for b in buttons:
|
||||
var rect: ColorRect = b.get_child(1)
|
||||
if rect.color.a8 != 0:
|
||||
rect.color = Color.from_rgba8(255, 255, 255, rect.color.a8 - 5)
|
||||
|
||||
func _on_button_pressed(button: int) -> void:
|
||||
guessed.append(button)
|
||||
actuate_button(button)
|
||||
|
||||
func actuate_button(button: int) -> void:
|
||||
var rect: ColorRect = buttons[button].get_child(1)
|
||||
rect.color = Color.from_rgba8(255, 255, 255, 255)
|
||||
|
||||
$AudioStreamPlayer2D.stream = PhoneSounds[button]
|
||||
$AudioStreamPlayer2D.play()
|
||||
@@ -0,0 +1 @@
|
||||
uid://c7fhd1eqlgwr4
|
||||
@@ -10,15 +10,15 @@ class_name PlatformerController2D
|
||||
#2. Animations are very primitive. To make full use of your custom art, you may want to slightly change the code for the animations
|
||||
|
||||
@export_category("Necesary Child Nodes")
|
||||
@export var PlayerSprite: AnimatedSprite2D
|
||||
@export var PlayerCollider: CollisionShape2D
|
||||
@onready var PlayerSprite = $AnimatedSprite2D
|
||||
@onready var PlayerCollider = $CollisionShape2D
|
||||
|
||||
#INFO HORIZONTAL MOVEMENT
|
||||
@export_category("L/R Movement")
|
||||
##The max speed your player will move
|
||||
@export_range(50, 500) var maxSpeed: float = 200.0
|
||||
@export_range(50, 500) var maxSpeed: float = 500
|
||||
##How fast your player will reach max speed from rest (in seconds)
|
||||
@export_range(0, 4) var timeToReachMaxSpeed: float = 0.2
|
||||
@export_range(0, 4) var timeToReachMaxSpeed: float = 0
|
||||
##How fast your player will reach zero speed from max speed (in seconds)
|
||||
@export_range(0, 4) var timeToReachZeroSpeed: float = 0.2
|
||||
##If true, player will instantly move and switch directions. Overrides the "timeToReach" variables, setting them to 0.
|
||||
@@ -29,15 +29,15 @@ class_name PlatformerController2D
|
||||
#INFO JUMPING
|
||||
@export_category("Jumping and Gravity")
|
||||
##The peak height of your player's jump
|
||||
@export_range(0, 20) var jumpHeight: float = 2.0
|
||||
@export_range(0, 20) var jumpHeight: float = 4
|
||||
##How many jumps your character can do before needing to touch the ground again. Giving more than 1 jump disables jump buffering and coyote time.
|
||||
@export_range(0, 4) var jumps: int = 1
|
||||
@export_range(0, 4) var jumps: int = 2
|
||||
##The strength at which your character will be pulled to the ground.
|
||||
@export_range(0, 100) var gravityScale: float = 20.0
|
||||
@export_range(0, 100) var gravityScale: float = 30
|
||||
##The fastest your player can fall
|
||||
@export_range(0, 1000) var terminalVelocity: float = 500.0
|
||||
@export_range(0, 1000) var terminalVelocity: float = 700
|
||||
##Your player will move this amount faster when falling providing a less floaty jump curve.
|
||||
@export_range(0.5, 3) var descendingGravityFactor: float = 1.3
|
||||
@export_range(0.5, 3) var descendingGravityFactor: float = 2
|
||||
##Enabling this toggle makes it so that when the player releases the jump key while still ascending, their vertical velocity will cut by the height cut, providing variable jump height.
|
||||
@export var shortHopAkaVariableJumpHeight: bool = true
|
||||
##How much the jump height is cut by.
|
||||
@@ -138,7 +138,7 @@ var gravityActive: bool = true
|
||||
var dashing: bool = false
|
||||
var dashCount: int
|
||||
var rolling: bool = false
|
||||
|
||||
var death_counter = 3
|
||||
var twoWayDashHorizontal
|
||||
var twoWayDashVertical
|
||||
var eightWayDash
|
||||
@@ -159,7 +159,7 @@ var wasLatched
|
||||
var crouching
|
||||
var groundPounding
|
||||
|
||||
var anim
|
||||
var anim = PlayerSprite
|
||||
var col
|
||||
var animScaleLock : Vector2
|
||||
|
||||
@@ -254,6 +254,8 @@ func _updateData():
|
||||
func _process(_delta):
|
||||
#INFO animations
|
||||
#directions
|
||||
if death_counter == 0:
|
||||
get_tree().quit()
|
||||
if is_on_wall() and !is_on_floor() and latch and wallLatching and ((wallLatchingModifer and latchHold) or !wallLatchingModifer):
|
||||
latched = true
|
||||
else:
|
||||
@@ -325,6 +327,10 @@ func _process(_delta):
|
||||
|
||||
|
||||
func _physics_process(delta):
|
||||
if death_counter == 2:
|
||||
$health/ColorRect3.hide()
|
||||
elif death_counter == 1:
|
||||
$health/ColorRect2.hide()
|
||||
if !dset:
|
||||
gdelta = delta
|
||||
dset = true
|
||||
@@ -674,3 +680,7 @@ func _endGroundPound():
|
||||
|
||||
func _placeHolder():
|
||||
print("")
|
||||
|
||||
|
||||
func _on_area_2d_body_entered(body: Node2D) -> void:
|
||||
death_counter -= 1
|
||||
@@ -0,0 +1,26 @@
|
||||
extends CharacterBody2D
|
||||
|
||||
|
||||
var SPEED = Vector2(5, 0)
|
||||
const JUMP_VELOCITY = -400.0
|
||||
|
||||
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
$Timer.start()
|
||||
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
velocity += get_gravity() * delta
|
||||
move_and_slide()
|
||||
patrol()
|
||||
|
||||
|
||||
func patrol():
|
||||
position += SPEED
|
||||
|
||||
|
||||
func _on_timer_timeout() -> void:
|
||||
SPEED = -SPEED
|
||||
$Timer.start()
|
||||
@@ -0,0 +1 @@
|
||||
uid://2jmspsmp5wpm
|
||||
Reference in new issue
Block a user