Compare commits
7
Commits
8bfa979f06
...
90111f8b39
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
90111f8b39 | ||
|
|
2ecc24ae71 | ||
|
|
45b665f561 | ||
|
|
b27d83576c | ||
|
|
092f5bad3e | ||
|
|
ec7db9faae | ||
|
|
bb9682cd16 |
No files matched your search
@@ -0,0 +1,6 @@
|
|||||||
|
extends Node
|
||||||
|
|
||||||
|
|
||||||
|
@onready var test_level = $"../test_scene"
|
||||||
|
@onready var projectile = $"../projectile"
|
||||||
|
var death_counter = 3
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://chv42jjv2lka4
|
||||||
Binary file not shown.
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]
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://hbkkhhlechol"
|
||||||
|
path="res://.godot/imported/phonephreak.png-e57daefd5201fd666bc927a15f0fb805.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/sprites/phonephreak.png"
|
||||||
|
dest_files=["res://.godot/imported/phonephreak.png-e57daefd5201fd666bc927a15f0fb805.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
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/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
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
|
||||||
@@ -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,17 @@
|
|||||||
|
extends Area2D
|
||||||
|
|
||||||
|
|
||||||
|
var spawnpos: Vector2
|
||||||
|
var direction = 0
|
||||||
|
var speed = Vector2(1000, 0)
|
||||||
|
var origin = Vector2(0, 0)
|
||||||
|
const distance = 500
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
func _physics_process(delta: float) -> void:
|
||||||
|
position += speed * delta
|
||||||
|
origin += speed * delta
|
||||||
|
|
||||||
|
if abs(origin.x) >= distance:
|
||||||
|
queue_free()
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://7hy57dacf4nh
|
||||||
@@ -15,11 +15,19 @@ run/main_scene="uid://btktv5aqpafau"
|
|||||||
config/features=PackedStringArray("4.7", "Forward Plus")
|
config/features=PackedStringArray("4.7", "Forward Plus")
|
||||||
config/icon="res://icon.svg"
|
config/icon="res://icon.svg"
|
||||||
|
|
||||||
|
[autoload]
|
||||||
|
|
||||||
|
GloblaData="*uid://chv42jjv2lka4"
|
||||||
|
|
||||||
[display]
|
[display]
|
||||||
|
|
||||||
window/stretch/mode="canvas_items"
|
window/stretch/mode="canvas_items"
|
||||||
window/stretch/aspect="expand"
|
window/stretch/aspect="expand"
|
||||||
|
|
||||||
|
[filesystem]
|
||||||
|
|
||||||
|
import/blender/enabled=false
|
||||||
|
|
||||||
[input]
|
[input]
|
||||||
|
|
||||||
left={
|
left={
|
||||||
@@ -72,6 +80,11 @@ run={
|
|||||||
"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)
|
"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)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
fire={
|
||||||
|
"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":1,"position":Vector2(150, 14),"global_position":Vector2(159, 62),"factor":1.0,"button_index":1,"canceled":false,"pressed":true,"double_click":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
[physics]
|
[physics]
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
extends CharacterBody2D
|
||||||
|
|
||||||
|
|
||||||
|
var SPEED = Vector2(5, 0)
|
||||||
|
const JUMP_VELOCITY = -400.0
|
||||||
|
@onready var projectile: PackedScene = preload("res://scenes/projectile.tscn")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
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()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_area_2d_area_entered(area: Area2D) -> void:
|
||||||
|
queue_free()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_area_2d_body_entered(body: Node2D) -> void:
|
||||||
|
GloblaData.death_counter -= 1
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://su208qu0ehcs
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
[gd_scene format=3 uid="uid://dxx6mxv6x5yws"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://su208qu0ehcs" path="res://scenes/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 = 11
|
||||||
|
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]
|
||||||
|
collision_layer = 4
|
||||||
|
collision_mask = 11
|
||||||
|
|
||||||
|
[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"]
|
||||||
|
[connection signal="area_entered" from="Area2D" to="." method="_on_area_2d_area_entered"]
|
||||||
|
[connection signal="body_entered" from="Area2D" to="." method="_on_area_2d_body_entered"]
|
||||||
+27
-3
@@ -6,15 +6,39 @@
|
|||||||
size = Vector2(111, 105)
|
size = Vector2(111, 105)
|
||||||
|
|
||||||
[node name="player" type="CharacterBody2D" unique_id=1596338883]
|
[node name="player" type="CharacterBody2D" unique_id=1596338883]
|
||||||
collision_mask = 2
|
collision_mask = 6
|
||||||
script = ExtResource("1_3vyb7")
|
script = ExtResource("1_3vyb7")
|
||||||
|
|
||||||
[node name="ColorRect" type="ColorRect" parent="." unique_id=42689460]
|
[node name="ColorRect" type="ColorRect" parent="." unique_id=1060028972]
|
||||||
offset_right = 111.0
|
offset_right = 111.0
|
||||||
offset_bottom = 105.0
|
offset_bottom = 104.0
|
||||||
|
|
||||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." unique_id=440932344]
|
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." unique_id=440932344]
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1496788104]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1496788104]
|
||||||
position = Vector2(55.5, 52.5)
|
position = Vector2(55.5, 52.5)
|
||||||
shape = SubResource("RectangleShape2D_d2by0")
|
shape = SubResource("RectangleShape2D_d2by0")
|
||||||
|
|
||||||
|
[node name="ColorRect2" type="ColorRect" parent="." unique_id=1595777933]
|
||||||
|
offset_left = 2.0
|
||||||
|
offset_top = -33.0
|
||||||
|
offset_right = 28.0
|
||||||
|
offset_bottom = -8.0
|
||||||
|
color = Color(1, 0, 0, 1)
|
||||||
|
|
||||||
|
[node name="ColorRect3" type="ColorRect" parent="." unique_id=261143567]
|
||||||
|
offset_left = 82.0
|
||||||
|
offset_top = -33.0
|
||||||
|
offset_right = 108.0
|
||||||
|
offset_bottom = -8.0
|
||||||
|
color = Color(1, 0, 0, 1)
|
||||||
|
|
||||||
|
[node name="ColorRect4" type="ColorRect" parent="." unique_id=1858187239]
|
||||||
|
offset_left = 42.0
|
||||||
|
offset_top = -33.0
|
||||||
|
offset_right = 68.0
|
||||||
|
offset_bottom = -8.0
|
||||||
|
color = Color(1, 0, 0, 1)
|
||||||
|
|
||||||
|
[node name="Marker2D" type="Marker2D" parent="." unique_id=1559032825]
|
||||||
|
position = Vector2(112, 38)
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
[gd_scene format=3 uid="uid://baiayu1xn68g0"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://7hy57dacf4nh" path="res://projecile.gd" id="1_c8fcr"]
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_aqe1g"]
|
||||||
|
size = Vector2(44, 44)
|
||||||
|
|
||||||
|
[node name="projectile" type="Area2D" unique_id=478503233]
|
||||||
|
collision_layer = 8
|
||||||
|
collision_mask = 4
|
||||||
|
script = ExtResource("1_c8fcr")
|
||||||
|
|
||||||
|
[node name="ColorRect" type="ColorRect" parent="." unique_id=1569566086]
|
||||||
|
self_modulate = Color(0, 0, 0, 1)
|
||||||
|
offset_top = -1.0
|
||||||
|
offset_right = 40.0
|
||||||
|
offset_bottom = 39.0
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1408698135]
|
||||||
|
position = Vector2(20, 19)
|
||||||
|
shape = SubResource("RectangleShape2D_aqe1g")
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
[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"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://hbkkhhlechol" path="res://assets/sprites/phonephreak.png" id="3_ba2os"]
|
||||||
|
|
||||||
|
[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 = 613.0
|
||||||
|
offset_bottom = 541.0
|
||||||
|
flat = true
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="Button0" unique_id=1004291322]
|
||||||
|
layout_mode = 0
|
||||||
|
offset_right = 44.0
|
||||||
|
offset_bottom = 51.0
|
||||||
|
theme_override_fonts/font = ExtResource("2_bg4gc")
|
||||||
|
theme_override_font_sizes/font_size = 50
|
||||||
|
text = "0"
|
||||||
|
|
||||||
|
[node name="ColorRect" type="ColorRect" parent="Button0" unique_id=582830561]
|
||||||
|
layout_mode = 0
|
||||||
|
offset_right = 43.0
|
||||||
|
offset_bottom = 47.0
|
||||||
|
mouse_filter = 2
|
||||||
|
color = Color(1, 1, 1, 0)
|
||||||
|
|
||||||
|
[node name="Phonephreak" type="Sprite2D" parent="." unique_id=1607325509]
|
||||||
|
position = Vector2(253, 328)
|
||||||
|
scale = Vector2(2.17, 2.17)
|
||||||
|
texture = ExtResource("3_ba2os")
|
||||||
@@ -1,12 +1,14 @@
|
|||||||
[gd_scene format=3 uid="uid://d1xirc54wud0s"]
|
[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://cmtdq6tedv1mm" path="res://scenes/player.tscn" id="1_g7g4h"]
|
||||||
[ext_resource type="Script" uid="uid://87oh2y0i2muf" path="res://scenes/rigid_body_2d.gd" id="2_nd71p"]
|
[ext_resource type="Script" uid="uid://v7bcqfwryutg" path="res://scripts/test_scene.gd" id="1_j8ivh"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://dxx6mxv6x5yws" path="res://scenes/enemy.tscn" id="2_j8ivh"]
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_aqe1g"]
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_aqe1g"]
|
||||||
size = Vector2(1116.25, 73)
|
size = Vector2(1116.25, 73)
|
||||||
|
|
||||||
[node name="test_scene" type="Node2D" unique_id=1970054744]
|
[node name="test_scene" type="Node2D" unique_id=1970054744]
|
||||||
|
script = ExtResource("1_j8ivh")
|
||||||
|
|
||||||
[node name="ColorRect" type="ColorRect" parent="." unique_id=1255479846]
|
[node name="ColorRect" type="ColorRect" parent="." unique_id=1255479846]
|
||||||
offset_left = 2.0
|
offset_left = 2.0
|
||||||
@@ -17,10 +19,13 @@ offset_bottom = 606.0
|
|||||||
[node name="player" parent="." unique_id=1596338883 instance=ExtResource("1_g7g4h")]
|
[node name="player" parent="." unique_id=1596338883 instance=ExtResource("1_g7g4h")]
|
||||||
position = Vector2(64, 386)
|
position = Vector2(64, 386)
|
||||||
|
|
||||||
[node name="floor" type="StaticBody2D" parent="." unique_id=866269158]
|
[node name="floor" type="StaticBody2D" parent="." unique_id=306980091]
|
||||||
collision_layer = 2
|
collision_layer = 2
|
||||||
script = ExtResource("2_nd71p")
|
collision_mask = 5
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="floor" unique_id=1146724072]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="floor" unique_id=1146724072]
|
||||||
position = Vector2(561.125, 569)
|
position = Vector2(561.125, 569)
|
||||||
shape = SubResource("RectangleShape2D_aqe1g")
|
shape = SubResource("RectangleShape2D_aqe1g")
|
||||||
|
|
||||||
|
[node name="enemy" parent="." unique_id=1471932521 instance=ExtResource("2_j8ivh")]
|
||||||
|
position = Vector2(695, 334)
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
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(150, 225)
|
||||||
|
var offset = Vector2(135, 120)
|
||||||
|
$Button0.position.y = origin.y + 3 * offset.y + 3 * -10
|
||||||
|
$Button0.position.x = origin.x + 1 * offset.x + 2 * -5
|
||||||
|
$Button0.move_to_front()
|
||||||
|
buttons.append($Button0)
|
||||||
|
for i in range(0, 9):
|
||||||
|
var row = i % 3
|
||||||
|
var col = 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.y = origin.y + col * offset.y + row * -10
|
||||||
|
b.position.x = origin.x + row * offset.x + col+1 * -5
|
||||||
|
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
|
||||||
@@ -25,7 +25,7 @@ class_name PlatformerController2D
|
|||||||
@export var directionalSnap: bool = false
|
@export var directionalSnap: bool = false
|
||||||
##If enabled, the default movement speed will by 1/2 of the maxSpeed and the player must hold a "run" button to accelerate to max speed. Assign "run" (case sensitive) in the project input settings.
|
##If enabled, the default movement speed will by 1/2 of the maxSpeed and the player must hold a "run" button to accelerate to max speed. Assign "run" (case sensitive) in the project input settings.
|
||||||
@export var runningModifier: bool = false
|
@export var runningModifier: bool = false
|
||||||
|
var direction = 0
|
||||||
#INFO JUMPING
|
#INFO JUMPING
|
||||||
@export_category("Jumping and Gravity")
|
@export_category("Jumping and Gravity")
|
||||||
##The peak height of your player's jump
|
##The peak height of your player's jump
|
||||||
@@ -115,7 +115,7 @@ class_name PlatformerController2D
|
|||||||
@export var crouch_walk: bool
|
@export var crouch_walk: bool
|
||||||
##Animations must be named "roll" all lowercase as the check box says
|
##Animations must be named "roll" all lowercase as the check box says
|
||||||
@export var roll: bool
|
@export var roll: bool
|
||||||
|
var projectile = preload("res://scenes/projectile.tscn")
|
||||||
|
|
||||||
|
|
||||||
#Variables determined by the developer set ones.
|
#Variables determined by the developer set ones.
|
||||||
@@ -158,7 +158,7 @@ var latched
|
|||||||
var wasLatched
|
var wasLatched
|
||||||
var crouching
|
var crouching
|
||||||
var groundPounding
|
var groundPounding
|
||||||
|
var death_counter = 3
|
||||||
var anim = PlayerSprite
|
var anim = PlayerSprite
|
||||||
var col
|
var col
|
||||||
var animScaleLock : Vector2
|
var animScaleLock : Vector2
|
||||||
@@ -180,7 +180,7 @@ var dashTap
|
|||||||
var rollTap
|
var rollTap
|
||||||
var downTap
|
var downTap
|
||||||
var twirlTap
|
var twirlTap
|
||||||
|
var enemy = preload("res://scenes/enemy.tscn")
|
||||||
func _ready():
|
func _ready():
|
||||||
wasMovingR = true
|
wasMovingR = true
|
||||||
anim = PlayerSprite
|
anim = PlayerSprite
|
||||||
@@ -320,11 +320,26 @@ func _process(_delta):
|
|||||||
if rollTap and canRoll and roll:
|
if rollTap and canRoll and roll:
|
||||||
anim.speed_scale = 1
|
anim.speed_scale = 1
|
||||||
anim.play("roll")
|
anim.play("roll")
|
||||||
|
|
||||||
|
var dir: bool = 1
|
||||||
|
|
||||||
|
|
||||||
func _physics_process(delta):
|
func _physics_process(delta):
|
||||||
|
if Input.is_action_pressed("right"):
|
||||||
|
dir = 1
|
||||||
|
if Input.is_action_pressed("left"):
|
||||||
|
dir = 0
|
||||||
|
if Input.is_action_just_pressed("fire"):
|
||||||
|
var instance = projectile.instantiate()
|
||||||
|
if !dir:
|
||||||
|
instance.speed = -instance.speed
|
||||||
|
instance.position = $Marker2D.global_position
|
||||||
|
GloblaData.test_level.add_child(instance)
|
||||||
|
if GloblaData.death_counter == 0:
|
||||||
|
get_tree().quit()
|
||||||
|
if GloblaData.death_counter == 2:
|
||||||
|
$ColorRect3.hide()
|
||||||
|
elif GloblaData.death_counter == 1:
|
||||||
|
$ColorRect4.hide()
|
||||||
if !dset:
|
if !dset:
|
||||||
gdelta = delta
|
gdelta = delta
|
||||||
dset = true
|
dset = true
|
||||||
@@ -674,3 +689,7 @@ func _endGroundPound():
|
|||||||
|
|
||||||
func _placeHolder():
|
func _placeHolder():
|
||||||
print("")
|
print("")
|
||||||
|
|
||||||
|
|
||||||
|
func shoot():
|
||||||
|
pass
|
||||||
@@ -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
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
extends Node2D
|
||||||
|
|
||||||
|
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
func _ready() -> void:
|
||||||
|
pass # Replace with function body.
|
||||||
|
|
||||||
|
|
||||||
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
|
func _process(delta: float) -> void:
|
||||||
|
pass
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://v7bcqfwryutg
|
||||||
Reference in new issue
Block a user