4.6, new attack, enemy spawning, shaders, bunch of stuff
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
|
@ -3,15 +3,15 @@
|
|||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cyftyrf36mm0r"
|
||||
path="res://.godot/imported/cosa_1.png-af978a537c8c5075f45ab1c588bee965.ctex"
|
||||
path="res://.godot/imported/cosa_1.png-2aafb60d81d8c0dea658a1c9d1a5c195.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/masks/cosa_1.png"
|
||||
dest_files=["res://.godot/imported/cosa_1.png-af978a537c8c5075f45ab1c588bee965.ctex"]
|
||||
source_file="res://assets/enemies/cosa_1.png"
|
||||
dest_files=["res://.godot/imported/cosa_1.png-2aafb60d81d8c0dea658a1c9d1a5c195.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
|
@ -3,15 +3,15 @@
|
|||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cyigyhudonahf"
|
||||
path="res://.godot/imported/cosa_2.png-e112ffb21d5c1aadf233fc9220a04195.ctex"
|
||||
path="res://.godot/imported/cosa_2.png-bc520cea877887ed3e2d46fd43eb1b3a.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/masks/cosa_2.png"
|
||||
dest_files=["res://.godot/imported/cosa_2.png-e112ffb21d5c1aadf233fc9220a04195.ctex"]
|
||||
source_file="res://assets/enemies/cosa_2.png"
|
||||
dest_files=["res://.godot/imported/cosa_2.png-bc520cea877887ed3e2d46fd43eb1b3a.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
BIN
assets/enviroment/world_1.png
Normal file
|
After Width: | Height: | Size: 94 KiB |
40
assets/enviroment/world_1.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://decmuqi30h2xr"
|
||||
path="res://.godot/imported/world_1.png-5a6af280f8f4508e378604bf28e718b5.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/enviroment/world_1.png"
|
||||
dest_files=["res://.godot/imported/world_1.png-5a6af280f8f4508e378604bf28e718b5.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
|
||||
BIN
assets/enviroment/world_1.png~
Normal file
|
After Width: | Height: | Size: 94 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
|
@ -3,15 +3,15 @@
|
|||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c1e6cto11t24m"
|
||||
path="res://.godot/imported/maske_melee.png-3abb04feba5872da1ace9f1160b42709.ctex"
|
||||
path="res://.godot/imported/mask_scythe.png-0bab02ac10eae3ba25286eb1e2c9b3fb.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/masks/maske_melee.png"
|
||||
dest_files=["res://.godot/imported/maske_melee.png-3abb04feba5872da1ace9f1160b42709.ctex"]
|
||||
source_file="res://assets/masks/mask_scythe.png"
|
||||
dest_files=["res://.godot/imported/mask_scythe.png-0bab02ac10eae3ba25286eb1e2c9b3fb.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2 KiB |
|
|
@ -3,15 +3,15 @@
|
|||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://jdf7lep07uov"
|
||||
path="res://.godot/imported/maske_melee_drop.png-e755be9dc65cca98d1107103e7701242.ctex"
|
||||
path="res://.godot/imported/mask_scythe_drop.png-f40925edc95f5e1c077788d8982da58b.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/masks/maske_melee_drop.png"
|
||||
dest_files=["res://.godot/imported/maske_melee_drop.png-e755be9dc65cca98d1107103e7701242.ctex"]
|
||||
source_file="res://assets/masks/mask_scythe_drop.png"
|
||||
dest_files=["res://.godot/imported/mask_scythe_drop.png-f40925edc95f5e1c077788d8982da58b.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
|
@ -3,15 +3,15 @@
|
|||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://be0mx6lumyj2h"
|
||||
path="res://.godot/imported/maske_ranged.png-ded78d4a11b1e6141da0da0531a2d47e.ctex"
|
||||
path="res://.godot/imported/mask_stars.png-93299453899ecfbcd50f51570d516d79.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/masks/maske_ranged.png"
|
||||
dest_files=["res://.godot/imported/maske_ranged.png-ded78d4a11b1e6141da0da0531a2d47e.ctex"]
|
||||
source_file="res://assets/masks/mask_stars.png"
|
||||
dest_files=["res://.godot/imported/mask_stars.png-93299453899ecfbcd50f51570d516d79.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
|
@ -3,15 +3,15 @@
|
|||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dj6i1hxecl5nq"
|
||||
path="res://.godot/imported/maske_ranged_drop.png-dd1708ef811bd9f205d2e60f84f2eb24.ctex"
|
||||
path="res://.godot/imported/mask_stars_drop.png-b234e825f6e7f42d8216c13a782e78bd.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/masks/maske_ranged_drop.png"
|
||||
dest_files=["res://.godot/imported/maske_ranged_drop.png-dd1708ef811bd9f205d2e60f84f2eb24.ctex"]
|
||||
source_file="res://assets/masks/mask_stars_drop.png"
|
||||
dest_files=["res://.godot/imported/mask_stars_drop.png-b234e825f6e7f42d8216c13a782e78bd.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
BIN
assets/masks/star.png
Normal file
|
After Width: | Height: | Size: 152 B |
40
assets/masks/star.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dsak25b3jrn2r"
|
||||
path="res://.godot/imported/star.png-d9c07b170cd50e246ce2a28cbe97c43f.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/masks/star.png"
|
||||
dest_files=["res://.godot/imported/star.png-d9c07b170cd50e246ce2a28cbe97c43f.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
|
||||
BIN
assets/sfx/star.wav
Normal file
24
assets/sfx/star.wav.import
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://dbmjok4h3yqgc"
|
||||
path="res://.godot/imported/star.wav-45929e0325e3be52a8343ac8fcfc3fac.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sfx/star.wav"
|
||||
dest_files=["res://.godot/imported/star.wav-45929e0325e3be52a8343ac8fcfc3fac.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_resource type="AudioBusLayout" load_steps=2 format=3 uid="uid://u82hlijupp4q"]
|
||||
[gd_resource type="AudioBusLayout" format=3 uid="uid://u82hlijupp4q"]
|
||||
|
||||
[sub_resource type="AudioEffectCompressor" id="AudioEffectCompressor_j3pel"]
|
||||
resource_name = "Compressor"
|
||||
|
|
|
|||
|
|
@ -8,13 +8,21 @@
|
|||
|
||||
config_version=5
|
||||
|
||||
[animation]
|
||||
|
||||
compatibility/default_parent_skeleton_in_mesh_instance_3d=true
|
||||
|
||||
[application]
|
||||
|
||||
config/name="Netmasked"
|
||||
run/main_scene="uid://crecxacda45j3"
|
||||
config/features=PackedStringArray("4.5", "Forward Plus")
|
||||
config/features=PackedStringArray("4.6", "Forward Plus")
|
||||
config/icon="uid://djs03o6rtlge0"
|
||||
|
||||
[audio]
|
||||
|
||||
buses/default_bus_layout="uid://u82hlijupp4q"
|
||||
|
||||
[autoload]
|
||||
|
||||
EventBus="*res://scripts/singletons/event_bus.gd"
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
[resource]
|
||||
background_mode = 3
|
||||
glow_enabled = true
|
||||
glow_normalized = true
|
||||
glow_intensity = 3.02
|
||||
glow_strength = 1.46
|
||||
glow_mix = 0.179
|
||||
glow_blend_mode = 1
|
||||
glow_hdr_threshold = 0.9
|
||||
|
|
|
|||
|
|
@ -1,14 +1,16 @@
|
|||
[gd_resource type="Resource" script_class="MaskData" load_steps=5 format=3 uid="uid://jar2mye8do0c"]
|
||||
[gd_resource type="Resource" script_class="MaskData" format=3 uid="uid://jar2mye8do0c"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://0n57icfpulmc" path="res://scenes/hearts.tscn" id="1_qstg2"]
|
||||
[ext_resource type="Texture2D" uid="uid://dj6i1hxecl5nq" path="res://assets/masks/maske_ranged_drop.png" id="2_qstg2"]
|
||||
[ext_resource type="Texture2D" uid="uid://dj6i1hxecl5nq" path="res://assets/masks/mask_stars_drop.png" id="2_qstg2"]
|
||||
[ext_resource type="Script" uid="uid://c37qcqntd6ofm" path="res://scripts/mask_data.gd" id="3_3w4cd"]
|
||||
[ext_resource type="Texture2D" uid="uid://be0mx6lumyj2h" path="res://assets/masks/maske_ranged.png" id="4_4j6v6"]
|
||||
[ext_resource type="AudioStream" uid="uid://daoupl7nh7wwj" path="res://assets/sfx/heart.mp3" id="4_3w4cd"]
|
||||
[ext_resource type="Texture2D" uid="uid://be0mx6lumyj2h" path="res://assets/masks/mask_stars.png" id="4_4j6v6"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("3_3w4cd")
|
||||
mask_name = "scythe"
|
||||
texture = ExtResource("4_4j6v6")
|
||||
drop_texture = ExtResource("2_qstg2")
|
||||
spawn_sfx = ExtResource("4_3w4cd")
|
||||
attack_scene = ExtResource("1_qstg2")
|
||||
metadata/_custom_type_script = "uid://c37qcqntd6ofm"
|
||||
|
|
|
|||
|
|
@ -1,16 +1,18 @@
|
|||
[gd_resource type="Resource" script_class="MaskData" load_steps=5 format=3 uid="uid://cf7x0uuj6wnil"]
|
||||
[gd_resource type="Resource" script_class="MaskData" format=3 uid="uid://cf7x0uuj6wnil"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c37qcqntd6ofm" path="res://scripts/mask_data.gd" id="1_jst8j"]
|
||||
[ext_resource type="PackedScene" uid="uid://bmwgnwqj3scm5" path="res://scenes/scythe_attack.tscn" id="1_kutsy"]
|
||||
[ext_resource type="Texture2D" uid="uid://jdf7lep07uov" path="res://assets/masks/maske_melee_drop.png" id="2_kutsy"]
|
||||
[ext_resource type="Texture2D" uid="uid://c1e6cto11t24m" path="res://assets/masks/maske_melee.png" id="4_iook0"]
|
||||
[ext_resource type="Texture2D" uid="uid://jdf7lep07uov" path="res://assets/masks/mask_scythe_drop.png" id="2_kutsy"]
|
||||
[ext_resource type="AudioStream" uid="uid://diwr7vjwsqgl2" path="res://assets/sfx/swing.mp3" id="4_fkapk"]
|
||||
[ext_resource type="Texture2D" uid="uid://c1e6cto11t24m" path="res://assets/masks/mask_scythe.png" id="4_iook0"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_jst8j")
|
||||
mask_name = "scythe"
|
||||
texture = ExtResource("4_iook0")
|
||||
drop_texture = ExtResource("2_kutsy")
|
||||
spawn_sfx = "swing"
|
||||
spawn_sfx = ExtResource("4_fkapk")
|
||||
attack_scene = ExtResource("1_kutsy")
|
||||
cooldown = 0.4
|
||||
is_parented_to_attacker = true
|
||||
metadata/_custom_type_script = "uid://c37qcqntd6ofm"
|
||||
|
|
|
|||
16
resources/stars.tres
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
[gd_resource type="Resource" script_class="MaskData" format=3 uid="uid://0mtm64s4jthn"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://jc1w2i3wmmc8" path="res://scenes/stars.tscn" id="1_ljpkm"]
|
||||
[ext_resource type="Texture2D" uid="uid://dj6i1hxecl5nq" path="res://assets/masks/mask_stars_drop.png" id="2_7g803"]
|
||||
[ext_resource type="Script" uid="uid://c37qcqntd6ofm" path="res://scripts/mask_data.gd" id="3_ja4ep"]
|
||||
[ext_resource type="Texture2D" uid="uid://be0mx6lumyj2h" path="res://assets/masks/mask_stars.png" id="5_5rgq1"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("3_ja4ep")
|
||||
mask_name = "Stars"
|
||||
texture = ExtResource("5_5rgq1")
|
||||
drop_texture = ExtResource("2_7g803")
|
||||
attack_scene = ExtResource("1_ljpkm")
|
||||
cooldown = 1.0
|
||||
is_parented_to_attacker = true
|
||||
metadata/_custom_type_script = "uid://c37qcqntd6ofm"
|
||||
|
|
@ -1,54 +1,55 @@
|
|||
[gd_scene load_steps=9 format=3 uid="uid://dvlr5hamruqrd"]
|
||||
[gd_scene format=3 uid="uid://dvlr5hamruqrd"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b1t0k6dfubsmk" path="res://scripts/enemy.gd" id="1_fr7lv"]
|
||||
[ext_resource type="Resource" uid="uid://cf7x0uuj6wnil" path="res://resources/scythe.tres" id="2_j1ss0"]
|
||||
[ext_resource type="Script" uid="uid://synocbtvgrf4" path="res://scripts/shadow.gd" id="2_vv3x1"]
|
||||
[ext_resource type="PackedScene" uid="uid://c8l24d01bm2sg" path="res://scenes/enemy_explosion.tscn" id="3_esqeu"]
|
||||
[ext_resource type="Texture2D" uid="uid://cyftyrf36mm0r" path="res://assets/enemies/cosa_1.png" id="5_xuskm"]
|
||||
[ext_resource type="Texture2D" uid="uid://cyigyhudonahf" path="res://assets/enemies/cosa_2.png" id="6_3ysdf"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_sw0xa"]
|
||||
radius = 21.151093
|
||||
|
||||
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_sw0xa"]
|
||||
load_path = "res://.godot/imported/cosa_1.png-c80e15db2359bc0dd5374be118756ef5.ctex"
|
||||
|
||||
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_j1ss0"]
|
||||
load_path = "res://.godot/imported/cosa_2.png-5f6c1032dbcaad97f713d20bd287fe34.ctex"
|
||||
radius = 15.0
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_lxe82"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("CompressedTexture2D_sw0xa")
|
||||
"texture": ExtResource("5_xuskm")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("CompressedTexture2D_j1ss0")
|
||||
"texture": ExtResource("6_3ysdf")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[node name="EnemyBase" type="CharacterBody2D" groups=["enemy"]]
|
||||
[node name="EnemyBase" type="CharacterBody2D" unique_id=105822266 node_paths=PackedStringArray("main_visual") groups=["enemy"]]
|
||||
collision_layer = 2
|
||||
collision_mask = 3
|
||||
motion_mode = 1
|
||||
script = ExtResource("1_fr7lv")
|
||||
attack_charge_time = 0.1
|
||||
flee_range = 0.0
|
||||
approach_range = 60.0
|
||||
current_mask_data = ExtResource("2_j1ss0")
|
||||
move_speed = 80.0
|
||||
main_visual = NodePath("Anim")
|
||||
death_scene = ExtResource("3_esqeu")
|
||||
|
||||
[node name="Shadow" type="Node2D" parent="."]
|
||||
[node name="Shadow" type="Node2D" parent="." unique_id=1662034478]
|
||||
position = Vector2(0, 15)
|
||||
script = ExtResource("2_vv3x1")
|
||||
metadata/_custom_type_script = "uid://synocbtvgrf4"
|
||||
|
||||
[node name="NavigationAgent2D" type="NavigationAgent2D" parent="."]
|
||||
avoidance_enabled = true
|
||||
[node name="NavigationAgent2D" type="NavigationAgent2D" parent="." unique_id=1850652218]
|
||||
radius = 40.0
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1367309587]
|
||||
rotation = 2.4698958e-05
|
||||
shape = SubResource("CircleShape2D_sw0xa")
|
||||
|
||||
[node name="Anim" type="AnimatedSprite2D" parent="."]
|
||||
[node name="Anim" type="AnimatedSprite2D" parent="." unique_id=1536371166]
|
||||
sprite_frames = SubResource("SpriteFrames_lxe82")
|
||||
autoplay = "default"
|
||||
frame_progress = 0.52776843
|
||||
frame_progress = 0.71773696
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://c8tpykprvk02l"]
|
||||
[gd_scene format=3 uid="uid://c8tpykprvk02l"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://kyh2wu0jwdwd" path="res://scripts/enemy_spawn.gd" id="1_8pwvm"]
|
||||
[ext_resource type="PackedScene" uid="uid://dvlr5hamruqrd" path="res://scenes/enemy_base.tscn" id="2_vav55"]
|
||||
[ext_resource type="PackedScene" uid="uid://ya6jfltqnl1b" path="res://scenes/ranged_enemy.tscn" id="3_4ll2w"]
|
||||
[ext_resource type="PackedScene" uid="uid://ya6jfltqnl1b" path="res://scenes/star_enemy.tscn" id="3_4ll2w"]
|
||||
[ext_resource type="PackedScene" uid="uid://dbgsb7uyh2e5k" path="res://scenes/spit_dragon.tscn" id="4_muh2a"]
|
||||
|
||||
[node name="EnemySpawn" type="Node2D"]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=11 format=3 uid="uid://0n57icfpulmc"]
|
||||
[gd_scene format=3 uid="uid://0n57icfpulmc"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://beefpuq6vu475" path="res://assets/vfx/heart.png" id="1_hugpe"]
|
||||
[ext_resource type="Script" uid="uid://dyyqm52cwjimy" path="res://scripts/hearts.gd" id="2_q6mno"]
|
||||
|
|
@ -40,7 +40,7 @@ hue_variation_min = -0.07
|
|||
hue_variation_max = 0.01
|
||||
hue_variation_curve = SubResource("CurveTexture_hugpe")
|
||||
|
||||
[node name="Hearts" type="CPUParticles2D"]
|
||||
[node name="Hearts" type="CPUParticles2D" unique_id=664421978]
|
||||
z_index = 1
|
||||
amount = 32
|
||||
texture = SubResource("CanvasTexture_7sc4i")
|
||||
|
|
@ -57,10 +57,10 @@ hue_variation_curve = SubResource("Curve_215e1")
|
|||
script = ExtResource("2_q6mno")
|
||||
speed = 350.0
|
||||
|
||||
[node name="Hitbox" parent="." instance=ExtResource("3_hugpe")]
|
||||
[node name="Hitbox" parent="." unique_id=735192092 instance=ExtResource("3_hugpe")]
|
||||
scale = Vector2(0.63729316, 0.63729316)
|
||||
|
||||
[node name="Explosion" type="GPUParticles2D" parent="."]
|
||||
[node name="Explosion" type="GPUParticles2D" parent="." unique_id=832599826]
|
||||
z_index = 1
|
||||
emitting = false
|
||||
amount = 128
|
||||
|
|
@ -72,8 +72,8 @@ fixed_fps = 0
|
|||
draw_order = 0
|
||||
process_material = SubResource("ParticleProcessMaterial_q6mno")
|
||||
|
||||
[node name="Timer" type="Timer" parent="."]
|
||||
[node name="Timer" type="Timer" parent="." unique_id=1651057289]
|
||||
wait_time = 10.0
|
||||
|
||||
[connection signal="onhit" from="Hitbox" to="." method="_on_hitbox_onhit"]
|
||||
[connection signal="collided" from="Hitbox" to="." method="_on_hitbox_collided"]
|
||||
[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://dv8l318cesr8e"]
|
||||
[gd_scene format=3 uid="uid://dv8l318cesr8e"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b5wg73yvuksot" path="res://scripts/camera.gd" id="1_7gwtr"]
|
||||
[ext_resource type="Shader" uid="uid://bmhvm6dgin2au" path="res://shaders/pixelate_screen.gdshader" id="2_ujfja"]
|
||||
|
|
@ -8,10 +8,13 @@ shader = ExtResource("2_ujfja")
|
|||
shader_parameter/cam_pos = Vector2(0, 0)
|
||||
shader_parameter/scaling = Vector2(1, 1)
|
||||
|
||||
[node name="MainCam" type="Camera2D"]
|
||||
[node name="MainCam" type="Camera2D" unique_id=1501429496]
|
||||
script = ExtResource("1_7gwtr")
|
||||
|
||||
[node name="Pixelator" type="ColorRect" parent="."]
|
||||
[node name="BackBufferCopy" type="BackBufferCopy" parent="." unique_id=586260857]
|
||||
copy_mode = 2
|
||||
|
||||
[node name="Pixelator" type="ColorRect" parent="." unique_id=776565327]
|
||||
material = SubResource("ShaderMaterial_7gwtr")
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
[gd_scene load_steps=16 format=3 uid="uid://ncgwx0yjn2gt"]
|
||||
[gd_scene format=3 uid="uid://ncgwx0yjn2gt"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://sbseykg05177" path="res://scripts/player.gd" id="1_ur7pv"]
|
||||
[ext_resource type="Resource" uid="uid://cf7x0uuj6wnil" path="res://resources/scythe.tres" id="2_ur7pv"]
|
||||
[ext_resource type="Resource" uid="uid://cf7x0uuj6wnil" path="res://resources/scythe.tres" id="2_3v2ag"]
|
||||
[ext_resource type="PackedScene" uid="uid://bp45yth1y3ia5" path="res://scenes/player_explosion.tscn" id="3_3v2ag"]
|
||||
[ext_resource type="Script" uid="uid://synocbtvgrf4" path="res://scripts/shadow.gd" id="4_3v2ag"]
|
||||
[ext_resource type="Texture2D" uid="uid://d3abeekjumqyb" path="res://assets/player/maske1.png" id="5_jej6c"]
|
||||
[ext_resource type="Texture2D" uid="uid://dgd8u7jrpy1v5" path="res://assets/player/maske2.png" id="6_f1ej7"]
|
||||
[ext_resource type="Texture2D" uid="uid://ftfnn5v1swc1" path="res://ui/arrow.png" id="7_fjrip"]
|
||||
[ext_resource type="Texture2D" uid="uid://d3h6wl5cnf8ba" path="res://assets/player/maske3.png" id="7_oprun"]
|
||||
[ext_resource type="Script" uid="uid://c0e4uacrlcrk8" path="res://scripts/AnimSprite.gd" id="8_a8ls1"]
|
||||
[ext_resource type="Script" uid="uid://c0e4uacrlcrk8" path="res://scripts/float.gd" id="8_a8ls1"]
|
||||
[ext_resource type="Script" uid="uid://dn6ro2vef1qps" path="res://scripts/arrow.gd" id="8_smehm"]
|
||||
[ext_resource type="PackedScene" uid="uid://bq8ig7s8gxia4" path="res://ui/ui_layer.tscn" id="10_y4r1p"]
|
||||
[ext_resource type="PackedScene" uid="uid://dv8l318cesr8e" path="res://scenes/main_cam.tscn" id="11_d2wvv"]
|
||||
|
|
@ -39,26 +39,27 @@ animations = [{
|
|||
}]
|
||||
|
||||
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_f1jbl"]
|
||||
load_path = "res://.godot/imported/maske_melee.png-683f1c3cec32a2b5aa545d35da87a46b.ctex"
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_215e1"]
|
||||
radius = 10.049875
|
||||
|
||||
[node name="Player" type="CharacterBody2D" groups=["player"]]
|
||||
[node name="Player" type="CharacterBody2D" unique_id=1743724931 node_paths=PackedStringArray("main_visual") groups=["player"]]
|
||||
y_sort_enabled = true
|
||||
collision_layer = 2
|
||||
motion_mode = 1
|
||||
script = ExtResource("1_ur7pv")
|
||||
current_mask_data = ExtResource("2_ur7pv")
|
||||
current_mask_data = ExtResource("2_3v2ag")
|
||||
move_speed = 70.0
|
||||
main_visual = NodePath("PlayerSprite")
|
||||
death_scene = ExtResource("3_3v2ag")
|
||||
|
||||
[node name="UILayer" parent="." instance=ExtResource("10_y4r1p")]
|
||||
[node name="UILayer" parent="." unique_id=1349593982 instance=ExtResource("10_y4r1p")]
|
||||
|
||||
[node name="Shadow" type="Node2D" parent="."]
|
||||
[node name="Shadow" type="Node2D" parent="." unique_id=1220110125]
|
||||
position = Vector2(0, 19)
|
||||
script = ExtResource("4_3v2ag")
|
||||
|
||||
[node name="PlayerSprite" type="AnimatedSprite2D" parent="."]
|
||||
[node name="PlayerSprite" type="AnimatedSprite2D" parent="." unique_id=1363626832]
|
||||
position = Vector2(0, -30)
|
||||
sprite_frames = SubResource("SpriteFrames_e36ub")
|
||||
animation = &"idle"
|
||||
|
|
@ -67,21 +68,21 @@ script = ExtResource("8_a8ls1")
|
|||
float_str = 3.0
|
||||
float_time = 3.0
|
||||
|
||||
[node name="MaskSprite" type="Sprite2D" parent="PlayerSprite"]
|
||||
[node name="MaskSprite" type="Sprite2D" parent="PlayerSprite" unique_id=257186629]
|
||||
position = Vector2(0, 1)
|
||||
texture = SubResource("CompressedTexture2D_f1jbl")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=908201873]
|
||||
position = Vector2(0, 12)
|
||||
shape = SubResource("CircleShape2D_215e1")
|
||||
|
||||
[node name="Arrow" type="Sprite2D" parent="."]
|
||||
[node name="Arrow" type="Sprite2D" parent="." unique_id=217782533]
|
||||
scale = Vector2(2.468657, 2.468657)
|
||||
texture = ExtResource("7_fjrip")
|
||||
offset = Vector2(28.12, 0)
|
||||
script = ExtResource("8_smehm")
|
||||
|
||||
[node name="MainCam" parent="." node_paths=PackedStringArray("ui_layer") instance=ExtResource("11_d2wvv")]
|
||||
[node name="MainCam" parent="." unique_id=1367061205 node_paths=PackedStringArray("ui_layer") instance=ExtResource("11_d2wvv")]
|
||||
process_mode = 3
|
||||
z_index = 10
|
||||
target_res = Vector2(640, 360)
|
||||
|
|
|
|||
|
|
@ -1,16 +1,28 @@
|
|||
[gd_scene load_steps=10 format=3 uid="uid://bmwgnwqj3scm5"]
|
||||
[gd_scene format=3 uid="uid://bmwgnwqj3scm5"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c1anp8np0aw0" path="res://scripts/scythe_attack.gd" id="1_p6kik"]
|
||||
[ext_resource type="Shader" uid="uid://bwcmfh6twfdpi" path="res://shaders/fade_in.gdshader" id="2_aw0er"]
|
||||
[ext_resource type="Texture2D" uid="uid://cskpxmrlwc0gg" path="res://assets/masks/lavender_scythe.png" id="3_5mjrn"]
|
||||
[ext_resource type="PackedScene" uid="uid://crptu0w0l57dd" path="res://scenes/hitbox.tscn" id="4_ek4qm"]
|
||||
[ext_resource type="Script" uid="uid://bxqbkdomwqbtc" path="res://scripts/trail.gd" id="5_aw0er"]
|
||||
|
||||
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_2r5ap"]
|
||||
[sub_resource type="FastNoiseLite" id="FastNoiseLite_aw0er"]
|
||||
noise_type = 5
|
||||
frequency = 0.0087
|
||||
fractal_type = 0
|
||||
|
||||
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_5mjrn"]
|
||||
noise = SubResource("FastNoiseLite_aw0er")
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_5b14r"]
|
||||
shader = ExtResource("2_aw0er")
|
||||
shader_parameter/mask = SubResource("CompressedTexture2D_2r5ap")
|
||||
shader_parameter/progress = 1.0
|
||||
shader_parameter/noise_texture = SubResource("NoiseTexture2D_5mjrn")
|
||||
shader_parameter/progress = 0.0
|
||||
shader_parameter/edge_softness = 0.0
|
||||
|
||||
[sub_resource type="Curve" id="Curve_aw0er"]
|
||||
_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(1, 1), 0.0, 0.0, 0, 0]
|
||||
point_count = 2
|
||||
|
||||
[sub_resource type="Animation" id="Animation_lx8lr"]
|
||||
length = 0.001
|
||||
|
|
@ -38,10 +50,22 @@ tracks/1/keys = {
|
|||
"update": 0,
|
||||
"values": [0.0]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath(".:material:shader_parameter/progress")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [0.0]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_0m7gt"]
|
||||
resource_name = "swing"
|
||||
length = 0.5
|
||||
length = 0.53333336
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
|
|
@ -66,6 +90,18 @@ tracks/1/keys = {
|
|||
"update": 0,
|
||||
"values": [1.5707963267948966, 1.5707963267948966, -7.853981633974483]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath(".:material:shader_parameter/progress")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0, 0.2),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [0.0, 1.0]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_8jfvf"]
|
||||
_data = {
|
||||
|
|
@ -73,27 +109,36 @@ _data = {
|
|||
&"swing": SubResource("Animation_0m7gt")
|
||||
}
|
||||
|
||||
[node name="ScitheAttack" type="Node2D"]
|
||||
[node name="ScitheAttack" type="Node2D" unique_id=622535335]
|
||||
script = ExtResource("1_p6kik")
|
||||
|
||||
[node name="Anchor" type="Node2D" parent="."]
|
||||
[node name="Anchor" type="Node2D" parent="." unique_id=330712092]
|
||||
|
||||
[node name="Scithe" type="Sprite2D" parent="Anchor"]
|
||||
[node name="Scithe" type="Sprite2D" parent="Anchor" unique_id=1611161092]
|
||||
material = SubResource("ShaderMaterial_5b14r")
|
||||
scale = Vector2(0.904629, 0.904629)
|
||||
texture = ExtResource("3_5mjrn")
|
||||
flip_h = true
|
||||
|
||||
[node name="Hitbox" parent="Anchor/Scithe" instance=ExtResource("4_ek4qm")]
|
||||
[node name="Hitbox" parent="Anchor/Scithe" unique_id=2078242519 instance=ExtResource("4_ek4qm")]
|
||||
position = Vector2(-17.68681, -3.3162766)
|
||||
rotation = 0.79253083
|
||||
scale = Vector2(0.77211297, 3.2192266)
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
[node name="Trail" type="Line2D" parent="Anchor/Scithe" unique_id=462665408]
|
||||
show_behind_parent = true
|
||||
position = Vector2(28.741066, -14.370532)
|
||||
rotation = 1.5707961
|
||||
scale = Vector2(1.1054256, 1.1054256)
|
||||
points = PackedVector2Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
|
||||
width = 16.285
|
||||
width_curve = SubResource("Curve_aw0er")
|
||||
script = ExtResource("5_aw0er")
|
||||
metadata/_custom_type_script = "uid://bxqbkdomwqbtc"
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=824911322]
|
||||
root_node = NodePath("../Anchor/Scithe")
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_8jfvf")
|
||||
}
|
||||
autoplay = "swing"
|
||||
libraries/ = SubResource("AnimationLibrary_8jfvf")
|
||||
autoplay = &"swing"
|
||||
|
||||
[connection signal="animation_finished" from="AnimationPlayer" to="." method="_on_animation_player_animation_finished"]
|
||||
|
|
|
|||
45267
scenes/stage2.tscn
45268
scenes/stage3.tscn
37
scenes/star.tscn
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
[gd_scene format=3 uid="uid://dkik6vdjvfl3h"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cemrdyqfubw7h" path="res://scripts/star.gd" id="1_mcqwg"]
|
||||
[ext_resource type="AudioStream" uid="uid://dbmjok4h3yqgc" path="res://assets/sfx/star.wav" id="2_ef0hr"]
|
||||
[ext_resource type="Texture2D" uid="uid://dsak25b3jrn2r" path="res://assets/masks/star.png" id="2_j6vao"]
|
||||
[ext_resource type="Script" uid="uid://ejd25ul4j5pp" path="res://scripts/hitbox.gd" id="4_8d8bx"]
|
||||
[ext_resource type="Script" uid="uid://bxqbkdomwqbtc" path="res://scripts/trail.gd" id="5_8lrp4"]
|
||||
|
||||
[sub_resource type="Curve" id="Curve_sxbdi"]
|
||||
_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(1, 1), 0.0, 0.0, 0, 0]
|
||||
point_count = 2
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_8lrp4"]
|
||||
radius = 7.0
|
||||
|
||||
[node name="Star" type="Node2D" unique_id=1800196398]
|
||||
script = ExtResource("1_mcqwg")
|
||||
spawn_sfx = ExtResource("2_ef0hr")
|
||||
|
||||
[node name="Trail" type="Line2D" parent="." unique_id=1712481129]
|
||||
points = PackedVector2Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
|
||||
width = 2.5
|
||||
width_curve = SubResource("Curve_sxbdi")
|
||||
script = ExtResource("5_8lrp4")
|
||||
metadata/_custom_type_script = "uid://bxqbkdomwqbtc"
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=257593575]
|
||||
texture = ExtResource("2_j6vao")
|
||||
|
||||
[node name="Hitbox" type="Area2D" parent="." unique_id=1381928788]
|
||||
script = ExtResource("4_8d8bx")
|
||||
metadata/_custom_type_script = "uid://ejd25ul4j5pp"
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox" unique_id=263019627]
|
||||
shape = SubResource("CircleShape2D_8lrp4")
|
||||
|
||||
[connection signal="collided" from="Hitbox" to="." method="_on_hitbox_collided"]
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
[gd_scene load_steps=10 format=3 uid="uid://ya6jfltqnl1b"]
|
||||
[gd_scene format=3 uid="uid://ya6jfltqnl1b"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://buamdls133c2e" path="res://scripts/ranged_enemy.gd" id="1_rs3ab"]
|
||||
[ext_resource type="Resource" uid="uid://jar2mye8do0c" path="res://resources/hearts.tres" id="2_nqoy7"]
|
||||
[ext_resource type="Script" uid="uid://buamdls133c2e" path="res://scripts/star_enemy.gd" id="1_rs3ab"]
|
||||
[ext_resource type="Resource" uid="uid://0mtm64s4jthn" path="res://resources/stars.tres" id="2_2mruc"]
|
||||
[ext_resource type="Script" uid="uid://synocbtvgrf4" path="res://scripts/shadow.gd" id="2_v0fr6"]
|
||||
[ext_resource type="PackedScene" uid="uid://c8l24d01bm2sg" path="res://scenes/enemy_explosion.tscn" id="3_g3aa2"]
|
||||
[ext_resource type="Texture2D" uid="uid://c0e666ifvdck6" path="res://assets/enemies/cerdipulpo_1.png" id="3_v0fr6"]
|
||||
|
|
@ -9,6 +9,7 @@
|
|||
[ext_resource type="Texture2D" uid="uid://cy034lyy4w74p" path="res://assets/enemies/cerdipulpo_3.png" id="5_2ls4a"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_rs3ab"]
|
||||
radius = 16.0
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_w150n"]
|
||||
animations = [{
|
||||
|
|
@ -27,25 +28,30 @@ animations = [{
|
|||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[node name="RangedEnemy" type="CharacterBody2D" groups=["enemy"]]
|
||||
[node name="RangedEnemy" type="CharacterBody2D" unique_id=93153910 node_paths=PackedStringArray("main_visual") groups=["enemy"]]
|
||||
collision_layer = 2
|
||||
collision_mask = 3
|
||||
script = ExtResource("1_rs3ab")
|
||||
current_mask_data = ExtResource("2_nqoy7")
|
||||
attack_charge_time = 0.5
|
||||
flee_range = 130.0
|
||||
approach_range = 220.0
|
||||
current_mask_data = ExtResource("2_2mruc")
|
||||
move_speed = 40.0
|
||||
main_visual = NodePath("Anim")
|
||||
death_scene = ExtResource("3_g3aa2")
|
||||
|
||||
[node name="Shadow" type="Node2D" parent="."]
|
||||
[node name="Shadow" type="Node2D" parent="." unique_id=1651361569]
|
||||
position = Vector2(0, 16)
|
||||
script = ExtResource("2_v0fr6")
|
||||
metadata/_custom_type_script = "uid://synocbtvgrf4"
|
||||
|
||||
[node name="NavigationAgent2D" type="NavigationAgent2D" parent="."]
|
||||
avoidance_enabled = true
|
||||
[node name="NavigationAgent2D" type="NavigationAgent2D" parent="." unique_id=1882108293]
|
||||
radius = 40.0
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1216246343]
|
||||
shape = SubResource("CircleShape2D_rs3ab")
|
||||
|
||||
[node name="Anim" type="AnimatedSprite2D" parent="."]
|
||||
[node name="Anim" type="AnimatedSprite2D" parent="." unique_id=1041580697]
|
||||
modulate = Color(0.94509804, 0.94509804, 0.94509804, 1)
|
||||
sprite_frames = SubResource("SpriteFrames_w150n")
|
||||
autoplay = "default"
|
||||
26
scenes/stars.tscn
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
[gd_scene format=3 uid="uid://jc1w2i3wmmc8"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ct4pupgvmtpgg" path="res://scripts/stars.gd" id="1_ucpii"]
|
||||
[ext_resource type="PackedScene" uid="uid://dkik6vdjvfl3h" path="res://scenes/star.tscn" id="2_rs5ub"]
|
||||
|
||||
[node name="Stars" type="Node2D" unique_id=2004740658]
|
||||
script = ExtResource("1_ucpii")
|
||||
star_scene = ExtResource("2_rs5ub")
|
||||
|
||||
[node name="Marker2D" type="Marker2D" parent="." unique_id=1228012261]
|
||||
position = Vector2(-29, -28)
|
||||
|
||||
[node name="Marker2D2" type="Marker2D" parent="." unique_id=1218802296]
|
||||
position = Vector2(0, -44)
|
||||
|
||||
[node name="Marker2D3" type="Marker2D" parent="." unique_id=623647614]
|
||||
position = Vector2(28, -28)
|
||||
|
||||
[node name="Marker2D4" type="Marker2D" parent="." unique_id=658325280]
|
||||
position = Vector2(-29, 6)
|
||||
|
||||
[node name="Marker2D5" type="Marker2D" parent="." unique_id=113536853]
|
||||
position = Vector2(0, 24)
|
||||
|
||||
[node name="Marker2D6" type="Marker2D" parent="." unique_id=244712203]
|
||||
position = Vector2(28, 6)
|
||||
|
|
@ -1,10 +1,8 @@
|
|||
[gd_scene load_steps=14 format=3 uid="uid://crecxacda45j3"]
|
||||
[gd_scene format=3 uid="uid://crecxacda45j3"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://nf16c5x6khy6" path="res://scripts/start_menu.gd" id="1_ia0g5"]
|
||||
[ext_resource type="PackedScene" uid="uid://bvp37ljy8eaba" path="res://ui/texture_container.tscn" id="1_jwbto"]
|
||||
[ext_resource type="Texture2D" uid="uid://ddvyrpgjh4o3c" path="res://ui/title.png" id="3_ppfnh"]
|
||||
[ext_resource type="Theme" uid="uid://d3iyu7ukwsn1p" path="res://ui/default_theme.tres" id="3_v2mkm"]
|
||||
[ext_resource type="Script" uid="uid://c62xd44e27oki" path="res://scripts/settings_menu.gd" id="4_ctwoq"]
|
||||
[ext_resource type="PackedScene" uid="uid://dv8l318cesr8e" path="res://scenes/main_cam.tscn" id="5_ctwoq"]
|
||||
[ext_resource type="Script" uid="uid://llka3aa044jo" path="res://scripts/click.gd" id="6_acoh7"]
|
||||
[ext_resource type="Texture2D" uid="uid://di3mn2tr6dnac" path="res://ui/button.png" id="6_pgi0o"]
|
||||
|
|
@ -13,21 +11,22 @@
|
|||
[ext_resource type="Texture2D" uid="uid://d0ydt84235pua" path="res://ui/button-4.png" id="9_gfl6h"]
|
||||
[ext_resource type="Texture2D" uid="uid://c7mdtwpckl7nr" path="res://ui/button-5.png" id="10_kefd2"]
|
||||
[ext_resource type="Texture2D" uid="uid://bt6r7jlshl680" path="res://ui/button-6.png" id="11_acoh7"]
|
||||
[ext_resource type="PackedScene" uid="uid://c6f7s7bsitw13" path="res://ui/settings_menu.tscn" id="11_vnuwp"]
|
||||
|
||||
[node name="StartMenu" type="Node2D" node_paths=PackedStringArray("settings")]
|
||||
[node name="StartMenu" type="Node2D" unique_id=777527274 node_paths=PackedStringArray("settings")]
|
||||
script = ExtResource("1_ia0g5")
|
||||
settings = NodePath("CanvasLayer/Control/SettingsMenu")
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="." unique_id=1547201282]
|
||||
process_mode = 3
|
||||
|
||||
[node name="Control" type="TextureRect" parent="CanvasLayer"]
|
||||
[node name="Control" type="TextureRect" parent="CanvasLayer" unique_id=1951239017]
|
||||
offset_right = 480.0
|
||||
offset_bottom = 270.0
|
||||
theme = ExtResource("3_v2mkm")
|
||||
texture = ExtResource("3_ppfnh")
|
||||
|
||||
[node name="StartButton" type="TextureButton" parent="CanvasLayer/Control"]
|
||||
[node name="StartButton" type="TextureButton" parent="CanvasLayer/Control" unique_id=304846452]
|
||||
layout_mode = 0
|
||||
offset_left = 16.0
|
||||
offset_top = 72.0
|
||||
|
|
@ -38,7 +37,7 @@ texture_pressed = ExtResource("6_pgi0o")
|
|||
texture_hover = ExtResource("7_73a2t")
|
||||
script = ExtResource("6_acoh7")
|
||||
|
||||
[node name="Label" type="Label" parent="CanvasLayer/Control/StartButton"]
|
||||
[node name="Label" type="Label" parent="CanvasLayer/Control/StartButton" unique_id=1472852849]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
|
|
@ -53,7 +52,7 @@ grow_horizontal = 2
|
|||
grow_vertical = 2
|
||||
text = "Start Game"
|
||||
|
||||
[node name="Settings" type="TextureButton" parent="CanvasLayer/Control"]
|
||||
[node name="Settings" type="TextureButton" parent="CanvasLayer/Control" unique_id=1714311456]
|
||||
layout_mode = 0
|
||||
offset_left = 136.0
|
||||
offset_top = 116.0
|
||||
|
|
@ -64,7 +63,7 @@ texture_pressed = ExtResource("8_xsckg")
|
|||
texture_hover = ExtResource("9_gfl6h")
|
||||
script = ExtResource("6_acoh7")
|
||||
|
||||
[node name="Label" type="Label" parent="CanvasLayer/Control/Settings"]
|
||||
[node name="Label" type="Label" parent="CanvasLayer/Control/Settings" unique_id=1534187192]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
|
|
@ -79,7 +78,7 @@ grow_horizontal = 2
|
|||
grow_vertical = 2
|
||||
text = "Settings"
|
||||
|
||||
[node name="Exit" type="TextureButton" parent="CanvasLayer/Control"]
|
||||
[node name="Exit" type="TextureButton" parent="CanvasLayer/Control" unique_id=685030824]
|
||||
layout_mode = 0
|
||||
offset_left = 91.0
|
||||
offset_top = 20.0
|
||||
|
|
@ -90,7 +89,7 @@ texture_pressed = ExtResource("10_kefd2")
|
|||
texture_hover = ExtResource("11_acoh7")
|
||||
script = ExtResource("6_acoh7")
|
||||
|
||||
[node name="Exit" type="Label" parent="CanvasLayer/Control/Exit"]
|
||||
[node name="Exit" type="Label" parent="CanvasLayer/Control/Exit" unique_id=41843911]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
|
|
@ -105,103 +104,10 @@ grow_horizontal = 2
|
|||
grow_vertical = 2
|
||||
text = "Exit"
|
||||
|
||||
[node name="SettingsMenu" parent="CanvasLayer/Control" node_paths=PackedStringArray("volume_slider", "fullscreen_check", "vsync_check") instance=ExtResource("1_jwbto")]
|
||||
visible = false
|
||||
[node name="SettingsMenu" parent="CanvasLayer/Control" unique_id=546978037 instance=ExtResource("11_vnuwp")]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -100.5625
|
||||
offset_top = -100.5625
|
||||
offset_right = 100.5625
|
||||
offset_bottom = 100.5625
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme = ExtResource("3_v2mkm")
|
||||
axis_stretch_horizontal = 1
|
||||
axis_stretch_vertical = 1
|
||||
script = ExtResource("4_ctwoq")
|
||||
volume_slider = NodePath("MarginContainer/VBoxContainer/HBoxContainer/Volume")
|
||||
fullscreen_check = NodePath("MarginContainer/VBoxContainer/Fullscreen/CheckBox")
|
||||
vsync_check = NodePath("MarginContainer/VBoxContainer/Vsync/CheckBox")
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="CanvasLayer/Control/SettingsMenu"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme = ExtResource("3_v2mkm")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="CanvasLayer/Control/SettingsMenu/MarginContainer"]
|
||||
layout_mode = 2
|
||||
theme = ExtResource("3_v2mkm")
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="CanvasLayer/Control/SettingsMenu/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="CanvasLayer/Control/SettingsMenu/MarginContainer/VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Volume"
|
||||
|
||||
[node name="Volume" type="HSlider" parent="CanvasLayer/Control/SettingsMenu/MarginContainer/VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme = ExtResource("3_v2mkm")
|
||||
max_value = 1.0
|
||||
step = 0.01
|
||||
tick_count = 5
|
||||
ticks_on_borders = true
|
||||
ticks_position = 3
|
||||
|
||||
[node name="Fullscreen" type="HBoxContainer" parent="CanvasLayer/Control/SettingsMenu/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="Label" type="Label" parent="CanvasLayer/Control/SettingsMenu/MarginContainer/VBoxContainer/Fullscreen"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 0
|
||||
text = "Fullscreen"
|
||||
|
||||
[node name="CheckBox" type="CheckBox" parent="CanvasLayer/Control/SettingsMenu/MarginContainer/VBoxContainer/Fullscreen"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 10
|
||||
|
||||
[node name="Vsync" type="HBoxContainer" parent="CanvasLayer/Control/SettingsMenu/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="Label" type="Label" parent="CanvasLayer/Control/SettingsMenu/MarginContainer/VBoxContainer/Vsync"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 0
|
||||
text = "Vsync"
|
||||
|
||||
[node name="CheckBox" type="CheckBox" parent="CanvasLayer/Control/SettingsMenu/MarginContainer/VBoxContainer/Vsync"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 10
|
||||
|
||||
[node name="Buttons" type="MarginContainer" parent="CanvasLayer/Control/SettingsMenu/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 10
|
||||
|
||||
[node name="HBoxContainer2" type="HBoxContainer" parent="CanvasLayer/Control/SettingsMenu/MarginContainer/VBoxContainer/Buttons"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 10
|
||||
|
||||
[node name="ExitButton" type="Button" parent="CanvasLayer/Control/SettingsMenu/MarginContainer/VBoxContainer/Buttons/HBoxContainer2"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 0
|
||||
text = "Exit"
|
||||
|
||||
[node name="ContinueButton" type="Button" parent="CanvasLayer/Control/SettingsMenu/MarginContainer/VBoxContainer/Buttons/HBoxContainer2"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 10
|
||||
text = "Continue"
|
||||
|
||||
[node name="MainCam2" parent="." node_paths=PackedStringArray("ui_layer") instance=ExtResource("5_ctwoq")]
|
||||
[node name="MainCam2" parent="." unique_id=217317670 node_paths=PackedStringArray("ui_layer") instance=ExtResource("5_ctwoq")]
|
||||
process_mode = 3
|
||||
z_index = 10
|
||||
ui_layer = NodePath("../CanvasLayer")
|
||||
|
|
@ -209,8 +115,3 @@ ui_layer = NodePath("../CanvasLayer")
|
|||
[connection signal="pressed" from="CanvasLayer/Control/StartButton" to="." method="_on_start_button_pressed"]
|
||||
[connection signal="pressed" from="CanvasLayer/Control/Settings" to="." method="_on_settings_pressed"]
|
||||
[connection signal="pressed" from="CanvasLayer/Control/Exit" to="." method="_on_exit_pressed"]
|
||||
[connection signal="value_changed" from="CanvasLayer/Control/SettingsMenu/MarginContainer/VBoxContainer/HBoxContainer/Volume" to="CanvasLayer/Control/SettingsMenu" method="_on_volume_changed"]
|
||||
[connection signal="toggled" from="CanvasLayer/Control/SettingsMenu/MarginContainer/VBoxContainer/Fullscreen/CheckBox" to="CanvasLayer/Control/SettingsMenu" method="_on_fullscreen_toggled"]
|
||||
[connection signal="toggled" from="CanvasLayer/Control/SettingsMenu/MarginContainer/VBoxContainer/Vsync/CheckBox" to="CanvasLayer/Control/SettingsMenu" method="_on_vsync_toggled"]
|
||||
[connection signal="pressed" from="CanvasLayer/Control/SettingsMenu/MarginContainer/VBoxContainer/Buttons/HBoxContainer2/ExitButton" to="CanvasLayer/Control/SettingsMenu" method="_on_exit_button_pressed"]
|
||||
[connection signal="pressed" from="CanvasLayer/Control/SettingsMenu/MarginContainer/VBoxContainer/Buttons/HBoxContainer2/ContinueButton" to="CanvasLayer/Control/SettingsMenu" method="_on_continue_button_pressed"]
|
||||
|
|
|
|||
12188
scenes/world_1.tscn
Normal file
|
|
@ -1,9 +1,10 @@
|
|||
extends WorldEnvironment
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
EventBus.change_glow.connect(_change_glow)
|
||||
environment.glow_enabled = Settings.glow
|
||||
|
||||
|
||||
func _change_glow(new : bool):
|
||||
environment.glow_enabled = new
|
||||
|
|
|
|||
|
|
@ -1,17 +1,7 @@
|
|||
extends BaseButton
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
button_down.connect(down)
|
||||
print("button")
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
pass
|
||||
|
||||
func down() -> void:
|
||||
print("clikced!!")
|
||||
SoundManager.play_sfx("click")
|
||||
SoundManager.play_sfx(SoundManager.SFX_CLICK)
|
||||
|
|
|
|||
|
|
@ -1,15 +1,5 @@
|
|||
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
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if event.is_action_pressed("ui_cancel"):
|
||||
get_tree().quit()
|
||||
|
|
|
|||
|
|
@ -12,16 +12,15 @@ var target_node: Node2D
|
|||
|
||||
func _ready() -> void:
|
||||
add_to_group("enemy")
|
||||
nav_agent.velocity_computed.connect(_on_velocity_computed)
|
||||
target_node = get_tree().get_first_node_in_group("player")
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
if not target_node: return
|
||||
|
||||
nav_agent.target_position = target_node.global_position
|
||||
var dist = global_position.distance_to(target_node.global_position)
|
||||
nav_agent.target_position = target_node.position
|
||||
var dist = position.distance_to(target_node.position)
|
||||
var next_path_pos = nav_agent.get_next_path_position()
|
||||
var dir = global_position.direction_to(next_path_pos)
|
||||
var dir = position.direction_to(next_path_pos)
|
||||
|
||||
if dist > approach_range:
|
||||
velocity += dir * move_speed
|
||||
|
|
@ -32,7 +31,7 @@ func _physics_process(delta: float) -> void:
|
|||
else:
|
||||
_handle_attack_charge(delta)
|
||||
|
||||
sprite.flip_h = target_node.global_position.x > global_position.x
|
||||
sprite.flip_h = target_node.position.x > position.x
|
||||
scale = Vector2.ONE * (1 + (current_charge * 0.2))
|
||||
|
||||
super._physics_process(delta)
|
||||
|
|
@ -47,6 +46,10 @@ func _handle_attack_charge(delta):
|
|||
func _on_velocity_computed(safe_vel: Vector2):
|
||||
velocity = safe_vel
|
||||
|
||||
func damage(amount: int = 1) -> void:
|
||||
super.damage(amount)
|
||||
SoundManager.play_sfx(SoundManager.SFX_DEATH)
|
||||
|
||||
func knockback():
|
||||
velocity += global_position.direction_to(nav_agent.target_position).normalized() * -2000
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ signal died
|
|||
@export var max_health: int = 3
|
||||
@export var move_speed: float = 50.0
|
||||
@export var friction: float = 0.7
|
||||
@export var main_visual : Node2D
|
||||
@export var death_scene : PackedScene
|
||||
|
||||
@onready var health: int = max_health
|
||||
|
|
@ -24,6 +25,7 @@ func damage(amount: int = 1) -> void:
|
|||
health_changed.emit(health)
|
||||
|
||||
_play_hit_flash()
|
||||
EventBus.screenshake.emit(5)
|
||||
|
||||
if health <= 0:
|
||||
die()
|
||||
|
|
@ -36,15 +38,18 @@ func die():
|
|||
died.emit()
|
||||
|
||||
|
||||
func _apply_movement(_delta: float) -> void:
|
||||
func _apply_movement() -> void:
|
||||
velocity *= friction
|
||||
move_and_slide()
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
mask_use_cd -= delta
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
mask_use_cd -= delta
|
||||
_apply_movement(delta)
|
||||
move_and_slide()
|
||||
_apply_movement()
|
||||
|
||||
func _play_hit_flash():
|
||||
var tween = create_tween()
|
||||
tween.tween_property(self, "modulate", Color.CRIMSON, 0.1)
|
||||
tween.tween_property(self, "modulate", Color.WHITE, 0.3)
|
||||
if main_visual:
|
||||
tween.tween_property(main_visual, "modulate", Color.CRIMSON, 0.1)
|
||||
tween.tween_property(main_visual, "modulate", Color.WHITE, 0.3)
|
||||
|
|
|
|||
|
|
@ -5,9 +5,7 @@ var time = 0.0
|
|||
@export var float_time = 2.0
|
||||
@export var float_offset = -12.0
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
time += delta
|
||||
# Calculate the new Y position using a sine wave
|
||||
position.y = sin(time * float_time) * float_str + float_offset
|
||||
queue_redraw()
|
||||
|
|
@ -21,6 +21,7 @@ class_name GrassMultiMesh extends MultiMeshInstance2D
|
|||
@export var brush_radius : float = 50.0
|
||||
@export var brush_density : int = 5
|
||||
|
||||
# TODO: save to file, enabnle filesytem warning
|
||||
@export_storage var grass_data : Array[Dictionary] = []
|
||||
|
||||
enum GrassState {NORMAL = 0, CUT = 1}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ func _physics_process(delta: float) -> void:
|
|||
func set_from_player(val):
|
||||
$Hitbox.from_player = val
|
||||
|
||||
func _on_hitbox_onhit() -> void:
|
||||
func _on_hitbox_collided() -> void:
|
||||
$Hitbox.queue_free()
|
||||
$Explosion.emitting = true
|
||||
emitting = false
|
||||
|
|
|
|||
|
|
@ -1,31 +1,30 @@
|
|||
class_name Hitbox extends Area2D
|
||||
signal collided;
|
||||
|
||||
var from_player = true
|
||||
signal onhit;
|
||||
var hitplayer = false
|
||||
|
||||
#func _process(delta: float) -> void:
|
||||
#EventBus.cut_grass_at.emit(global_position, 14)
|
||||
var enabled = true
|
||||
|
||||
func _ready() -> void:
|
||||
collision_mask = 0xffff
|
||||
body_entered.connect(_on_body_entered)
|
||||
area_entered.connect(_on_area_entered)
|
||||
|
||||
func _on_area_entered(area : Area2D):
|
||||
if area is Hitbox:
|
||||
if area.from_player != from_player:
|
||||
collided.emit()
|
||||
|
||||
func _on_body_entered(body: Node) -> void:
|
||||
print(body)
|
||||
if not enabled: return
|
||||
if body is Enemy and from_player:
|
||||
var bname := str(body.name)
|
||||
body.damage()
|
||||
onhit.emit()
|
||||
collided.emit()
|
||||
body.knockback()
|
||||
EventBus.debug_print.emit("Hit: " + bname)
|
||||
|
||||
if body is Player and not from_player and not hitplayer:
|
||||
var bname := str(body.name)
|
||||
hitplayer = true
|
||||
if body is Player and not from_player:
|
||||
body.damage()
|
||||
onhit.emit()
|
||||
EventBus.debug_print.emit("Hit: " + bname)
|
||||
collided.emit()
|
||||
|
||||
EventBus.debug_print.emit(str(body))
|
||||
if body is StaticBody2D:
|
||||
onhit.emit()
|
||||
if body is StaticBody2D or body is Hitbox:
|
||||
collided.emit()
|
||||
|
|
|
|||
|
|
@ -17,12 +17,6 @@ var runes : Texture2D = load("res://assets/vfx/runes.png");
|
|||
var rot = 0;
|
||||
var time = 0;
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(_delta):
|
||||
queue_redraw()
|
||||
|
||||
|
|
@ -105,7 +99,7 @@ func _draw():
|
|||
var layer_color = main_color
|
||||
layer_color.a = clamp(vis_layers - i, 0, 1)
|
||||
|
||||
draw_set_transform(Vector2.ZERO, layer_rot, Vector2(1, squish))
|
||||
draw_set_transform(Vector2.ZERO, layer_rot, Vector2.ONE)
|
||||
if layer_type < 0.2:
|
||||
var small_circles = rand_r(0, 5)
|
||||
var small_radius = layer_radius * 0.1
|
||||
|
|
@ -117,3 +111,4 @@ func _draw():
|
|||
elif layer_type <= 1:
|
||||
var rune_num = round(4 + layer_counter * 32)
|
||||
_draw_text_circle(layer_radius, rune_num, layer_color)
|
||||
scale.y = squish
|
||||
|
|
|
|||
25
scripts/mask_ability.gd
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
class_name MaskAbility extends Node2D
|
||||
|
||||
var from_player : bool = false
|
||||
var target_position : Vector2
|
||||
var start_position : Vector2
|
||||
|
||||
func mask_ready():
|
||||
set_from_player(from_player)
|
||||
|
||||
func _get_all_children(node) -> Array:
|
||||
var nodes : Array = []
|
||||
for N in node.get_children():
|
||||
if N.get_child_count() > 0:
|
||||
nodes.append(N)
|
||||
nodes.append_array(_get_all_children(N))
|
||||
else:
|
||||
nodes.append(N)
|
||||
return nodes
|
||||
|
||||
func set_from_player(val):
|
||||
from_player = val
|
||||
var children = _get_all_children(self)
|
||||
for c in children:
|
||||
if c is Hitbox:
|
||||
c.from_player = from_player
|
||||
1
scripts/mask_ability.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://vu72vj17tapv
|
||||
|
|
@ -6,7 +6,7 @@ enum MaskType { MELEE, RANGED, SPIT }
|
|||
@export var mask_name: String
|
||||
@export var texture: Texture2D
|
||||
@export var drop_texture: Texture2D
|
||||
@export var spawn_sfx : String
|
||||
@export var spawn_sfx : Resource
|
||||
|
||||
@export_group("Combat")
|
||||
@export var attack_scene: PackedScene
|
||||
|
|
@ -18,22 +18,23 @@ func activate(attacker: Node2D, target_pos: Vector2) -> void:
|
|||
if not attack_scene:
|
||||
return
|
||||
|
||||
var atk = attack_scene.instantiate()
|
||||
var atk : MaskAbility = attack_scene.instantiate()
|
||||
|
||||
if is_parented_to_attacker:
|
||||
attacker.add_child(atk)
|
||||
atk.position = Vector2.ZERO
|
||||
else:
|
||||
attacker.get_parent().add_child(atk)
|
||||
atk.global_position = attacker.global_position
|
||||
atk.position = attacker.position
|
||||
|
||||
atk.look_at(target_pos)
|
||||
atk.start_position = attacker.position
|
||||
atk.target_position = target_pos
|
||||
|
||||
if atk.get("start_position"):
|
||||
atk.start_position = attacker.global_position
|
||||
atk.target_position = target_pos
|
||||
var from_player = attacker.is_in_group("player")
|
||||
atk.from_player = from_player
|
||||
|
||||
if atk.has_method("set_from_player"):
|
||||
atk.set_from_player(attacker.is_in_group("player"))
|
||||
if not from_player:
|
||||
atk.modulate = Color("#0000ff")
|
||||
|
||||
atk.mask_ready()
|
||||
SoundManager.play_sfx(spawn_sfx)
|
||||
|
|
|
|||
|
|
@ -13,13 +13,19 @@ var mask_time_remaining := 15.0
|
|||
|
||||
var closest_mask_drop: MaskDrop
|
||||
var last_mask_drop : MaskDrop
|
||||
const INTERACT_DIST = 60.0
|
||||
const INTERACT_DIST = 100.0
|
||||
|
||||
var dead = false
|
||||
|
||||
func _ready() -> void:
|
||||
health_changed.connect(EventBus.health_changed.emit)
|
||||
health_changed.emit(health)
|
||||
equip_mask(current_mask_data)
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
super._process(delta)
|
||||
if Input.is_action_pressed("attack"):
|
||||
use_mask(get_global_mouse_position())
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
if dead: return
|
||||
|
|
@ -49,6 +55,9 @@ func revive():
|
|||
dead = false
|
||||
visible = true
|
||||
|
||||
func damage(amount: int = 1) -> void:
|
||||
EventBus.player_dmg.emit()
|
||||
super.damage(amount)
|
||||
|
||||
func start_dash(dir: Vector2):
|
||||
dash_active = true
|
||||
|
|
@ -60,21 +69,25 @@ func start_dash(dir: Vector2):
|
|||
tween.tween_property(player_sprite, "scale:x", 1, 0.1)
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if event.is_action_pressed("attack") and current_mask_data:
|
||||
use_mask(get_global_mouse_position())
|
||||
#if event.is_action_pressed("attack") and current_mask_data:
|
||||
#use_mask(get_global_mouse_position())
|
||||
|
||||
if event.is_action_pressed("interact") and closest_mask_drop:
|
||||
equip_mask(closest_mask_drop)
|
||||
collect_drop(closest_mask_drop)
|
||||
|
||||
func equip_mask(drop_node : MaskDrop):
|
||||
func equip_mask(mask_data : MaskData):
|
||||
current_mask_data = mask_data
|
||||
mask_sprite.texture = mask_data.texture
|
||||
EventBus.mask_changed.emit(mask_data.mask_name)
|
||||
|
||||
|
||||
func collect_drop(drop_node : MaskDrop):
|
||||
if drop_node.has_method("collect"):
|
||||
drop_node.collect(global_position)
|
||||
|
||||
current_mask_data = drop_node.mask_type
|
||||
mask_time_remaining = mask_start_time
|
||||
|
||||
mask_sprite.texture = current_mask_data.texture
|
||||
EventBus.mask_changed.emit(current_mask_data.mask_name)
|
||||
equip_mask(drop_node.mask_type)
|
||||
|
||||
func _handle_mask_durability(delta : float):
|
||||
if get_tree().get_node_count_in_group("enemy") > 0:
|
||||
|
|
@ -96,9 +109,10 @@ func _check_items():
|
|||
|
||||
if last_mask_drop and closest_mask_drop != last_mask_drop:
|
||||
last_mask_drop.hide_popup()
|
||||
last_mask_drop = closest_mask_drop
|
||||
|
||||
if closest_mask_drop:
|
||||
if min_dist < INTERACT_DIST:
|
||||
closest_mask_drop.show_popup()
|
||||
else:
|
||||
closest_mask_drop.hide_popup()
|
||||
last_mask_drop = closest_mask_drop
|
||||
|
|
|
|||
|
|
@ -1,14 +1,9 @@
|
|||
extends Sprite2D
|
||||
|
||||
@export var nextScene : String
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
pass # Replace with function body.
|
||||
@export var nextScene : PackedScene
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
func _process(_delta: float) -> void:
|
||||
var enemies = len(get_tree().get_nodes_in_group("enemy"))
|
||||
var player = get_tree().get_first_node_in_group("player")
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
extends Node2D
|
||||
|
||||
@export var range : int = 50
|
||||
@export var show_range : int = 50
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
if has_node("%Player"):
|
||||
if %Player.global_position.distance_to(global_position) < range:
|
||||
var player = get_tree().get_first_node_in_group("player")
|
||||
if player:
|
||||
if player.global_position.distance_to(global_position) < show_range:
|
||||
show_ins()
|
||||
else:
|
||||
hide_ins()
|
||||
|
|
|
|||
54
scripts/room_spawn.gd
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
class_name RoomSpawn extends Area2D
|
||||
|
||||
@export var waves_container: Node2D
|
||||
|
||||
var waves: Array[Node] = []
|
||||
var current_wave_index: int = 0
|
||||
var active_enemies: int = 0
|
||||
var has_triggered: bool = false
|
||||
|
||||
func _ready() -> void:
|
||||
body_entered.connect(_on_body_entered)
|
||||
|
||||
if not waves_container:
|
||||
push_error("Waves container not assigned in RoomSpawn!")
|
||||
return
|
||||
|
||||
waves = waves_container.get_children()
|
||||
for wave in waves:
|
||||
wave.hide()
|
||||
wave.process_mode = Node.PROCESS_MODE_DISABLED
|
||||
|
||||
func _on_body_entered(body: Node2D) -> void:
|
||||
if has_triggered:
|
||||
return
|
||||
|
||||
if body.is_in_group("player"):
|
||||
has_triggered = true
|
||||
start_next_wave()
|
||||
|
||||
func start_next_wave() -> void:
|
||||
if current_wave_index >= waves.size():
|
||||
return
|
||||
|
||||
var current_wave = waves[current_wave_index]
|
||||
current_wave.show()
|
||||
current_wave.process_mode = Node.PROCESS_MODE_INHERIT
|
||||
|
||||
var enemies = current_wave.get_children()
|
||||
active_enemies = enemies.size()
|
||||
|
||||
if active_enemies == 0:
|
||||
current_wave_index += 1
|
||||
start_next_wave()
|
||||
return
|
||||
|
||||
for enemy in enemies:
|
||||
enemy.tree_exited.connect(_on_enemy_died)
|
||||
|
||||
func _on_enemy_died() -> void:
|
||||
active_enemies -= 1
|
||||
|
||||
if active_enemies <= 0:
|
||||
current_wave_index += 1
|
||||
start_next_wave()
|
||||
1
scripts/room_spawn.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dr2icqss6nekh
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
extends Node2D
|
||||
extends MaskAbility
|
||||
|
||||
|
||||
func set_from_player(val):
|
||||
$Anchor/Scithe/Hitbox.from_player = val
|
||||
func mask_ready():
|
||||
super.mask_ready()
|
||||
look_at(target_position)
|
||||
|
||||
func _on_animation_player_animation_finished(_anim_name: StringName) -> void:
|
||||
queue_free()
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ func _update_settings():
|
|||
volume_slider.value = Settings.master_volume
|
||||
fullscreen_check.button_pressed = Settings.fullscreen
|
||||
vsync_check.button_pressed = Settings.vsync
|
||||
glow_check.button_pressed = Settings.glow
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
_update_settings()
|
||||
|
|
@ -51,4 +52,5 @@ func _on_continue_button_pressed() -> void:
|
|||
|
||||
|
||||
func _on_glow_toggled(enabled: bool) -> void:
|
||||
EventBus.change_glow.emit(enabled)
|
||||
Settings.glow = enabled
|
||||
Settings.apply_glow()
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ extends Node2D
|
|||
|
||||
var debug_enabled = false
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
func _process(_delta: float) -> void:
|
||||
if debug_enabled:
|
||||
var player = get_tree().get_first_node_in_group("player")
|
||||
if player:
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
@warning_ignore_start("unused_signal")
|
||||
extends Node
|
||||
|
||||
signal dialogue_requested(text: String)
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ func _ready():
|
|||
|
||||
rect.mouse_filter = Control.MOUSE_FILTER_IGNORE
|
||||
|
||||
func change_scene(target_path: String, is_error: bool = false):
|
||||
func change_scene(target_path: PackedScene, is_error: bool = false):
|
||||
rect.mouse_filter = Control.MOUSE_FILTER_STOP
|
||||
|
||||
if is_error:
|
||||
|
|
@ -26,9 +26,9 @@ func change_scene(target_path: String, is_error: bool = false):
|
|||
display_log_file(log_file)
|
||||
|
||||
await get_tree().create_timer(0.5).timeout
|
||||
var error = get_tree().change_scene_to_file(target_path)
|
||||
var error = get_tree().change_scene_to_packed(target_path)
|
||||
if error != OK:
|
||||
push_error("Failed to load scene: " + target_path)
|
||||
push_error("Failed to load scene")
|
||||
|
||||
log_display.visible = false
|
||||
log_display.text = ""
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ var master_volume: float = 1.0
|
|||
var fullscreen: bool = false
|
||||
var vsync : bool = true
|
||||
var max_fps: int = 60
|
||||
var glow = false
|
||||
var glow = true
|
||||
|
||||
func apply_volume():
|
||||
var bus_index := AudioServer.get_bus_index("Master")
|
||||
|
|
@ -13,7 +13,7 @@ func apply_volume():
|
|||
linear_to_db(master_volume)
|
||||
)
|
||||
|
||||
func apply_bloom():
|
||||
func apply_glow():
|
||||
EventBus.change_glow.emit(glow)
|
||||
|
||||
func apply_fullscreen():
|
||||
|
|
|
|||
|
|
@ -1,16 +1,13 @@
|
|||
extends Node
|
||||
|
||||
const SFX_DEATH = preload("res://assets/sfx/death.mp3")
|
||||
const SFX_HEART = preload("res://assets/sfx/heart.mp3")
|
||||
const SFX_SWING = preload("res://assets/sfx/swing.mp3")
|
||||
const SFX_CLICK = preload("res://assets/sfx/click.mp3")
|
||||
const SFX_DEATH : Resource = preload("res://assets/sfx/death.mp3")
|
||||
const SFX_HEART : Resource = preload("res://assets/sfx/heart.mp3")
|
||||
const SFX_SWING : Resource = preload("res://assets/sfx/swing.mp3")
|
||||
const SFX_CLICK : Resource = preload("res://assets/sfx/click.mp3")
|
||||
|
||||
const MUSIC_TITLE = preload("res://assets/music/title.wav")
|
||||
const MUSIC_TITLE : Resource = preload("res://assets/music/title.wav")
|
||||
|
||||
# Configuration
|
||||
var pool_size = 10
|
||||
var sfx_dict = {}
|
||||
var music_dict = {}
|
||||
var sfx_pool = []
|
||||
var current_pool_index = 0
|
||||
|
||||
|
|
@ -20,17 +17,6 @@ var current_pool_index = 0
|
|||
func _ready():
|
||||
process_mode = Node.PROCESS_MODE_ALWAYS
|
||||
|
||||
sfx_dict = {
|
||||
"death": SFX_DEATH,
|
||||
"heart": SFX_HEART,
|
||||
"swing": SFX_SWING,
|
||||
"click": SFX_CLICK
|
||||
}
|
||||
|
||||
music_dict = {
|
||||
"title": MUSIC_TITLE
|
||||
}
|
||||
|
||||
for i in range(pool_size):
|
||||
var asp = AudioStreamPlayer.new()
|
||||
asp.bus = "SFX"
|
||||
|
|
@ -43,17 +29,15 @@ func _ready():
|
|||
music_player_2.bus = "Music"
|
||||
|
||||
|
||||
func play_sfx(sound_name: String):
|
||||
if sfx_dict.has(sound_name):
|
||||
var asp : AudioStreamPlayer = sfx_pool[current_pool_index]
|
||||
asp.stream = sfx_dict[sound_name]
|
||||
asp.play()
|
||||
current_pool_index = (current_pool_index + 1) % pool_size
|
||||
|
||||
func play_music(music_name: String, fade_duration: float = 1.0):
|
||||
if not music_dict.has(music_name): return
|
||||
var next_track = music_dict[music_name]
|
||||
func play_sfx(sound_resource: Resource):
|
||||
var asp : AudioStreamPlayer = sfx_pool[current_pool_index]
|
||||
asp.stream = sound_resource
|
||||
asp.pitch_scale = randf() + 0.5
|
||||
asp.play()
|
||||
current_pool_index = (current_pool_index + 1) % pool_size
|
||||
|
||||
func play_music(music_res: Resource, fade_duration: float = 1.0):
|
||||
var next_track = music_res
|
||||
|
||||
var active = music_player_1 if music_player_1.playing else music_player_2
|
||||
var idle = music_player_2 if music_player_1.playing else music_player_1
|
||||
|
|
|
|||
21
scripts/star.gd
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
class_name MaskProjectile extends MaskAbility
|
||||
|
||||
@export var speed := 500.
|
||||
@export var spawn_sfx : AudioStream
|
||||
|
||||
var dir : Vector2 = Vector2.RIGHT
|
||||
var rot_speed = 30
|
||||
|
||||
func mask_ready():
|
||||
super.mask_ready()
|
||||
dir = to_local(target_position).normalized()
|
||||
SoundManager.play_sfx(spawn_sfx)
|
||||
get_tree().create_timer(20).timeout.connect(queue_free)
|
||||
create_tween().tween_property(self, "rot_speed", 3, 0.3)
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
rotation += rot_speed * delta
|
||||
position += dir * speed * delta
|
||||
|
||||
func _on_hitbox_collided() -> void:
|
||||
queue_free()
|
||||
1
scripts/star.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cemrdyqfubw7h
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
extends Enemy
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
super._process(delta)
|
||||
queue_redraw()
|
||||
|
||||
func _draw():
|
||||
18
scripts/stars.gd
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
extends MaskAbility
|
||||
|
||||
@export var star_scene : PackedScene
|
||||
@export var count = 3
|
||||
|
||||
func mask_ready():
|
||||
var children := get_children()
|
||||
for c in children:
|
||||
var star : MaskProjectile = star_scene.instantiate()
|
||||
star.position = c.global_position
|
||||
star.from_player = from_player
|
||||
star.target_position = target_position
|
||||
if not from_player:
|
||||
star.modulate = Color.BLACK
|
||||
get_tree().current_scene.add_child(star)
|
||||
star.mask_ready()
|
||||
await get_tree().create_timer(0.05).timeout
|
||||
get_tree().create_timer(20).timeout.connect(queue_free)
|
||||
1
scripts/stars.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://ct4pupgvmtpgg
|
||||
|
|
@ -4,7 +4,7 @@ extends Node2D
|
|||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
SoundManager.play_music("title")
|
||||
SoundManager.play_music(SoundManager.MUSIC_TITLE)
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
|
|
@ -15,9 +15,9 @@ func _process(delta: float) -> void:
|
|||
func _on_start_button_pressed() -> void:
|
||||
if !WorldState.done_tuto:
|
||||
WorldState.done_tuto = true
|
||||
SceneTransition.change_scene("res://scenes/tutorial.tscn")
|
||||
SceneTransition.change_scene(load("res://scenes/tutorial.tscn"))
|
||||
else:
|
||||
SceneTransition.change_scene("res://scenes/stage1.tscn")
|
||||
SceneTransition.change_scene(load("res://scenes/stage1.tscn"))
|
||||
|
||||
|
||||
func _on_settings_pressed() -> void:
|
||||
|
|
|
|||
20
scripts/trail.gd
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
@tool
|
||||
class_name Trail extends Line2D
|
||||
|
||||
@export var max_points = 10
|
||||
var trail_points : PackedVector2Array = []
|
||||
|
||||
func _ready():
|
||||
points = []
|
||||
|
||||
func _physics_process(_delta):
|
||||
trail_points.append(global_position)
|
||||
|
||||
if trail_points.size() > max_points:
|
||||
trail_points.remove_at(0)
|
||||
|
||||
var local_points : PackedVector2Array = []
|
||||
for p in trail_points:
|
||||
local_points.append(to_local(p))
|
||||
|
||||
points = local_points
|
||||
1
scripts/trail.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bxqbkdomwqbtc
|
||||
|
|
@ -1,12 +1,7 @@
|
|||
extends Node2D
|
||||
|
||||
@onready var player : Player = get_tree().get_first_node_in_group("player")
|
||||
# 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:
|
||||
if player:
|
||||
if player.global_position.distance_to(global_position) > 600:
|
||||
|
|
|
|||
|
|
@ -1,13 +1,28 @@
|
|||
shader_type canvas_item;
|
||||
uniform sampler2D mask; // a texture
|
||||
uniform float progress : hint_range(0.0, 1.0, 0.001);
|
||||
|
||||
|
||||
uniform sampler2D noise_texture : repeat_disable, filter_nearest;
|
||||
|
||||
uniform float progress : hint_range(0.0, 1.0) = 0.0;
|
||||
uniform float edge_softness : hint_range(0.0, 0.5) = 0.0;
|
||||
|
||||
void fragment() {
|
||||
float mask_value = texture(mask, UV).r;
|
||||
vec4 sprite_color = texture(TEXTURE, UV);
|
||||
float noise_val = texture(noise_texture, UV).r;
|
||||
|
||||
// ensure the progress is a bit bigger than the feather
|
||||
float threshold = progress * 1.001;
|
||||
float phase1_progress = clamp(progress * 2.0, 0.0, 1.0);
|
||||
|
||||
// Fade alpha based on mask vs. threshold with a feather
|
||||
COLOR.a *= smoothstep(threshold, threshold * 0.999, mask_value);
|
||||
float phase2_progress = clamp((progress - 0.5) * 2.0, 0.0, 1.0);
|
||||
|
||||
float visibility = smoothstep(noise_val - edge_softness, noise_val + edge_softness, phase1_progress);
|
||||
|
||||
float color_transition = smoothstep(noise_val - edge_softness, noise_val + edge_softness, phase2_progress);
|
||||
|
||||
vec4 white_color = vec4(1.0, 1.0, 1.0, sprite_color.a);
|
||||
|
||||
vec4 final_color = mix(white_color, sprite_color, color_transition);
|
||||
|
||||
final_color.a *= visibility;
|
||||
|
||||
COLOR = final_color;
|
||||
}
|
||||
30
shaders/space.gdshader
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
shader_type canvas_item;
|
||||
|
||||
// The color you want to replace (e.g., your #325512 background)
|
||||
uniform vec4 key_color : source_color = vec4(0.196, 0.333, 0.071, 1.0);
|
||||
// How close the color needs to be to match (0.01 to 0.1 is usually best)
|
||||
uniform float sensitivity : hint_range(0.0, 1.0) = 0.05;
|
||||
// Read the screen behind this shader
|
||||
uniform sampler2D screen_texture : hint_screen_texture, repeat_disable, filter_nearest;
|
||||
|
||||
void fragment() {
|
||||
// 1. Get the original color of the screen at this position
|
||||
vec4 screen_color = texture(screen_texture, SCREEN_UV);
|
||||
|
||||
// 2. Calculate the difference between the screen pixel and our target color
|
||||
// We use the distance formula in 3D space:
|
||||
// d = sqrt((r1-r2)^2 + (g1-g2)^2 + (b1-b2)^2)
|
||||
float diff = distance(screen_color.rgb, key_color.rgb);
|
||||
|
||||
if (diff <= sensitivity) {
|
||||
// --- START YOUR EFFECT HERE ---
|
||||
// Example: Making it pulse red
|
||||
vec3 effect = screen_color.rgb + vec3(sin(TIME) * 0.5, 0.0, 0.0);
|
||||
|
||||
COLOR = vec4(effect, screen_color.a);
|
||||
// --- END YOUR EFFECT HERE ---
|
||||
} else {
|
||||
// If it's NOT the target color, draw the screen exactly as it is
|
||||
COLOR = screen_color;
|
||||
}
|
||||
}
|
||||
1
shaders/space.gdshader.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dmgvx36v2kttq
|
||||
50
shaders/vhs_glitch.gdshader
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
shader_type canvas_item;
|
||||
|
||||
// Your original target color detection
|
||||
uniform vec4 target_color : source_color = vec4(0.0, 0.007, 0.939, 1.0);
|
||||
uniform float color_tolerance : hint_range(0.0, 1.0) = 0.05;
|
||||
|
||||
uniform sampler2D screen_texture : hint_screen_texture, repeat_disable, filter_nearest;
|
||||
|
||||
// New uniforms for the smooth rainbow edge effect
|
||||
uniform float color_shift_intensity : hint_range(0.0, 0.2) = 0.08;
|
||||
uniform float edge_rainbow_spread : hint_range(0.1, 5.0) = 2.0;
|
||||
uniform float shift_speed : hint_range(0.0, 5.0) = 1.0;
|
||||
uniform float scanline_intensity : hint_range(0.0, 1.0) = 0.15;
|
||||
|
||||
void fragment() {
|
||||
vec4 original_screen_color = texture(screen_texture, SCREEN_UV);
|
||||
|
||||
if (distance(original_screen_color.rgb, target_color.rgb) > color_tolerance) {
|
||||
COLOR = original_screen_color;
|
||||
} else {
|
||||
vec2 uv = SCREEN_UV;
|
||||
|
||||
vec2 center_offset = uv - vec2(0.5);
|
||||
float dist_from_center = length(center_offset);
|
||||
|
||||
float edge_factor = pow(dist_from_center, edge_rainbow_spread);
|
||||
|
||||
float time_sin = sin(TIME * shift_speed) - 1.2;
|
||||
float time_cos = cos(TIME * shift_speed * 0.8) - 1.2;
|
||||
//float time_sin = sin(dist_from_center * shift_speed);
|
||||
//float time_cos = cos(dist_from_center * shift_speed * 0.8);
|
||||
//vec2 red_offset = center_offset * color_shift_intensity * edge_factor * time_sin;
|
||||
//vec2 blue_offset = center_offset * color_shift_intensity * edge_factor * -time_cos;
|
||||
//vec2 green_offset = center_offset * color_shift_intensity * edge_factor * (time_sin * 0.5);
|
||||
vec2 red_offset = vec2(0.1, 0.5) * color_shift_intensity * time_sin;
|
||||
vec2 blue_offset = vec2(-0.1, 0.5) * color_shift_intensity * -time_cos;
|
||||
vec2 green_offset = vec2(-0.1, -0.5) * color_shift_intensity * (time_sin);
|
||||
|
||||
float r = texture(screen_texture, uv + red_offset).r;
|
||||
float g = texture(screen_texture, uv + green_offset).g;
|
||||
float b = texture(screen_texture, uv + blue_offset).b;
|
||||
|
||||
vec4 final_color = vec4(r, g, b, 1.0);
|
||||
|
||||
//float scanline = sin(uv.y * 400.0 - TIME * 2.0) * 0.2 + 1.;
|
||||
//final_color.rgb *= scanline * scanline_intensity;
|
||||
|
||||
COLOR = final_color;
|
||||
}
|
||||
}
|
||||
1
shaders/vhs_glitch.gdshader.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bbhp5s27af6xg
|
||||
10
todo.txt
|
|
@ -7,7 +7,15 @@
|
|||
- Player upgrades?
|
||||
- Change dash, blink, attack speed, speed, hp, regen, idk?
|
||||
- Mask upgrades?
|
||||
- Scythe more rotations, bigger size, lower cooldown, on-ht heal,
|
||||
- Scythe more rotations, bigger size, lower cooldown, on-ht heal, chain hit
|
||||
- Invul on hit, shield on hit, soul reaps, better dash, double hit, projectile wave
|
||||
- leave ground chare, mark enemies
|
||||
- stuns
|
||||
- Ranged more speed, more projectiles, on-hit explosion, more damage range,
|
||||
- Settings screenshake
|
||||
- Sfx soon
|
||||
- Player only invul
|
||||
- QOL: modualte only entity spriet on damage, abilites fadeout time
|
||||
- MaskAbility class
|
||||
- BossFight 1:
|
||||
- Melee attacks, tp?, dash, scythe spawning
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_resource type="Theme" load_steps=11 format=3 uid="uid://d3iyu7ukwsn1p"]
|
||||
[gd_resource type="Theme" format=3 uid="uid://d3iyu7ukwsn1p"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://ctv72j20ly3an" path="res://assets/fonts/ByteBounce.ttf" id="1_vos2p"]
|
||||
[ext_resource type="Texture2D" uid="uid://d3hcpifvujin1" path="res://ui/checkbox_tick.png" id="2_0ie0l"]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=15 format=3 uid="uid://bq8ig7s8gxia4"]
|
||||
[gd_scene format=3 uid="uid://bq8ig7s8gxia4"]
|
||||
|
||||
[ext_resource type="Theme" uid="uid://d3iyu7ukwsn1p" path="res://ui/default_theme.tres" id="1_1evs6"]
|
||||
[ext_resource type="PackedScene" uid="uid://bvp37ljy8eaba" path="res://ui/texture_container.tscn" id="3_nsgok"]
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_dhpj7"]
|
||||
atlas = ExtResource("7_np4cb")
|
||||
region = Rect2(0, 32, 0, 32)
|
||||
region = Rect2(0, 96, 0, 32)
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_umou3"]
|
||||
shader = ExtResource("13_1evs6")
|
||||
|
|
@ -23,11 +23,11 @@ shader_parameter/brightness = 0.950000045125
|
|||
shader_parameter/contrast = 1.0
|
||||
shader_parameter/saturation = 2.0
|
||||
|
||||
[node name="UILayer" type="CanvasLayer"]
|
||||
[node name="UILayer" type="CanvasLayer" unique_id=1355059062]
|
||||
scale = Vector2(4, 4)
|
||||
transform = Transform2D(4, 0, 0, 4, 0, 0)
|
||||
|
||||
[node name="UI" type="Control" parent="."]
|
||||
[node name="UI" type="Control" parent="." unique_id=1664369149]
|
||||
process_mode = 3
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
|
|
@ -37,7 +37,8 @@ size_flags_horizontal = 0
|
|||
mouse_filter = 2
|
||||
theme = ExtResource("1_1evs6")
|
||||
|
||||
[node name="Debug" type="Control" parent="UI"]
|
||||
[node name="Debug" type="Control" parent="UI" unique_id=340031739]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchors_preset = 0
|
||||
offset_right = 40.0
|
||||
|
|
@ -45,7 +46,7 @@ offset_bottom = 40.0
|
|||
mouse_filter = 2
|
||||
script = ExtResource("5_h6use")
|
||||
|
||||
[node name="Label" type="Label" parent="UI/Debug"]
|
||||
[node name="Label" type="Label" parent="UI/Debug" unique_id=2053540183]
|
||||
layout_mode = 1
|
||||
offset_right = 28.0
|
||||
offset_bottom = 179.0
|
||||
|
|
@ -63,7 +64,7 @@ g
|
|||
g
|
||||
"
|
||||
|
||||
[node name="PlayerStat" type="HBoxContainer" parent="UI"]
|
||||
[node name="PlayerStat" type="HBoxContainer" parent="UI" unique_id=1196550807]
|
||||
layout_mode = 1
|
||||
anchors_preset = 7
|
||||
anchor_left = 0.5
|
||||
|
|
@ -78,7 +79,7 @@ grow_horizontal = 2
|
|||
grow_vertical = 0
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="TextureProgressBar" type="TextureProgressBar" parent="UI/PlayerStat"]
|
||||
[node name="TextureProgressBar" type="TextureProgressBar" parent="UI/PlayerStat" unique_id=1768656786]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
max_value = 1.0
|
||||
|
|
@ -88,17 +89,16 @@ texture_under = ExtResource("9_fl7ai")
|
|||
texture_progress = ExtResource("10_iwd8l")
|
||||
script = ExtResource("11_01h74")
|
||||
|
||||
[node name="HealthBar" type="TextureRect" parent="UI/PlayerStat"]
|
||||
[node name="HealthBar" type="TextureRect" parent="UI/PlayerStat" unique_id=1431196763]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
texture = SubResource("AtlasTexture_dhpj7")
|
||||
script = ExtResource("8_8fqmc")
|
||||
|
||||
[node name="SettingsMenu" parent="UI" instance=ExtResource("8_14s75")]
|
||||
layout_mode = 0
|
||||
anchors_preset = 0
|
||||
[node name="SettingsMenu" parent="UI" unique_id=478838648 instance=ExtResource("8_14s75")]
|
||||
layout_mode = 1
|
||||
|
||||
[node name="DialogueBox" parent="UI" node_paths=PackedStringArray("dialogue_label") instance=ExtResource("3_nsgok")]
|
||||
[node name="DialogueBox" parent="UI" unique_id=368242412 node_paths=PackedStringArray("dialogue_label") instance=ExtResource("3_nsgok")]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchors_preset = 7
|
||||
|
|
@ -115,7 +115,7 @@ grow_vertical = 0
|
|||
script = ExtResource("6_kes38")
|
||||
dialogue_label = NodePath("MarginContainer/DialogueLabel")
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="UI/DialogueBox"]
|
||||
[node name="MarginContainer" type="MarginContainer" parent="UI/DialogueBox" unique_id=750374639]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
|
|
@ -123,12 +123,12 @@ anchor_bottom = 1.0
|
|||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="DialogueLabel" type="RichTextLabel" parent="UI/DialogueBox/MarginContainer"]
|
||||
[node name="DialogueLabel" type="RichTextLabel" parent="UI/DialogueBox/MarginContainer" unique_id=1246572478]
|
||||
layout_mode = 2
|
||||
theme = ExtResource("1_1evs6")
|
||||
text = "This is example dialogue!!"
|
||||
|
||||
[node name="PostProcessing" type="Control" parent="UI"]
|
||||
[node name="PostProcessing" type="Control" parent="UI" unique_id=935025285]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
|
|
@ -137,7 +137,7 @@ grow_horizontal = 2
|
|||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="DmgFlash" type="ColorRect" parent="UI/PostProcessing"]
|
||||
[node name="DmgFlash" type="ColorRect" parent="UI/PostProcessing" unique_id=1301839736]
|
||||
visible = false
|
||||
z_index = 10
|
||||
layout_mode = 1
|
||||
|
|
@ -150,7 +150,7 @@ mouse_filter = 2
|
|||
color = Color(0.8862745, 0.49019608, 0.47058824, 0)
|
||||
script = ExtResource("12_vi4d2")
|
||||
|
||||
[node name="ColorCorrection" type="ColorRect" parent="UI/PostProcessing"]
|
||||
[node name="ColorCorrection" type="ColorRect" parent="UI/PostProcessing" unique_id=313386066]
|
||||
z_index = 10
|
||||
material = SubResource("ShaderMaterial_umou3")
|
||||
layout_mode = 1
|
||||
|
|
|
|||