Compare commits
1
Commits
main
...
52cd38cc2d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
52cd38cc2d |
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
|
||||||
@@ -3,11 +3,15 @@
|
|||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://xlg0kyp0jhet"
|
uid="uid://xlg0kyp0jhet"
|
||||||
valid=false
|
path="res://.godot/imported/coin.png-c8309bf0f8fb5f3a7d1e96a4eb3f02ce.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://assets/sprites/coin.png"
|
source_file="res://assets/sprites/coin.png"
|
||||||
|
dest_files=["res://.godot/imported/coin.png-c8309bf0f8fb5f3a7d1e96a4eb3f02ce.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
|
|||||||
@@ -3,11 +3,15 @@
|
|||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://coer7bk56ksye"
|
uid="uid://coer7bk56ksye"
|
||||||
valid=false
|
path="res://.godot/imported/fruit.png-3735163b668af10c2b35b52cba81b68a.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://assets/sprites/fruit.png"
|
source_file="res://assets/sprites/fruit.png"
|
||||||
|
dest_files=["res://.godot/imported/fruit.png-3735163b668af10c2b35b52cba81b68a.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
|
|||||||
@@ -3,11 +3,15 @@
|
|||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://bt61g6xdrepd"
|
uid="uid://bt61g6xdrepd"
|
||||||
valid=false
|
path="res://.godot/imported/knight.png-7c67c83d34932624952797d9e971a644.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://assets/sprites/knight.png"
|
source_file="res://assets/sprites/knight.png"
|
||||||
|
dest_files=["res://.godot/imported/knight.png-7c67c83d34932624952797d9e971a644.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
|
|||||||
@@ -3,11 +3,15 @@
|
|||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://b7cc0lt1g041f"
|
uid="uid://b7cc0lt1g041f"
|
||||||
valid=false
|
path="res://.godot/imported/platforms.png-3869606db457611ed4193d705dc364e4.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://assets/sprites/platforms.png"
|
source_file="res://assets/sprites/platforms.png"
|
||||||
|
dest_files=["res://.godot/imported/platforms.png-3869606db457611ed4193d705dc364e4.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
|
|||||||
@@ -3,11 +3,15 @@
|
|||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://bfp7d2c8w5d5j"
|
uid="uid://bfp7d2c8w5d5j"
|
||||||
valid=false
|
path="res://.godot/imported/slime_green.png-f6349164bf3a0f5189bb927b97af9c58.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://assets/sprites/slime_green.png"
|
source_file="res://assets/sprites/slime_green.png"
|
||||||
|
dest_files=["res://.godot/imported/slime_green.png-f6349164bf3a0f5189bb927b97af9c58.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
|
|||||||
@@ -3,11 +3,15 @@
|
|||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://cjx7y6aru1j2v"
|
uid="uid://cjx7y6aru1j2v"
|
||||||
valid=false
|
path="res://.godot/imported/slime_purple.png-26dc5ddef235ce6a400e78e0d532b050.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://assets/sprites/slime_purple.png"
|
source_file="res://assets/sprites/slime_purple.png"
|
||||||
|
dest_files=["res://.godot/imported/slime_purple.png-26dc5ddef235ce6a400e78e0d532b050.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
|
|||||||
@@ -3,11 +3,15 @@
|
|||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://bdtdnto04r82s"
|
uid="uid://bdtdnto04r82s"
|
||||||
valid=false
|
path="res://.godot/imported/world_tileset.png-61a32465f33c3d9d3bfecb75b6485009.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://assets/sprites/world_tileset.png"
|
source_file="res://assets/sprites/world_tileset.png"
|
||||||
|
dest_files=["res://.godot/imported/world_tileset.png-61a32465f33c3d9d3bfecb75b6485009.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
|
|||||||
@@ -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,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
|
||||||
Reference in new issue
Block a user