Compare commits
No commits in common. "main" and "Grid" have entirely different histories.
|
|
@ -1,36 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="font_data_dynamic"
|
|
||||||
type="FontFile"
|
|
||||||
uid="uid://bi8hie1rxoieb"
|
|
||||||
path="res://.godot/imported/Witchwoode-Regular.ttf-bd7e89948f14c769586bf11e9355d4c0.fontdata"
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://Witchwoode-Regular.ttf"
|
|
||||||
dest_files=["res://.godot/imported/Witchwoode-Regular.ttf-bd7e89948f14c769586bf11e9355d4c0.fontdata"]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
Rendering=null
|
|
||||||
antialiasing=1
|
|
||||||
generate_mipmaps=false
|
|
||||||
disable_embedded_bitmaps=true
|
|
||||||
multichannel_signed_distance_field=false
|
|
||||||
msdf_pixel_range=8
|
|
||||||
msdf_size=48
|
|
||||||
allow_system_fallback=true
|
|
||||||
force_autohinter=false
|
|
||||||
modulate_color_glyphs=false
|
|
||||||
hinting=1
|
|
||||||
subpixel_positioning=4
|
|
||||||
keep_rounding_remainders=true
|
|
||||||
oversampling=0.0
|
|
||||||
Fallbacks=null
|
|
||||||
fallbacks=[]
|
|
||||||
Compress=null
|
|
||||||
compress=true
|
|
||||||
preload=[]
|
|
||||||
language_support={}
|
|
||||||
script_support={}
|
|
||||||
opentype_features={}
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
||||||
[gd_scene load_steps=6 format=3 uid="uid://bcph46qvs6s1"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://c6q1tgl7kag67" path="res://background/background.gd" id="1_gsnt7"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://bk0lxjv2qjxnp" path="res://world/Background Prototype/Background Prototype Layer 1.png" id="1_qjy44"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://b3d276mpm5mqr" path="res://world/Background Prototype/Background Prototype Layer 4.png" id="2_eva80"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://b6fkgig57ki5j" path="res://world/Background Prototype/Background Prototype Layer 2.png" id="2_gsnt7"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://tctuwr3rmof4" path="res://world/Background Prototype/Background Prototype Layer 3.png" id="3_3phoi"]
|
|
||||||
|
|
||||||
[node name="Background" type="Node2D"]
|
|
||||||
script = ExtResource("1_gsnt7")
|
|
||||||
|
|
||||||
[node name="Parallax2D" type="Parallax2D" parent="."]
|
|
||||||
scroll_scale = Vector2(0.1, 0.1)
|
|
||||||
repeat_size = Vector2(1920, 1080)
|
|
||||||
repeat_times = 2
|
|
||||||
|
|
||||||
[node name="Sprite2D" type="Sprite2D" parent="Parallax2D"]
|
|
||||||
position = Vector2(960, 540)
|
|
||||||
scale = Vector2(2, 2)
|
|
||||||
texture = ExtResource("1_qjy44")
|
|
||||||
|
|
||||||
[node name="Parallax2D2" type="Parallax2D" parent="."]
|
|
||||||
scroll_scale = Vector2(0.4, 0.4)
|
|
||||||
repeat_size = Vector2(1920, 1080)
|
|
||||||
repeat_times = 2
|
|
||||||
|
|
||||||
[node name="Sprite2D" type="Sprite2D" parent="Parallax2D2"]
|
|
||||||
position = Vector2(960, 540)
|
|
||||||
scale = Vector2(2, 2)
|
|
||||||
texture = ExtResource("2_gsnt7")
|
|
||||||
|
|
||||||
[node name="Parallax2D3" type="Parallax2D" parent="."]
|
|
||||||
scroll_scale = Vector2(0.7, 0.7)
|
|
||||||
repeat_size = Vector2(1920, 1080)
|
|
||||||
repeat_times = 2
|
|
||||||
|
|
||||||
[node name="Sprite2D" type="Sprite2D" parent="Parallax2D3"]
|
|
||||||
position = Vector2(960, 540)
|
|
||||||
scale = Vector2(2, 2)
|
|
||||||
texture = ExtResource("3_3phoi")
|
|
||||||
|
|
||||||
[node name="Parallax2D4" type="Parallax2D" parent="."]
|
|
||||||
repeat_size = Vector2(1920, 1080)
|
|
||||||
repeat_times = 2
|
|
||||||
|
|
||||||
[node name="Sprite2D" type="Sprite2D" parent="Parallax2D4"]
|
|
||||||
position = Vector2(960, 540)
|
|
||||||
scale = Vector2(2, 2)
|
|
||||||
texture = ExtResource("2_eva80")
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
extends TextureRect
|
|
||||||
|
|
||||||
@export var colors : Array[Color] = [Color(0.3, 1, 1) * 0.7, Color(1, 0.6, 0.6) * 0.7, Color(1, 1, 1) * 0.7]
|
|
||||||
|
|
||||||
# Modulate the background with an interpolation of the colors in the list,
|
|
||||||
# depending on the players position on the earth.
|
|
||||||
func _process(_delta: float) -> void:
|
|
||||||
var index : int = floor((%Player.position.angle() + PI)/ TAU * colors.size())
|
|
||||||
var diff = (%Player.position.angle() + PI)/ TAU * colors.size() - index
|
|
||||||
self.modulate = linear_color_interpolation(colors[index], colors[(index + 1) % colors.size()], diff)
|
|
||||||
|
|
||||||
func linear_color_interpolation(c1 : Color, c2 : Color, t : float):
|
|
||||||
return c1 + (c2 - c1) * t
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
uid://gul4u5tw1vxk
|
|
||||||
27
building.gd
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
class_name Building extends Node2D
|
||||||
|
|
||||||
|
var location : Vector2i # x is the angle, y is the height in the grid
|
||||||
|
var dimension : Vector2i = Vector2.ONE # same as above
|
||||||
|
@onready var grid : Grid = get_parent()
|
||||||
|
|
||||||
|
# make sure location is set before adding a building to the scene tree
|
||||||
|
# also make sure that the buildings are instantiated as children of the grid
|
||||||
|
func _ready() -> void:
|
||||||
|
var angle = location.x * TAU / grid.num_collumns; # currently assumes anchor is bottom left
|
||||||
|
var height = grid.ground_radius + location.y * grid.cell_height;
|
||||||
|
position = height * Vector2.from_angle(angle)
|
||||||
|
print(angle, " ", height, " ", position)
|
||||||
|
|
||||||
|
func overlaps(other : Building):
|
||||||
|
# heights don't overlap
|
||||||
|
if location.y >= other.location.y + other.dimension.y: return false # other is below
|
||||||
|
if location.y + dimension.y <= other.location.y: return false # other is above
|
||||||
|
|
||||||
|
# angles overlap. We can now assume heights overlap
|
||||||
|
var relative_other_loc = (other.location.x - location.x + grid.num_collumns) % grid.num_collumns
|
||||||
|
if dimension.x > relative_other_loc: return true
|
||||||
|
if relative_other_loc + other.dimension > grid.num_collumns: return true
|
||||||
|
|
||||||
|
# If we get here, angles do not overlap
|
||||||
|
return false
|
||||||
|
|
||||||
|
|
@ -11,16 +11,11 @@ varying vec2 world_position;
|
||||||
|
|
||||||
void vertex()
|
void vertex()
|
||||||
{
|
{
|
||||||
location = ivec2(128. * COLOR.xy);
|
|
||||||
dimension = ivec2(128. * COLOR.zw);
|
|
||||||
|
|
||||||
vec2 myloc = vec2(location) + UV * (vec2(dimension) + vec2(0., .5));
|
|
||||||
float angle = float(myloc.x) * TAU / 60.;
|
|
||||||
float height = float(myloc.y) * cell_height + ground_height;
|
|
||||||
VERTEX = vec2(cos(angle), sin(angle)) * height;
|
|
||||||
//VERTEX = myloc;
|
|
||||||
VERTEX = (inverse(MODEL_MATRIX) * vec4(VERTEX, 0, 1)).xy;
|
|
||||||
world_position = (MODEL_MATRIX * vec4(VERTEX, 0.0, 1.0)).xy;
|
world_position = (MODEL_MATRIX * vec4(VERTEX, 0.0, 1.0)).xy;
|
||||||
|
location = ivec2(256. * COLOR.xy);
|
||||||
|
dimension = ivec2(256. * COLOR.zw);
|
||||||
|
//location = ivec2(45, 1);
|
||||||
|
//dimension = ivec2(1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void fragment() {
|
void fragment() {
|
||||||
|
|
@ -28,15 +23,13 @@ void fragment() {
|
||||||
float angle = atan(world_position.y, world_position.x);
|
float angle = atan(world_position.y, world_position.x);
|
||||||
|
|
||||||
float sample_y = 1. - ((radius - ground_height) / cell_height - float( location.y)) / float(dimension.y);
|
float sample_y = 1. - ((radius - ground_height) / cell_height - float( location.y)) / float(dimension.y);
|
||||||
sample_y = 1. - (1. - sample_y) * 0.97;
|
|
||||||
float sample_x = mod(fract(angle / TAU + 1.) * float(num_cells) - float(location.x) + float(num_cells), float(num_cells)) / float(dimension.x);
|
float sample_x = mod(fract(angle / TAU + 1.) * float(num_cells) - float(location.x) + float(num_cells), float(num_cells)) / float(dimension.x);
|
||||||
|
|
||||||
if(sample_y > 1. || sample_y < 0. || sample_x > 1. || sample_x < 0.) {
|
if(sample_y > 1. || sample_y < 0. || sample_x > 1. || sample_x < 0.) {
|
||||||
discard;
|
discard;
|
||||||
}
|
}
|
||||||
COLOR = texture(TEXTURE, vec2(sample_x, sample_y));
|
COLOR = texture(TEXTURE, vec2(sample_x, sample_y));
|
||||||
//COLOR = vec4(ivec4(location, dimension))/16.;
|
//COLOR = vec4(ivec4(location, dimension));
|
||||||
//COLOR = vec4(1., 1., 1., 1.);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
23
building.tscn
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
[gd_scene load_steps=6 format=3 uid="uid://djawvtdwp423v"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://b2ji03ekijjnn" path="res://building.gd" id="1_5j34s"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://cy70quh6k3s1j" path="res://icon.svg" id="2_2yopf"]
|
||||||
|
[ext_resource type="Shader" uid="uid://c7gb1nqwvkr37" path="res://building.gdshader" id="2_f1gjg"]
|
||||||
|
[ext_resource type="Script" uid="uid://dj7d4d2xs3nci" path="res://building_mesh.gd" id="4_qnfc1"]
|
||||||
|
|
||||||
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_qnfc1"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
shader = ExtResource("2_f1gjg")
|
||||||
|
shader_parameter/ground_height = 3000.0
|
||||||
|
shader_parameter/cell_height = 300.0
|
||||||
|
shader_parameter/num_cells = 60
|
||||||
|
|
||||||
|
[node name="Building" type="Node2D"]
|
||||||
|
script = ExtResource("1_5j34s")
|
||||||
|
|
||||||
|
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||||
|
self_modulate = Color(0.1764706, 0, 0.003921569, 0.003921569)
|
||||||
|
material = SubResource("ShaderMaterial_qnfc1")
|
||||||
|
scale = Vector2(7, 7)
|
||||||
|
texture = ExtResource("2_2yopf")
|
||||||
|
script = ExtResource("4_qnfc1")
|
||||||
7
building_mesh.gd
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
extends Sprite2D
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
var location = Vector2i(get_parent().location)
|
||||||
|
var dimension = Vector2i(get_parent().dimension)
|
||||||
|
print(location, dimension)
|
||||||
|
self_modulate = Color8(location.x, location.y, dimension.x, dimension.y)
|
||||||
|
Before Width: | Height: | Size: 6.6 KiB |
|
|
@ -1,40 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://djir4ehm8kif"
|
|
||||||
path="res://.godot/imported/Building 1x2 fixed.png-e90afc0d25a8919ada570064ed667de1.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://buildings/Building 1x2 fixed.png"
|
|
||||||
dest_files=["res://.godot/imported/Building 1x2 fixed.png-e90afc0d25a8919ada570064ed667de1.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
|
|
||||||
|
Before Width: | Height: | Size: 5.1 KiB |
|
|
@ -1,40 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://3weywjfsapax"
|
|
||||||
path="res://.godot/imported/Building 2x1 downside.png-4b432eb4152bab7dd594f2976783dfd3.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://buildings/Building 2x1 downside.png"
|
|
||||||
dest_files=["res://.godot/imported/Building 2x1 downside.png-4b432eb4152bab7dd594f2976783dfd3.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
|
|
||||||
|
Before Width: | Height: | Size: 6.7 KiB |
|
|
@ -1,40 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://dfy0gccqgggp2"
|
|
||||||
path="res://.godot/imported/Building 2x1 fixed.png-b02748fa52aebae62f987c8fd86c364f.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://buildings/Building 2x1 fixed.png"
|
|
||||||
dest_files=["res://.godot/imported/Building 2x1 fixed.png-b02748fa52aebae62f987c8fd86c364f.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
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
class_name Building extends Node2D
|
|
||||||
|
|
||||||
@export var location : Vector2i # x is the angle, y is the height in the grid
|
|
||||||
@export var dimension : Vector2i = Vector2(2, 1) # same as above
|
|
||||||
@export var blocks_area = true
|
|
||||||
|
|
||||||
var objects = []
|
|
||||||
var destroyed = false
|
|
||||||
|
|
||||||
# make sure location is set before adding a building to the scene tree
|
|
||||||
# also make sure that the buildings are instantiated as children of the grid
|
|
||||||
func _ready() -> void:
|
|
||||||
global_position = Grid.get_world_position(location)
|
|
||||||
|
|
||||||
if blocks_area:
|
|
||||||
Grid.buildings.append(self)
|
|
||||||
|
|
||||||
if get_node_or_null("ObjectList") != null:
|
|
||||||
var obj_list = $ObjectList
|
|
||||||
Grid.call_deferred("place_object_list", obj_list, self)
|
|
||||||
|
|
||||||
func overlaps(other : Building):
|
|
||||||
# heights don't overlap
|
|
||||||
if location.y >= other.location.y + other.dimension.y: return false # other is below
|
|
||||||
if location.y + dimension.y <= other.location.y: return false # other is above
|
|
||||||
|
|
||||||
# angles overlap. We can now assume heights overlap
|
|
||||||
var relative_other_loc = (other.location.x - location.x + Grid.num_collumns) % Grid.num_collumns
|
|
||||||
if dimension.x > relative_other_loc: return true
|
|
||||||
if relative_other_loc + other.dimension.x > Grid.num_collumns: return true
|
|
||||||
|
|
||||||
# If we get here, angles do not overlap
|
|
||||||
return false
|
|
||||||
|
|
||||||
func destroy():
|
|
||||||
if not destroyed:
|
|
||||||
# On destruction, the building is removed from the list and destroyed together with all its objects.
|
|
||||||
Grid.buildings.remove_at(Grid.buildings.find(self))
|
|
||||||
for object in objects:
|
|
||||||
if object != null and not ("collected" in object and object.collected):
|
|
||||||
object.queue_free()
|
|
||||||
destroyed = true
|
|
||||||
queue_free()
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
[gd_scene load_steps=2 format=3 uid="uid://ceg7ahpj5x12g"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://colvx6wq0e8n7" path="res://world/building_generator.gd" id="1_cwnke"]
|
|
||||||
|
|
||||||
[node name="Building Generator" type="Node"]
|
|
||||||
script = ExtResource("1_cwnke")
|
|
||||||
initial_buildings = 10
|
|
||||||
|
|
||||||
[node name="Timer" type="Timer" parent="."]
|
|
||||||
wait_time = 2.5
|
|
||||||
autostart = true
|
|
||||||
|
|
||||||
[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"]
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
extends Sprite2D
|
|
||||||
|
|
||||||
@export var grid_offset : Vector2i = Vector2i.ZERO
|
|
||||||
|
|
||||||
func _ready() -> void:
|
|
||||||
var location = Vector2i(get_parent().location) + grid_offset
|
|
||||||
var dimension = Vector2i(get_parent().dimension)
|
|
||||||
self_modulate = 2 * Color8(location.x, location.y, dimension.x, dimension.y)
|
|
||||||
|
|
@ -1,70 +0,0 @@
|
||||||
[gd_scene load_steps=10 format=3 uid="uid://dliwqqmrxldjh"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b2ji03ekijjnn" path="res://buildings/building.gd" id="1_c7qov"]
|
|
||||||
[ext_resource type="Shader" uid="uid://c7gb1nqwvkr37" path="res://buildings/building.gdshader" id="2_6a6ii"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://dfy0gccqgggp2" path="res://buildings/Building 2x1 fixed.png" id="3_ihg0a"]
|
|
||||||
[ext_resource type="Script" uid="uid://dj7d4d2xs3nci" path="res://buildings/building_mesh.gd" id="4_505qw"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://3weywjfsapax" path="res://buildings/Building 2x1 downside.png" id="5_012sa"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://dpv1w56yr1xue" path="res://traps/morning_star.tscn" id="6_qwyfo"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://4l3elvxpghw8" path="res://utils/platform.tscn" id="8_evf2t"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://h3caql0b6vft" path="res://traps/bear_trap.tscn" id="9_c7qov"]
|
|
||||||
|
|
||||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_pfkkr"]
|
|
||||||
shader = ExtResource("2_6a6ii")
|
|
||||||
shader_parameter/ground_height = 3000.0
|
|
||||||
shader_parameter/cell_height = 300.0
|
|
||||||
shader_parameter/num_cells = 60
|
|
||||||
|
|
||||||
[node name="Building2" type="Node2D"]
|
|
||||||
script = ExtResource("1_c7qov")
|
|
||||||
|
|
||||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
|
||||||
material = SubResource("ShaderMaterial_pfkkr")
|
|
||||||
scale = Vector2(25, 25)
|
|
||||||
texture = ExtResource("3_ihg0a")
|
|
||||||
script = ExtResource("4_505qw")
|
|
||||||
|
|
||||||
[node name="Sprite2D2" type="Sprite2D" parent="."]
|
|
||||||
material = SubResource("ShaderMaterial_pfkkr")
|
|
||||||
scale = Vector2(25, 25)
|
|
||||||
texture = ExtResource("5_012sa")
|
|
||||||
script = ExtResource("4_505qw")
|
|
||||||
grid_offset = Vector2i(0, -1)
|
|
||||||
|
|
||||||
[node name="ObjectList" type="Node2D" parent="."]
|
|
||||||
|
|
||||||
[node name="MorningStar" parent="ObjectList" instance=ExtResource("6_qwyfo")]
|
|
||||||
position = Vector2(238, -149)
|
|
||||||
|
|
||||||
[node name="Platform" parent="ObjectList" instance=ExtResource("8_evf2t")]
|
|
||||||
visible = false
|
|
||||||
position = Vector2(75, -295)
|
|
||||||
collision_layer = 41
|
|
||||||
|
|
||||||
[node name="Platform2" parent="ObjectList" instance=ExtResource("8_evf2t")]
|
|
||||||
visible = false
|
|
||||||
position = Vector2(225, -295)
|
|
||||||
collision_layer = 41
|
|
||||||
|
|
||||||
[node name="Platform3" parent="ObjectList" instance=ExtResource("8_evf2t")]
|
|
||||||
visible = false
|
|
||||||
position = Vector2(375, -295)
|
|
||||||
collision_layer = 41
|
|
||||||
|
|
||||||
[node name="Platform4" parent="ObjectList" instance=ExtResource("8_evf2t")]
|
|
||||||
visible = false
|
|
||||||
position = Vector2(525, -295)
|
|
||||||
collision_layer = 41
|
|
||||||
|
|
||||||
[node name="Platform5" parent="ObjectList" instance=ExtResource("8_evf2t")]
|
|
||||||
position = Vector2(431, -150)
|
|
||||||
scale = Vector2(2.688, 3)
|
|
||||||
|
|
||||||
[node name="BearTrap" parent="ObjectList" instance=ExtResource("9_c7qov")]
|
|
||||||
position = Vector2(270, -9)
|
|
||||||
|
|
||||||
[node name="DebugSprite" type="Sprite2D" parent="."]
|
|
||||||
visible = false
|
|
||||||
position = Vector2(300, -150)
|
|
||||||
scale = Vector2(1.172, 1.172)
|
|
||||||
texture = ExtResource("3_ihg0a")
|
|
||||||
|
|
@ -1,70 +0,0 @@
|
||||||
[gd_scene load_steps=10 format=3 uid="uid://oflm2yjjwhf"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b2ji03ekijjnn" path="res://buildings/building.gd" id="1_ivy1q"]
|
|
||||||
[ext_resource type="Shader" uid="uid://c7gb1nqwvkr37" path="res://buildings/building.gdshader" id="2_yuthg"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://dfy0gccqgggp2" path="res://buildings/Building 2x1 fixed.png" id="3_vtou7"]
|
|
||||||
[ext_resource type="Script" uid="uid://dj7d4d2xs3nci" path="res://buildings/building_mesh.gd" id="4_2shqy"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://3weywjfsapax" path="res://buildings/Building 2x1 downside.png" id="5_hu6aj"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://5nb7pf8g1ck" path="res://enemies/leech/giant_leech.tscn" id="8_r3b86"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://4l3elvxpghw8" path="res://utils/platform.tscn" id="8_y6yyb"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://xj0of571aur1" path="res://items/generic/item_spawn.tscn" id="9_jmdjr"]
|
|
||||||
|
|
||||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_pfkkr"]
|
|
||||||
shader = ExtResource("2_yuthg")
|
|
||||||
shader_parameter/ground_height = 3000.0
|
|
||||||
shader_parameter/cell_height = 300.0
|
|
||||||
shader_parameter/num_cells = 60
|
|
||||||
|
|
||||||
[node name="Building2" type="Node2D"]
|
|
||||||
script = ExtResource("1_ivy1q")
|
|
||||||
|
|
||||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
|
||||||
material = SubResource("ShaderMaterial_pfkkr")
|
|
||||||
scale = Vector2(25, 25)
|
|
||||||
texture = ExtResource("3_vtou7")
|
|
||||||
script = ExtResource("4_2shqy")
|
|
||||||
|
|
||||||
[node name="Sprite2D2" type="Sprite2D" parent="."]
|
|
||||||
material = SubResource("ShaderMaterial_pfkkr")
|
|
||||||
scale = Vector2(25, 25)
|
|
||||||
texture = ExtResource("5_hu6aj")
|
|
||||||
script = ExtResource("4_2shqy")
|
|
||||||
grid_offset = Vector2i(0, -1)
|
|
||||||
|
|
||||||
[node name="ObjectList" type="Node2D" parent="."]
|
|
||||||
|
|
||||||
[node name="Platform" parent="ObjectList" instance=ExtResource("8_y6yyb")]
|
|
||||||
visible = false
|
|
||||||
position = Vector2(75, -295)
|
|
||||||
collision_layer = 41
|
|
||||||
|
|
||||||
[node name="Platform2" parent="ObjectList" instance=ExtResource("8_y6yyb")]
|
|
||||||
visible = false
|
|
||||||
position = Vector2(225, -295)
|
|
||||||
collision_layer = 41
|
|
||||||
|
|
||||||
[node name="Platform3" parent="ObjectList" instance=ExtResource("8_y6yyb")]
|
|
||||||
visible = false
|
|
||||||
position = Vector2(375, -295)
|
|
||||||
collision_layer = 41
|
|
||||||
|
|
||||||
[node name="Platform4" parent="ObjectList" instance=ExtResource("8_y6yyb")]
|
|
||||||
visible = false
|
|
||||||
position = Vector2(525, -295)
|
|
||||||
collision_layer = 41
|
|
||||||
|
|
||||||
[node name="Platform5" parent="ObjectList" instance=ExtResource("8_y6yyb")]
|
|
||||||
position = Vector2(300, -150)
|
|
||||||
scale = Vector2(2.688, 3)
|
|
||||||
|
|
||||||
[node name="ItemSpawn" parent="ObjectList" instance=ExtResource("9_jmdjr")]
|
|
||||||
position = Vector2(300, -200)
|
|
||||||
|
|
||||||
[node name="Giant_Leech" parent="ObjectList" instance=ExtResource("8_r3b86")]
|
|
||||||
position = Vector2(400, -340)
|
|
||||||
|
|
||||||
[node name="DebugSprite" type="Sprite2D" parent="."]
|
|
||||||
visible = false
|
|
||||||
position = Vector2(300, -150)
|
|
||||||
scale = Vector2(1.172, 1.172)
|
|
||||||
texture = ExtResource("3_vtou7")
|
|
||||||
|
|
@ -1,53 +0,0 @@
|
||||||
[gd_scene load_steps=8 format=3 uid="uid://cmofmd0vf3hx3"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b2ji03ekijjnn" path="res://buildings/building.gd" id="1_q3nfb"]
|
|
||||||
[ext_resource type="Shader" uid="uid://c7gb1nqwvkr37" path="res://buildings/building.gdshader" id="2_uv7v8"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://djir4ehm8kif" path="res://buildings/Building 1x2 fixed.png" id="3_uv7v8"]
|
|
||||||
[ext_resource type="Script" uid="uid://dj7d4d2xs3nci" path="res://buildings/building_mesh.gd" id="4_bl5jt"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://chu67ci7sl488" path="res://enemies/ghost/ghost.tscn" id="5_23fi7"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://4l3elvxpghw8" path="res://utils/platform.tscn" id="6_e6j05"]
|
|
||||||
|
|
||||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_qnfc1"]
|
|
||||||
resource_local_to_scene = true
|
|
||||||
shader = ExtResource("2_uv7v8")
|
|
||||||
shader_parameter/ground_height = 3000.0
|
|
||||||
shader_parameter/cell_height = 300.0
|
|
||||||
shader_parameter/num_cells = 60
|
|
||||||
|
|
||||||
[node name="Building" type="Node2D"]
|
|
||||||
script = ExtResource("1_q3nfb")
|
|
||||||
dimension = Vector2i(1, 2)
|
|
||||||
|
|
||||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
|
||||||
self_modulate = Color(0.176471, 0, 0.00392157, 0.00392157)
|
|
||||||
material = SubResource("ShaderMaterial_qnfc1")
|
|
||||||
scale = Vector2(25, 25)
|
|
||||||
texture = ExtResource("3_uv7v8")
|
|
||||||
script = ExtResource("4_bl5jt")
|
|
||||||
|
|
||||||
[node name="ObjectList" type="Node2D" parent="."]
|
|
||||||
|
|
||||||
[node name="Ghost" parent="ObjectList" instance=ExtResource("5_23fi7")]
|
|
||||||
position = Vector2(150, -300)
|
|
||||||
|
|
||||||
[node name="Platform" parent="ObjectList" instance=ExtResource("6_e6j05")]
|
|
||||||
visible = false
|
|
||||||
position = Vector2(75, -595)
|
|
||||||
collision_layer = 41
|
|
||||||
|
|
||||||
[node name="Platform2" parent="ObjectList" instance=ExtResource("6_e6j05")]
|
|
||||||
visible = false
|
|
||||||
position = Vector2(225, -595)
|
|
||||||
collision_layer = 41
|
|
||||||
|
|
||||||
[node name="Platform3" parent="ObjectList" instance=ExtResource("6_e6j05")]
|
|
||||||
position = Vector2(290, -431)
|
|
||||||
|
|
||||||
[node name="Platform4" parent="ObjectList" instance=ExtResource("6_e6j05")]
|
|
||||||
position = Vector2(62, -184)
|
|
||||||
|
|
||||||
[node name="DebugSprite" type="Sprite2D" parent="."]
|
|
||||||
visible = false
|
|
||||||
position = Vector2(150, -300)
|
|
||||||
scale = Vector2(1.172, 1.172)
|
|
||||||
texture = ExtResource("3_uv7v8")
|
|
||||||
|
|
@ -1,68 +0,0 @@
|
||||||
[gd_scene load_steps=10 format=3 uid="uid://6y637jp2tbma"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b2ji03ekijjnn" path="res://buildings/building.gd" id="1_w5m4l"]
|
|
||||||
[ext_resource type="Shader" uid="uid://c7gb1nqwvkr37" path="res://buildings/building.gdshader" id="2_wod1l"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://djir4ehm8kif" path="res://buildings/Building 1x2 fixed.png" id="3_elmbw"]
|
|
||||||
[ext_resource type="Script" uid="uid://dj7d4d2xs3nci" path="res://buildings/building_mesh.gd" id="4_1cnhw"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://chu67ci7sl488" path="res://enemies/ghost/ghost.tscn" id="5_rh5oo"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://4l3elvxpghw8" path="res://utils/platform.tscn" id="6_caaff"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://xj0of571aur1" path="res://items/generic/item_spawn.tscn" id="7_elmbw"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://dpv1w56yr1xue" path="res://traps/morning_star.tscn" id="8_1cnhw"]
|
|
||||||
|
|
||||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_qnfc1"]
|
|
||||||
resource_local_to_scene = true
|
|
||||||
shader = ExtResource("2_wod1l")
|
|
||||||
shader_parameter/ground_height = 3000.0
|
|
||||||
shader_parameter/cell_height = 300.0
|
|
||||||
shader_parameter/num_cells = 60
|
|
||||||
|
|
||||||
[node name="Building" type="Node2D"]
|
|
||||||
script = ExtResource("1_w5m4l")
|
|
||||||
dimension = Vector2i(1, 2)
|
|
||||||
|
|
||||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
|
||||||
self_modulate = Color(0.176471, 0, 0.00392157, 0.00392157)
|
|
||||||
material = SubResource("ShaderMaterial_qnfc1")
|
|
||||||
scale = Vector2(25, 25)
|
|
||||||
texture = ExtResource("3_elmbw")
|
|
||||||
script = ExtResource("4_1cnhw")
|
|
||||||
|
|
||||||
[node name="ObjectList" type="Node2D" parent="."]
|
|
||||||
|
|
||||||
[node name="Ghost" parent="ObjectList" instance=ExtResource("5_rh5oo")]
|
|
||||||
position = Vector2(-38, -481)
|
|
||||||
|
|
||||||
[node name="Platform" parent="ObjectList" instance=ExtResource("6_caaff")]
|
|
||||||
visible = false
|
|
||||||
position = Vector2(75, -595)
|
|
||||||
collision_layer = 41
|
|
||||||
|
|
||||||
[node name="Platform2" parent="ObjectList" instance=ExtResource("6_caaff")]
|
|
||||||
visible = false
|
|
||||||
position = Vector2(225, -595)
|
|
||||||
collision_layer = 41
|
|
||||||
|
|
||||||
[node name="Platform3" parent="ObjectList" instance=ExtResource("6_caaff")]
|
|
||||||
position = Vector2(5, -251)
|
|
||||||
|
|
||||||
[node name="Platform4" parent="ObjectList" instance=ExtResource("6_caaff")]
|
|
||||||
position = Vector2(286, -138)
|
|
||||||
|
|
||||||
[node name="Platform5" parent="ObjectList" instance=ExtResource("6_caaff")]
|
|
||||||
position = Vector2(269, -435)
|
|
||||||
scale = Vector2(2.49, 3.1)
|
|
||||||
|
|
||||||
[node name="ItemSpawn" parent="ObjectList" instance=ExtResource("7_elmbw")]
|
|
||||||
position = Vector2(149, -645)
|
|
||||||
|
|
||||||
[node name="MorningStar" parent="ObjectList" instance=ExtResource("8_1cnhw")]
|
|
||||||
position = Vector2(39, -552)
|
|
||||||
|
|
||||||
[node name="Ghost2" parent="ObjectList" instance=ExtResource("5_rh5oo")]
|
|
||||||
position = Vector2(301, -39)
|
|
||||||
|
|
||||||
[node name="DebugSprite" type="Sprite2D" parent="."]
|
|
||||||
visible = false
|
|
||||||
position = Vector2(150, -300)
|
|
||||||
scale = Vector2(1.172, 1.172)
|
|
||||||
texture = ExtResource("3_elmbw")
|
|
||||||
|
|
@ -1,60 +0,0 @@
|
||||||
[gd_scene load_steps=10 format=3 uid="uid://dt827qxyycg8n"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b2ji03ekijjnn" path="res://buildings/building.gd" id="1_pww4b"]
|
|
||||||
[ext_resource type="Shader" uid="uid://c7gb1nqwvkr37" path="res://buildings/building.gdshader" id="2_qsju2"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://djir4ehm8kif" path="res://buildings/Building 1x2 fixed.png" id="3_0yjll"]
|
|
||||||
[ext_resource type="Script" uid="uid://dj7d4d2xs3nci" path="res://buildings/building_mesh.gd" id="4_ri5b7"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://4l3elvxpghw8" path="res://utils/platform.tscn" id="6_kom4b"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://xj0of571aur1" path="res://items/generic/item_spawn.tscn" id="7_sr858"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://h3caql0b6vft" path="res://traps/bear_trap.tscn" id="8_pww4b"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://dpv1w56yr1xue" path="res://traps/morning_star.tscn" id="8_ta0fd"]
|
|
||||||
|
|
||||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_qnfc1"]
|
|
||||||
resource_local_to_scene = true
|
|
||||||
shader = ExtResource("2_qsju2")
|
|
||||||
shader_parameter/ground_height = 3000.0
|
|
||||||
shader_parameter/cell_height = 300.0
|
|
||||||
shader_parameter/num_cells = 60
|
|
||||||
|
|
||||||
[node name="Building" type="Node2D"]
|
|
||||||
script = ExtResource("1_pww4b")
|
|
||||||
dimension = Vector2i(1, 2)
|
|
||||||
|
|
||||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
|
||||||
self_modulate = Color(0.176471, 0, 0.00392157, 0.00392157)
|
|
||||||
material = SubResource("ShaderMaterial_qnfc1")
|
|
||||||
scale = Vector2(25, 25)
|
|
||||||
texture = ExtResource("3_0yjll")
|
|
||||||
script = ExtResource("4_ri5b7")
|
|
||||||
|
|
||||||
[node name="ObjectList" type="Node2D" parent="."]
|
|
||||||
|
|
||||||
[node name="Platform" parent="ObjectList" instance=ExtResource("6_kom4b")]
|
|
||||||
visible = false
|
|
||||||
position = Vector2(75, -595)
|
|
||||||
collision_layer = 41
|
|
||||||
|
|
||||||
[node name="Platform2" parent="ObjectList" instance=ExtResource("6_kom4b")]
|
|
||||||
visible = false
|
|
||||||
position = Vector2(225, -595)
|
|
||||||
collision_layer = 41
|
|
||||||
|
|
||||||
[node name="Platform5" parent="ObjectList" instance=ExtResource("6_kom4b")]
|
|
||||||
position = Vector2(85, -287)
|
|
||||||
scale = Vector2(2.49, 3.1)
|
|
||||||
|
|
||||||
[node name="ItemSpawn" parent="ObjectList" instance=ExtResource("7_sr858")]
|
|
||||||
position = Vector2(149, -645)
|
|
||||||
rarity_bonus = 0.5
|
|
||||||
|
|
||||||
[node name="MorningStar" parent="ObjectList" instance=ExtResource("8_ta0fd")]
|
|
||||||
position = Vector2(39, -552)
|
|
||||||
|
|
||||||
[node name="BearTrap" parent="ObjectList" instance=ExtResource("8_pww4b")]
|
|
||||||
position = Vector2(165, -7)
|
|
||||||
|
|
||||||
[node name="DebugSprite" type="Sprite2D" parent="."]
|
|
||||||
visible = false
|
|
||||||
position = Vector2(150, -300)
|
|
||||||
scale = Vector2(1.172, 1.172)
|
|
||||||
texture = ExtResource("3_0yjll")
|
|
||||||
|
|
@ -1,78 +0,0 @@
|
||||||
[gd_scene load_steps=12 format=3 uid="uid://djawvtdwp423v"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b2ji03ekijjnn" path="res://buildings/building.gd" id="1_5j34s"]
|
|
||||||
[ext_resource type="Shader" uid="uid://c7gb1nqwvkr37" path="res://buildings/building.gdshader" id="2_xx8ra"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://dfy0gccqgggp2" path="res://buildings/Building 2x1 fixed.png" id="3_xr4t5"]
|
|
||||||
[ext_resource type="Script" uid="uid://dj7d4d2xs3nci" path="res://buildings/building_mesh.gd" id="4_xr4t5"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://3weywjfsapax" path="res://buildings/Building 2x1 downside.png" id="5_pfkkr"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://dpv1w56yr1xue" path="res://traps/morning_star.tscn" id="5_xr4t5"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://chu67ci7sl488" path="res://enemies/ghost/ghost.tscn" id="7_35wcg"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://4l3elvxpghw8" path="res://utils/platform.tscn" id="8_sifiv"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://xj0of571aur1" path="res://items/generic/item_spawn.tscn" id="9_i1qmw"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://b62xcg0dd3vct" path="res://enemies/leech/leech.tscn" id="10_ibnxs"]
|
|
||||||
|
|
||||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_pfkkr"]
|
|
||||||
shader = ExtResource("2_xx8ra")
|
|
||||||
shader_parameter/ground_height = 3000.0
|
|
||||||
shader_parameter/cell_height = 300.0
|
|
||||||
shader_parameter/num_cells = 60
|
|
||||||
|
|
||||||
[node name="Building2" type="Node2D"]
|
|
||||||
script = ExtResource("1_5j34s")
|
|
||||||
|
|
||||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
|
||||||
material = SubResource("ShaderMaterial_pfkkr")
|
|
||||||
scale = Vector2(25, 25)
|
|
||||||
texture = ExtResource("3_xr4t5")
|
|
||||||
script = ExtResource("4_xr4t5")
|
|
||||||
|
|
||||||
[node name="Sprite2D2" type="Sprite2D" parent="."]
|
|
||||||
material = SubResource("ShaderMaterial_pfkkr")
|
|
||||||
scale = Vector2(25, 25)
|
|
||||||
texture = ExtResource("5_pfkkr")
|
|
||||||
script = ExtResource("4_xr4t5")
|
|
||||||
grid_offset = Vector2i(0, -1)
|
|
||||||
|
|
||||||
[node name="ObjectList" type="Node2D" parent="."]
|
|
||||||
|
|
||||||
[node name="MorningStar" parent="ObjectList" instance=ExtResource("5_xr4t5")]
|
|
||||||
position = Vector2(397, -3)
|
|
||||||
|
|
||||||
[node name="Ghost" parent="ObjectList" instance=ExtResource("7_35wcg")]
|
|
||||||
position = Vector2(118, -125)
|
|
||||||
|
|
||||||
[node name="Platform" parent="ObjectList" instance=ExtResource("8_sifiv")]
|
|
||||||
visible = false
|
|
||||||
position = Vector2(75, -295)
|
|
||||||
collision_layer = 41
|
|
||||||
|
|
||||||
[node name="Platform2" parent="ObjectList" instance=ExtResource("8_sifiv")]
|
|
||||||
visible = false
|
|
||||||
position = Vector2(225, -295)
|
|
||||||
collision_layer = 41
|
|
||||||
|
|
||||||
[node name="Platform3" parent="ObjectList" instance=ExtResource("8_sifiv")]
|
|
||||||
visible = false
|
|
||||||
position = Vector2(375, -295)
|
|
||||||
collision_layer = 41
|
|
||||||
|
|
||||||
[node name="Platform4" parent="ObjectList" instance=ExtResource("8_sifiv")]
|
|
||||||
visible = false
|
|
||||||
position = Vector2(525, -295)
|
|
||||||
collision_layer = 41
|
|
||||||
|
|
||||||
[node name="Platform5" parent="ObjectList" instance=ExtResource("8_sifiv")]
|
|
||||||
position = Vector2(300, -150)
|
|
||||||
scale = Vector2(2.688, 3)
|
|
||||||
|
|
||||||
[node name="ItemSpawn" parent="ObjectList" instance=ExtResource("9_i1qmw")]
|
|
||||||
position = Vector2(300, -200)
|
|
||||||
|
|
||||||
[node name="Leech" parent="ObjectList" instance=ExtResource("10_ibnxs")]
|
|
||||||
position = Vector2(240, -340)
|
|
||||||
|
|
||||||
[node name="DebugSprite" type="Sprite2D" parent="."]
|
|
||||||
visible = false
|
|
||||||
position = Vector2(300, -150)
|
|
||||||
scale = Vector2(1.172, 1.172)
|
|
||||||
texture = ExtResource("3_xr4t5")
|
|
||||||
|
|
@ -1,75 +0,0 @@
|
||||||
[gd_scene load_steps=12 format=3 uid="uid://c7ddsyd8kcjji"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b2ji03ekijjnn" path="res://buildings/building.gd" id="1_0710n"]
|
|
||||||
[ext_resource type="Shader" uid="uid://c7gb1nqwvkr37" path="res://buildings/building.gdshader" id="2_7e5ul"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://dfy0gccqgggp2" path="res://buildings/Building 2x1 fixed.png" id="3_lxvry"]
|
|
||||||
[ext_resource type="Script" uid="uid://dj7d4d2xs3nci" path="res://buildings/building_mesh.gd" id="4_h84o2"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://3weywjfsapax" path="res://buildings/Building 2x1 downside.png" id="5_v4fh6"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://4l3elvxpghw8" path="res://utils/platform.tscn" id="6_me65q"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://xj0of571aur1" path="res://items/generic/item_spawn.tscn" id="7_crruu"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://h3caql0b6vft" path="res://traps/bear_trap.tscn" id="8_fkxmk"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://chu67ci7sl488" path="res://enemies/ghost/ghost.tscn" id="9_6hrl3"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://b62xcg0dd3vct" path="res://enemies/leech/leech.tscn" id="10_7e5ul"]
|
|
||||||
|
|
||||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_pfkkr"]
|
|
||||||
shader = ExtResource("2_7e5ul")
|
|
||||||
shader_parameter/ground_height = 3000.0
|
|
||||||
shader_parameter/cell_height = 300.0
|
|
||||||
shader_parameter/num_cells = 60
|
|
||||||
|
|
||||||
[node name="Building2" type="Node2D"]
|
|
||||||
script = ExtResource("1_0710n")
|
|
||||||
|
|
||||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
|
||||||
material = SubResource("ShaderMaterial_pfkkr")
|
|
||||||
scale = Vector2(25, 25)
|
|
||||||
texture = ExtResource("3_lxvry")
|
|
||||||
script = ExtResource("4_h84o2")
|
|
||||||
|
|
||||||
[node name="Sprite2D2" type="Sprite2D" parent="."]
|
|
||||||
material = SubResource("ShaderMaterial_pfkkr")
|
|
||||||
scale = Vector2(25, 25)
|
|
||||||
texture = ExtResource("5_v4fh6")
|
|
||||||
script = ExtResource("4_h84o2")
|
|
||||||
grid_offset = Vector2i(0, -1)
|
|
||||||
|
|
||||||
[node name="ObjectList" type="Node2D" parent="."]
|
|
||||||
|
|
||||||
[node name="Platform" parent="ObjectList" instance=ExtResource("6_me65q")]
|
|
||||||
visible = false
|
|
||||||
position = Vector2(75, -295)
|
|
||||||
collision_layer = 41
|
|
||||||
|
|
||||||
[node name="Platform2" parent="ObjectList" instance=ExtResource("6_me65q")]
|
|
||||||
visible = false
|
|
||||||
position = Vector2(225, -295)
|
|
||||||
collision_layer = 41
|
|
||||||
|
|
||||||
[node name="Platform3" parent="ObjectList" instance=ExtResource("6_me65q")]
|
|
||||||
visible = false
|
|
||||||
position = Vector2(375, -295)
|
|
||||||
collision_layer = 41
|
|
||||||
|
|
||||||
[node name="Platform4" parent="ObjectList" instance=ExtResource("6_me65q")]
|
|
||||||
visible = false
|
|
||||||
position = Vector2(525, -295)
|
|
||||||
collision_layer = 41
|
|
||||||
|
|
||||||
[node name="ItemSpawn" parent="ObjectList" instance=ExtResource("7_crruu")]
|
|
||||||
position = Vector2(137, -329)
|
|
||||||
rarity_bonus = 0.25
|
|
||||||
|
|
||||||
[node name="BearTrap" parent="ObjectList" instance=ExtResource("8_fkxmk")]
|
|
||||||
position = Vector2(465, -301)
|
|
||||||
|
|
||||||
[node name="Ghost" parent="ObjectList" instance=ExtResource("9_6hrl3")]
|
|
||||||
position = Vector2(301, -49)
|
|
||||||
|
|
||||||
[node name="Leech" parent="ObjectList" instance=ExtResource("10_7e5ul")]
|
|
||||||
position = Vector2(176, -340)
|
|
||||||
|
|
||||||
[node name="DebugSprite" type="Sprite2D" parent="."]
|
|
||||||
visible = false
|
|
||||||
position = Vector2(300, -150)
|
|
||||||
scale = Vector2(1.172, 1.172)
|
|
||||||
texture = ExtResource("3_lxvry")
|
|
||||||
5
draw_circle.gd
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
extends Node2D
|
||||||
|
@export var radius : float;
|
||||||
|
|
||||||
|
func _draw():
|
||||||
|
draw_circle(Vector2.ZERO, radius, Color.BLACK, true, -1.0, true)
|
||||||
1
draw_circle.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://b5fhsy1xlreco
|
||||||
29
earth.tscn
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
[gd_scene load_steps=4 format=3 uid="uid://33k5v6skcbsm"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://b5fhsy1xlreco" path="res://draw_circle.gd" id="2_2bhor"]
|
||||||
|
[ext_resource type="Script" uid="uid://m3vyyfk8gnma" path="res://grid.gd" id="3_2bhor"]
|
||||||
|
|
||||||
|
[sub_resource type="CircleShape2D" id="CircleShape2D_5i67w"]
|
||||||
|
radius = 3000.0
|
||||||
|
|
||||||
|
[node name="Earth" type="Node2D"]
|
||||||
|
|
||||||
|
[node name="Ground" type="StaticBody2D" parent="."]
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Ground"]
|
||||||
|
shape = SubResource("CircleShape2D_5i67w")
|
||||||
|
|
||||||
|
[node name="GroundVisual" type="Node2D" parent="Ground"]
|
||||||
|
script = ExtResource("2_2bhor")
|
||||||
|
radius = 3000.0
|
||||||
|
|
||||||
|
[node name="Camera2D" type="Camera2D" parent="."]
|
||||||
|
position = Vector2(47, -3283)
|
||||||
|
|
||||||
|
[node name="Grid" type="Node2D" parent="."]
|
||||||
|
script = ExtResource("3_2bhor")
|
||||||
|
ground_radius = 3000.0
|
||||||
|
cell_height = 300.0
|
||||||
|
num_collumns = 60
|
||||||
|
debug = true
|
||||||
|
metadata/_custom_type_script = "uid://m3vyyfk8gnma"
|
||||||
|
Before Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 3 KiB |
|
|
@ -1,40 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://caqimfmdp7jsd"
|
|
||||||
path="res://.godot/imported/Untitled 15.png-9f7aef1d51ca656d39c301d3244f358e.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://enemies/boss/Untitled 15.png"
|
|
||||||
dest_files=["res://.godot/imported/Untitled 15.png-9f7aef1d51ca656d39c301d3244f358e.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
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
extends Node2D
|
|
||||||
|
|
||||||
var moving = false
|
|
||||||
@onready var player = get_tree().get_root().get_node("main/Player")
|
|
||||||
var speed = 500
|
|
||||||
|
|
||||||
# The target is set on initialization and never updated.
|
|
||||||
@onready var target = player.position
|
|
||||||
|
|
||||||
var reached = false
|
|
||||||
signal target_reached
|
|
||||||
|
|
||||||
func _ready() -> void:
|
|
||||||
|
|
||||||
# Wait one second before firing
|
|
||||||
await get_tree().create_timer(1).timeout
|
|
||||||
moving = true
|
|
||||||
|
|
||||||
func _process(delta: float) -> void:
|
|
||||||
|
|
||||||
# Fire towards the center of the cross
|
|
||||||
if moving:
|
|
||||||
position += (target - global_position).normalized().rotated(-get_parent().rotation) * speed * delta
|
|
||||||
|
|
||||||
# When reaching the center, inform parent node
|
|
||||||
if((global_position - target).length() < 40):
|
|
||||||
moving = false
|
|
||||||
if not reached:
|
|
||||||
target_reached.emit()
|
|
||||||
reached = true
|
|
||||||
|
|
||||||
# Damage the player on contact
|
|
||||||
if has_node("Area2D") and $Area2D.overlaps_body(player):
|
|
||||||
player.hurt(1, global_position-player.position)
|
|
||||||
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
uid://d4n32kt7t726k
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
extends Node2D
|
|
||||||
@onready var player = get_tree().get_root().get_node("main/Player")
|
|
||||||
var speed = 200
|
|
||||||
var angular_speed = TAU/8
|
|
||||||
var lifetime = 5
|
|
||||||
|
|
||||||
var ready_blobs = 0
|
|
||||||
|
|
||||||
var num_blobs = 0
|
|
||||||
|
|
||||||
var particles_ended = false
|
|
||||||
|
|
||||||
func _on_target_reached():
|
|
||||||
ready_blobs += 1
|
|
||||||
|
|
||||||
func _ready() -> void:
|
|
||||||
# Count those children that have a "target reached" signal and connect them.
|
|
||||||
for child in get_children():
|
|
||||||
if "target_reached" in child:
|
|
||||||
num_blobs += 1
|
|
||||||
child.connect("target_reached", _on_target_reached)
|
|
||||||
$SplashSound.play()
|
|
||||||
|
|
||||||
func _process(delta: float) -> void:
|
|
||||||
# Once all child blobs have reached their target, start moving as one while slowly rotating.
|
|
||||||
if ready_blobs == num_blobs:
|
|
||||||
position += (player.position - position).normalized() * speed * delta
|
|
||||||
rotate(angular_speed * delta)
|
|
||||||
lifetime -= delta
|
|
||||||
# In the end, clear all child blobs, then the rest.
|
|
||||||
if lifetime < 0 and not particles_ended:
|
|
||||||
particles_ended = true
|
|
||||||
for child in get_children():
|
|
||||||
if "target_reached" in child:
|
|
||||||
child.get_node("GPUParticles2D").emitting = false
|
|
||||||
child.get_node("Area2D").queue_free()
|
|
||||||
if lifetime < -2:
|
|
||||||
queue_free()
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
uid://b22hbgn80m4l0
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
[gd_scene load_steps=4 format=3 uid="uid://bg2hgia0jqnqf"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b22hbgn80m4l0" path="res://enemies/boss/blob_big.gd" id="1_xkk63"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://ck0bj7444wfsl" path="res://enemies/boss/blob_small.tscn" id="2_jl75s"]
|
|
||||||
[ext_resource type="AudioStream" uid="uid://bl05nrrcsjaus" path="res://sounds/slime-splat-4-219250.mp3" id="3_d2us1"]
|
|
||||||
|
|
||||||
[node name="blob_big" type="Node2D"]
|
|
||||||
script = ExtResource("1_xkk63")
|
|
||||||
|
|
||||||
[node name="Blob" parent="." instance=ExtResource("2_jl75s")]
|
|
||||||
position = Vector2(400, 0)
|
|
||||||
|
|
||||||
[node name="Blob2" parent="." instance=ExtResource("2_jl75s")]
|
|
||||||
position = Vector2(-400, 0)
|
|
||||||
|
|
||||||
[node name="Blob3" parent="." instance=ExtResource("2_jl75s")]
|
|
||||||
position = Vector2(0, -400)
|
|
||||||
|
|
||||||
[node name="Blob4" parent="." instance=ExtResource("2_jl75s")]
|
|
||||||
position = Vector2(0, 400)
|
|
||||||
|
|
||||||
[node name="SplashSound" type="AudioStreamPlayer2D" parent="."]
|
|
||||||
stream = ExtResource("3_d2us1")
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
||||||
[gd_scene load_steps=5 format=3 uid="uid://ck0bj7444wfsl"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://d4n32kt7t726k" path="res://enemies/boss/blob.gd" id="1_wigkh"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://dvlvu37up72gt" path="res://enemies/boss/bubble.png" id="2_jle3w"]
|
|
||||||
|
|
||||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_aaw6g"]
|
|
||||||
particle_flag_disable_z = true
|
|
||||||
emission_shape = 1
|
|
||||||
emission_sphere_radius = 53.96
|
|
||||||
angular_velocity_min = -1.60933e-05
|
|
||||||
angular_velocity_max = -1.60933e-05
|
|
||||||
orbit_velocity_min = 0.184
|
|
||||||
orbit_velocity_max = 0.184
|
|
||||||
radial_velocity_min = 91.95
|
|
||||||
radial_velocity_max = 160.92
|
|
||||||
gravity = Vector3(0, 0, 0)
|
|
||||||
|
|
||||||
[sub_resource type="CircleShape2D" id="CircleShape2D_i5m1y"]
|
|
||||||
radius = 45.0
|
|
||||||
|
|
||||||
[node name="Blob" type="Node2D"]
|
|
||||||
script = ExtResource("1_wigkh")
|
|
||||||
|
|
||||||
[node name="GPUParticles2D" type="GPUParticles2D" parent="."]
|
|
||||||
amount = 100
|
|
||||||
texture = ExtResource("2_jle3w")
|
|
||||||
lifetime = 0.1
|
|
||||||
speed_scale = 0.3
|
|
||||||
fixed_fps = 60
|
|
||||||
process_material = SubResource("ParticleProcessMaterial_aaw6g")
|
|
||||||
|
|
||||||
[node name="Area2D" type="Area2D" parent="."]
|
|
||||||
collision_layer = 0
|
|
||||||
collision_mask = 4
|
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
|
|
||||||
shape = SubResource("CircleShape2D_i5m1y")
|
|
||||||
|
|
@ -1,144 +0,0 @@
|
||||||
extends CharacterBody2D
|
|
||||||
@onready var player = get_tree().get_root().get_node("main/Player")
|
|
||||||
var moves = ["slam", "wave", "water_rise", "splash"]
|
|
||||||
@export var big_blob : PackedScene
|
|
||||||
@onready var water : Water = get_tree().get_root().get_node("main/Water")
|
|
||||||
|
|
||||||
# How often water has been risen.
|
|
||||||
var risen = 0
|
|
||||||
|
|
||||||
# Managing idle behavior between attacks.
|
|
||||||
var attack_ready = true
|
|
||||||
var idle_dir : Vector2 = Vector2.ZERO
|
|
||||||
var idle_dir_remaining = 0
|
|
||||||
var idle_move = true
|
|
||||||
var target_pos = Vector2.ZERO
|
|
||||||
|
|
||||||
|
|
||||||
var damage = 1
|
|
||||||
var dead = false
|
|
||||||
signal grounded
|
|
||||||
signal slam_step_finished
|
|
||||||
|
|
||||||
func choose_next_move() -> String:
|
|
||||||
# Water rises at 75% and 50% of remaining HP.
|
|
||||||
if $EnemyHurtbox.hp <= 3 * $EnemyHurtbox.max_hp / 4 and risen == 0:
|
|
||||||
risen += 1
|
|
||||||
return "water_rise"
|
|
||||||
if $EnemyHurtbox.hp <= $EnemyHurtbox.max_hp / 2 and risen == 1:
|
|
||||||
risen += 1
|
|
||||||
return "water_rise"
|
|
||||||
|
|
||||||
var pool = ["splash"]
|
|
||||||
|
|
||||||
# Heavily decrease slam probability if boss height is low.
|
|
||||||
if not (position.length() - water.radius < 450 and randf()<0.75):
|
|
||||||
pool.append("slam")
|
|
||||||
|
|
||||||
# Heavily decrease wave probability if player is very high up.
|
|
||||||
if not (player.position.length() > water.radius + 900 and randf()<0.75):
|
|
||||||
pool.append("wave")
|
|
||||||
|
|
||||||
return ["slam", "wave", "splash"].pick_random()
|
|
||||||
|
|
||||||
func _process(_delta: float) -> void:
|
|
||||||
if dead: return
|
|
||||||
if attack_ready:
|
|
||||||
attack_ready = false
|
|
||||||
call(choose_next_move())
|
|
||||||
|
|
||||||
func _physics_process(delta: float) -> void:
|
|
||||||
if dead: return
|
|
||||||
up_direction = $EarthAligner.up
|
|
||||||
if(is_on_floor()):
|
|
||||||
grounded.emit()
|
|
||||||
if idle_move: move_idle(delta)
|
|
||||||
if($Hitbox.overlaps_body(player)):
|
|
||||||
player.hurt(damage, self.position - player.position)
|
|
||||||
move_and_slide()
|
|
||||||
|
|
||||||
func move_idle(delta : float):
|
|
||||||
# Pick a random target roughly above the player's head every 0.5 seconds.
|
|
||||||
idle_dir_remaining -= delta
|
|
||||||
if(idle_dir_remaining <= 0):
|
|
||||||
target_pos = player.position + player.get_node("EarthAligner").up * 400
|
|
||||||
target_pos += randf_range(0, max(200, (target_pos - global_position).length())*0.25) * Vector2.from_angle(randf_range(0,TAU))
|
|
||||||
idle_dir = (target_pos - global_position).normalized()* max(200, (target_pos - global_position).length()) * 0.4
|
|
||||||
idle_dir_remaining = 0.5
|
|
||||||
velocity = idle_dir
|
|
||||||
|
|
||||||
func slam():
|
|
||||||
# Move up, Slam Down, Repeat. Afterwards, linger for a moment.
|
|
||||||
# The slam destroys buildings.
|
|
||||||
idle_move = false
|
|
||||||
velocity = up_direction * 500
|
|
||||||
await get_tree().create_timer(0.6).timeout
|
|
||||||
await slam_step()
|
|
||||||
damage = 1
|
|
||||||
velocity = up_direction * 500
|
|
||||||
await get_tree().create_timer(0.3).timeout
|
|
||||||
await slam_step()
|
|
||||||
velocity = up_direction * 35
|
|
||||||
await get_tree().create_timer(3).timeout
|
|
||||||
idle_move = true
|
|
||||||
attack_ready = true
|
|
||||||
|
|
||||||
func slam_step():
|
|
||||||
# End a downslam after ground is reached or 1.5 seconds have passed.
|
|
||||||
# Then destroy buildings hit.
|
|
||||||
damage = 2
|
|
||||||
velocity = up_direction * -1500
|
|
||||||
grounded.connect(func(): slam_step_finished.emit())
|
|
||||||
get_tree().create_timer(1.5).timeout.connect(func(): slam_step_finished.emit())
|
|
||||||
await slam_step_finished
|
|
||||||
$SoundSlam.play()
|
|
||||||
destroy_below()
|
|
||||||
damage = 1
|
|
||||||
|
|
||||||
func destroy_below():
|
|
||||||
if dead: return
|
|
||||||
for body in $DestructionChecker.get_overlapping_bodies():
|
|
||||||
if(body.has_method("destroy")): body.destroy()
|
|
||||||
|
|
||||||
func wave():
|
|
||||||
# Raise a wave from the water at the boundary of the screen and move it towards the center.
|
|
||||||
var angle = player.position.angle()
|
|
||||||
var dir = randi_range(0, 1) * 2 - 1
|
|
||||||
var speed = 3000 / water.radius_base
|
|
||||||
water.create_tsunami(angle - speed * dir * TAU/30, dir, speed)
|
|
||||||
await get_tree().create_timer(0.5).timeout
|
|
||||||
$Wave.play()
|
|
||||||
await get_tree().create_timer(3.5).timeout
|
|
||||||
attack_ready = true
|
|
||||||
|
|
||||||
func water_rise():
|
|
||||||
# Increase the water level by 1 room height.
|
|
||||||
water.rise_water()
|
|
||||||
await get_tree().create_timer(5).timeout
|
|
||||||
attack_ready = true
|
|
||||||
|
|
||||||
func splash():
|
|
||||||
# Form four small blobs around the player which merge into one.
|
|
||||||
var blob_instance = big_blob.instantiate()
|
|
||||||
get_tree().get_root().get_node("main").add_child(blob_instance)
|
|
||||||
blob_instance.position = player.position
|
|
||||||
blob_instance.rotation = randf_range(0, TAU)
|
|
||||||
await get_tree().create_timer(5).timeout
|
|
||||||
attack_ready = true
|
|
||||||
|
|
||||||
|
|
||||||
func die():
|
|
||||||
# Clear everything else, then wait for Audio Players to make sure sounds are not cut off.
|
|
||||||
dead = true
|
|
||||||
for child in get_children():
|
|
||||||
if not child is AudioStreamPlayer2D:
|
|
||||||
child.queue_free()
|
|
||||||
$DeathSound.play()
|
|
||||||
await $DeathSound.finished
|
|
||||||
await get_tree().create_timer(1).timeout
|
|
||||||
get_tree().change_scene_to_file("res://ui/victory_screen/victory_screen.tscn")
|
|
||||||
queue_free()
|
|
||||||
|
|
||||||
func _on_enemy_hurtbox_damage_taken(_damage, _dir, _id) -> void:
|
|
||||||
if dead: return
|
|
||||||
$AudioStreamPlayer2D.play()
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
uid://uv672p8f4n6k
|
|
||||||
|
|
@ -1,77 +0,0 @@
|
||||||
[gd_scene load_steps=11 format=3 uid="uid://cpe4s6vsn0ujd"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://uv672p8f4n6k" path="res://enemies/boss/boss.gd" id="1_skx2t"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://bg2hgia0jqnqf" path="res://enemies/boss/blob_big.tscn" id="2_o1i15"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://mtfsdd4cdf3a" path="res://utils/enemy_hurtbox.tscn" id="2_skx2t"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://q5mu3lxlsd6f" path="res://enemies/boss/boss2.png" id="3_opohk"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="4_lnbgr"]
|
|
||||||
[ext_resource type="AudioStream" uid="uid://co07360hqn6fk" path="res://sounds/686321__cjspellsfish__punch-land-soft.wav" id="6_opohk"]
|
|
||||||
[ext_resource type="AudioStream" uid="uid://ngkksuy3438s" path="res://sounds/slime-impact-352473.mp3" id="7_auiwu"]
|
|
||||||
[ext_resource type="AudioStream" uid="uid://cd03po7vk17rt" path="res://sounds/sea-wave-34088.mp3" id="8_h4k8w"]
|
|
||||||
|
|
||||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_lnbgr"]
|
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_lnbgr"]
|
|
||||||
size = Vector2(300, 250)
|
|
||||||
|
|
||||||
[node name="Boss" type="CharacterBody2D"]
|
|
||||||
scale = Vector2(1.8, 1.8)
|
|
||||||
collision_mask = 32
|
|
||||||
script = ExtResource("1_skx2t")
|
|
||||||
big_blob = ExtResource("2_o1i15")
|
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
|
||||||
rotation = 1.5708
|
|
||||||
scale = Vector2(10, 10)
|
|
||||||
shape = SubResource("CapsuleShape2D_lnbgr")
|
|
||||||
|
|
||||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
|
||||||
scale = Vector2(1.5, 1.5)
|
|
||||||
texture = ExtResource("3_opohk")
|
|
||||||
|
|
||||||
[node name="EnemyHurtbox" parent="." node_paths=PackedStringArray("canvasItem") instance=ExtResource("2_skx2t")]
|
|
||||||
collision_layer = 16
|
|
||||||
collision_mask = 32
|
|
||||||
max_hp = 800
|
|
||||||
canvasItem = NodePath("..")
|
|
||||||
id_block_time = 5.0
|
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="EnemyHurtbox"]
|
|
||||||
rotation = 1.5708
|
|
||||||
scale = Vector2(11, 11)
|
|
||||||
shape = SubResource("CapsuleShape2D_lnbgr")
|
|
||||||
|
|
||||||
[node name="EarthAligner" parent="." instance=ExtResource("4_lnbgr")]
|
|
||||||
|
|
||||||
[node name="Hitbox" type="Area2D" parent="."]
|
|
||||||
scale = Vector2(1.05, 1.05)
|
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
|
|
||||||
rotation = 1.5708
|
|
||||||
scale = Vector2(10, 10)
|
|
||||||
shape = SubResource("CapsuleShape2D_lnbgr")
|
|
||||||
|
|
||||||
[node name="DestructionChecker" type="Area2D" parent="."]
|
|
||||||
collision_mask = 10
|
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="DestructionChecker"]
|
|
||||||
position = Vector2(0, 200)
|
|
||||||
shape = SubResource("RectangleShape2D_lnbgr")
|
|
||||||
|
|
||||||
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
|
|
||||||
stream = ExtResource("6_opohk")
|
|
||||||
volume_db = 15.0
|
|
||||||
|
|
||||||
[node name="SoundSlam" type="AudioStreamPlayer2D" parent="."]
|
|
||||||
stream = ExtResource("7_auiwu")
|
|
||||||
volume_db = 12.0
|
|
||||||
|
|
||||||
[node name="DeathSound" type="AudioStreamPlayer2D" parent="."]
|
|
||||||
stream = ExtResource("7_auiwu")
|
|
||||||
volume_db = 10.0
|
|
||||||
|
|
||||||
[node name="Wave" type="AudioStreamPlayer2D" parent="."]
|
|
||||||
stream = ExtResource("8_h4k8w")
|
|
||||||
|
|
||||||
[connection signal="damage_taken" from="EnemyHurtbox" to="." method="_on_enemy_hurtbox_damage_taken"]
|
|
||||||
[connection signal="died" from="EnemyHurtbox" to="." method="die"]
|
|
||||||
|
Before Width: | Height: | Size: 30 KiB |
|
|
@ -1,40 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://q5mu3lxlsd6f"
|
|
||||||
path="res://.godot/imported/boss2.png-35ba66553dce9db015aee038fd8ec691.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://enemies/boss/boss2.png"
|
|
||||||
dest_files=["res://.godot/imported/boss2.png-35ba66553dce9db015aee038fd8ec691.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
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
extends Node
|
|
||||||
|
|
||||||
@export var boss : PackedScene
|
|
||||||
|
|
||||||
func _ready() -> void:
|
|
||||||
pass
|
|
||||||
|
|
||||||
func _on_water_water_reached_max_height() -> void:
|
|
||||||
# The boss spawns once the water has risen to its maximum height.
|
|
||||||
var node = boss.instantiate()
|
|
||||||
add_sibling(node)
|
|
||||||
node.position = %Player.position + %Player.get_node("EarthAligner").up * 1000;
|
|
||||||
queue_free()
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
uid://cpaskpj67pnaj
|
|
||||||
|
Before Width: | Height: | Size: 1.8 KiB |
|
|
@ -1,40 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://dvlvu37up72gt"
|
|
||||||
path="res://.godot/imported/bubble.png-0c7e5ecd706b98b1fc89ca0c332b8765.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://enemies/boss/bubble.png"
|
|
||||||
dest_files=["res://.godot/imported/bubble.png-0c7e5ecd706b98b1fc89ca0c332b8765.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
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
extends Area2D
|
|
||||||
|
|
||||||
# Attach this to an object to make it destructible
|
|
||||||
func destroy():
|
|
||||||
get_parent().queue_free()
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
uid://dwvb52u1hnx5m
|
|
||||||
|
Before Width: | Height: | Size: 1.8 KiB |
|
|
@ -1,40 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://b8732t0313bqs"
|
|
||||||
path="res://.godot/imported/Ghost 0.png-8d937675f5ab76800df31b7061627c3a.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://enemies/ghost/ghost animation/Ghost 0.png"
|
|
||||||
dest_files=["res://.godot/imported/Ghost 0.png-8d937675f5ab76800df31b7061627c3a.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
|
|
||||||
|
Before Width: | Height: | Size: 1.9 KiB |
|
|
@ -1,40 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://d3b5hmhjw2jyc"
|
|
||||||
path="res://.godot/imported/Ghost 1.png-995481976799d0dbea8151c0e6c4911f.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://enemies/ghost/ghost animation/Ghost 1.png"
|
|
||||||
dest_files=["res://.godot/imported/Ghost 1.png-995481976799d0dbea8151c0e6c4911f.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
|
|
||||||
|
Before Width: | Height: | Size: 1.9 KiB |
|
|
@ -1,40 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://dfhxhum8lek56"
|
|
||||||
path="res://.godot/imported/Ghost 2.png-e2649e9d2a684ce9a917daf95b933483.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://enemies/ghost/ghost animation/Ghost 2.png"
|
|
||||||
dest_files=["res://.godot/imported/Ghost 2.png-e2649e9d2a684ce9a917daf95b933483.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
|
|
||||||
|
Before Width: | Height: | Size: 1.7 KiB |
|
|
@ -1,40 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://ve5px6ib45g"
|
|
||||||
path="res://.godot/imported/Ghost 3.png-06caad1192823e1dd881b7bd273e8aff.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://enemies/ghost/ghost animation/Ghost 3.png"
|
|
||||||
dest_files=["res://.godot/imported/Ghost 3.png-06caad1192823e1dd881b7bd273e8aff.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
|
|
||||||
|
Before Width: | Height: | Size: 1.8 KiB |
|
|
@ -1,40 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://cmg8yws3gwx6u"
|
|
||||||
path="res://.godot/imported/Ghost 4.png-5beda85c6f5331ee251ae12d3489921c.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://enemies/ghost/ghost animation/Ghost 4.png"
|
|
||||||
dest_files=["res://.godot/imported/Ghost 4.png-5beda85c6f5331ee251ae12d3489921c.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
|
|
||||||
|
Before Width: | Height: | Size: 1.7 KiB |
|
|
@ -1,40 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://bs3lt13umfxu8"
|
|
||||||
path="res://.godot/imported/Ghost 5.png-0726806101c6863f92a162d2ee5e7de2.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://enemies/ghost/ghost animation/Ghost 5.png"
|
|
||||||
dest_files=["res://.godot/imported/Ghost 5.png-0726806101c6863f92a162d2ee5e7de2.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
|
|
||||||
|
|
@ -1,53 +0,0 @@
|
||||||
extends Area2D
|
|
||||||
@onready var player : CharacterBody2D = get_tree().get_root().get_node_or_null("main/Player")
|
|
||||||
var target : CharacterBody2D
|
|
||||||
|
|
||||||
# Base stats
|
|
||||||
var speed = 100
|
|
||||||
var damage = 1
|
|
||||||
|
|
||||||
# Aggro range determines at which distance the ghost targets the player,
|
|
||||||
# Chase range determines at which distance the ghost stops pursuing the player.
|
|
||||||
var aggro_range = 900
|
|
||||||
var chase_range = 1400
|
|
||||||
|
|
||||||
var current_knockback = Vector2.ZERO
|
|
||||||
var knockback_weight = 800
|
|
||||||
|
|
||||||
func _ready() -> void:
|
|
||||||
$AnimatedSprite2D.play("default")
|
|
||||||
|
|
||||||
func _process(delta: float) -> void:
|
|
||||||
if !is_instance_valid(player):
|
|
||||||
return
|
|
||||||
|
|
||||||
var dist = (position - player.position).length()
|
|
||||||
# Set target based on aggression range and whether target is already set
|
|
||||||
if(dist > chase_range):
|
|
||||||
target = null
|
|
||||||
elif(target == null and dist <= aggro_range):
|
|
||||||
target = player
|
|
||||||
|
|
||||||
# Move towards the target at constant speed
|
|
||||||
if(target!=null):
|
|
||||||
var motion = -(position - target.position).normalized() * speed
|
|
||||||
self.position += motion * delta * min(1, dist/(motion.length()*delta))
|
|
||||||
|
|
||||||
# Process knockback
|
|
||||||
self.position += current_knockback * delta
|
|
||||||
current_knockback = current_knockback/pow(1.3, 60*delta)
|
|
||||||
|
|
||||||
if(self.overlaps_body(player)):
|
|
||||||
player.hurt(damage, self.global_position-player.global_position)
|
|
||||||
|
|
||||||
func _on_death():
|
|
||||||
# First free all other children, then wait for Death Sound to finish
|
|
||||||
for child in get_children():
|
|
||||||
if not child is AudioStreamPlayer2D:
|
|
||||||
child.queue_free()
|
|
||||||
await $HurtSound.finished
|
|
||||||
self.queue_free()
|
|
||||||
|
|
||||||
func _on_damage_taken(_damage : int, dir: Vector2, _id):
|
|
||||||
current_knockback = - dir * knockback_weight
|
|
||||||
$HurtSound.play()
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
uid://12jns4dppxxj
|
|
||||||
|
|
@ -1,61 +0,0 @@
|
||||||
[gd_scene load_steps=10 format=3 uid="uid://chu67ci7sl488"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://12jns4dppxxj" path="res://enemies/ghost/ghost.gd" id="1_6attn"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://mtfsdd4cdf3a" path="res://utils/enemy_hurtbox.tscn" id="2_34o1m"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://d3b5hmhjw2jyc" path="res://enemies/ghost/ghost animation/Ghost 1.png" id="3_34o1m"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="3_obmiq"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://b8732t0313bqs" path="res://enemies/ghost/ghost animation/Ghost 0.png" id="3_rbwoc"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://dfhxhum8lek56" path="res://enemies/ghost/ghost animation/Ghost 2.png" id="4_4awot"]
|
|
||||||
[ext_resource type="AudioStream" uid="uid://co07360hqn6fk" path="res://sounds/686321__cjspellsfish__punch-land-soft.wav" id="7_eqcb8"]
|
|
||||||
|
|
||||||
[sub_resource type="CircleShape2D" id="CircleShape2D_6attn"]
|
|
||||||
|
|
||||||
[sub_resource type="SpriteFrames" id="SpriteFrames_je28r"]
|
|
||||||
animations = [{
|
|
||||||
"frames": [{
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": ExtResource("3_rbwoc")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": ExtResource("3_34o1m")
|
|
||||||
}, {
|
|
||||||
"duration": 1.0,
|
|
||||||
"texture": ExtResource("4_4awot")
|
|
||||||
}],
|
|
||||||
"loop": true,
|
|
||||||
"name": &"default",
|
|
||||||
"speed": 5.0
|
|
||||||
}]
|
|
||||||
|
|
||||||
[node name="Ghost" type="Area2D"]
|
|
||||||
z_index = 5
|
|
||||||
scale = Vector2(0.8, 0.8)
|
|
||||||
collision_layer = 0
|
|
||||||
collision_mask = 4
|
|
||||||
script = ExtResource("1_6attn")
|
|
||||||
|
|
||||||
[node name="EnemyHurtbox" parent="." node_paths=PackedStringArray("canvasItem") instance=ExtResource("2_34o1m")]
|
|
||||||
max_hp = 50
|
|
||||||
canvasItem = NodePath("..")
|
|
||||||
id_block_time = 0.2
|
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="EnemyHurtbox"]
|
|
||||||
scale = Vector2(6, 6)
|
|
||||||
shape = SubResource("CircleShape2D_6attn")
|
|
||||||
|
|
||||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
|
||||||
sprite_frames = SubResource("SpriteFrames_je28r")
|
|
||||||
frame_progress = 0.235914
|
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
|
||||||
scale = Vector2(5, 5)
|
|
||||||
shape = SubResource("CircleShape2D_6attn")
|
|
||||||
|
|
||||||
[node name="EarthAligner" parent="." instance=ExtResource("3_obmiq")]
|
|
||||||
|
|
||||||
[node name="HurtSound" type="AudioStreamPlayer2D" parent="."]
|
|
||||||
stream = ExtResource("7_eqcb8")
|
|
||||||
volume_db = 15.0
|
|
||||||
|
|
||||||
[connection signal="damage_taken" from="EnemyHurtbox" to="." method="_on_damage_taken"]
|
|
||||||
[connection signal="died" from="EnemyHurtbox" to="." method="_on_death"]
|
|
||||||
|
|
@ -1,73 +0,0 @@
|
||||||
[gd_scene load_steps=7 format=3 uid="uid://5nb7pf8g1ck"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b70f2ylbb3btt" path="res://enemies/leech/leech.gd" id="1_wfsrb"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://cvoicwo2xnf7e" path="res://enemies/leech/segment.tscn" id="2_7ngsb"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://dn8qucrpq6k72" path="res://enemies/leech/segment_end.tscn" id="2_poqop"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="3_vk62e"]
|
|
||||||
[ext_resource type="AudioStream" uid="uid://co07360hqn6fk" path="res://sounds/686321__cjspellsfish__punch-land-soft.wav" id="4_ps8gx"]
|
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_cq6dk"]
|
|
||||||
size = Vector2(2, 15)
|
|
||||||
|
|
||||||
[node name="Giant_Leech" type="Area2D"]
|
|
||||||
scale = Vector2(1, 1.2)
|
|
||||||
script = ExtResource("1_wfsrb")
|
|
||||||
broadth = 400
|
|
||||||
max_hp = 180
|
|
||||||
|
|
||||||
[node name="Segments" type="Node2D" parent="."]
|
|
||||||
|
|
||||||
[node name="SegmentEnd1" parent="Segments" instance=ExtResource("2_poqop")]
|
|
||||||
scale = Vector2(-2, -2)
|
|
||||||
|
|
||||||
[node name="Segment2" parent="Segments" instance=ExtResource("2_7ngsb")]
|
|
||||||
scale = Vector2(2, 2)
|
|
||||||
|
|
||||||
[node name="Segment3" parent="Segments" instance=ExtResource("2_7ngsb")]
|
|
||||||
scale = Vector2(2, 2)
|
|
||||||
|
|
||||||
[node name="Segment4" parent="Segments" instance=ExtResource("2_7ngsb")]
|
|
||||||
scale = Vector2(2, 2)
|
|
||||||
|
|
||||||
[node name="Segment5" parent="Segments" instance=ExtResource("2_7ngsb")]
|
|
||||||
scale = Vector2(2, 2)
|
|
||||||
|
|
||||||
[node name="Segment6" parent="Segments" instance=ExtResource("2_7ngsb")]
|
|
||||||
scale = Vector2(2, 2)
|
|
||||||
|
|
||||||
[node name="Segment7" parent="Segments" instance=ExtResource("2_7ngsb")]
|
|
||||||
scale = Vector2(2, 2)
|
|
||||||
|
|
||||||
[node name="Segment8" parent="Segments" instance=ExtResource("2_7ngsb")]
|
|
||||||
scale = Vector2(2, 2)
|
|
||||||
|
|
||||||
[node name="Segment9" parent="Segments" instance=ExtResource("2_7ngsb")]
|
|
||||||
scale = Vector2(2, 2)
|
|
||||||
|
|
||||||
[node name="SegmentEnd2" parent="Segments" instance=ExtResource("2_poqop")]
|
|
||||||
scale = Vector2(2, 2)
|
|
||||||
|
|
||||||
[node name="EarthAligner" parent="." instance=ExtResource("3_vk62e")]
|
|
||||||
|
|
||||||
[node name="StepChecker" type="Area2D" parent="."]
|
|
||||||
position = Vector2(248, 31.2)
|
|
||||||
collision_layer = 0
|
|
||||||
collision_mask = 8
|
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="StepChecker"]
|
|
||||||
position = Vector2(0, 25)
|
|
||||||
shape = SubResource("RectangleShape2D_cq6dk")
|
|
||||||
|
|
||||||
[node name="GroundSensor" type="Area2D" parent="."]
|
|
||||||
collision_layer = 0
|
|
||||||
collision_mask = 8
|
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="GroundSensor"]
|
|
||||||
position = Vector2(0, 25)
|
|
||||||
shape = SubResource("RectangleShape2D_cq6dk")
|
|
||||||
|
|
||||||
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
|
|
||||||
stream = ExtResource("4_ps8gx")
|
|
||||||
|
|
||||||
[connection signal="damage_taken" from="." to="." method="_on_damage_taken"]
|
|
||||||
[connection signal="died" from="." to="." method="_on_death"]
|
|
||||||
|
|
@ -1,116 +0,0 @@
|
||||||
extends EnemyHurtbox
|
|
||||||
# The distance from one end to the other while standing
|
|
||||||
@export var broadth = 250
|
|
||||||
var move_dir = [-1, 1].pick_random()
|
|
||||||
const angular_speed = 0.25
|
|
||||||
|
|
||||||
# The angle from the base to the moving end
|
|
||||||
var angle = 0.0 if move_dir == 1 else PI
|
|
||||||
|
|
||||||
@onready var segments : Array[Node] = $Segments.get_children()
|
|
||||||
@onready var segment_count = segments.size()
|
|
||||||
var dead = false
|
|
||||||
|
|
||||||
func _process(delta: float) -> void:
|
|
||||||
if dead: return
|
|
||||||
# Fall slowly while not grounded
|
|
||||||
if not $GroundSensor.has_overlapping_bodies():
|
|
||||||
position += 200 * delta * $EarthAligner.down
|
|
||||||
|
|
||||||
var y = position.length()
|
|
||||||
var ratio = - move_dir * broadth / (2 * y)
|
|
||||||
|
|
||||||
# Due to the curvature of the ground, the leech can not just prescribe a semicircle.
|
|
||||||
# 2 * rot_angle determines how much further than 180° the moving leg has to move.
|
|
||||||
# This agrees with the angle of the arc spanned by the leeches standing ends.
|
|
||||||
var rot_angle = - 2 * asin(ratio)
|
|
||||||
angle -= TAU * delta * angular_speed * move_dir
|
|
||||||
|
|
||||||
# Once the rotation has finished, the other leg is used as the leeches center.
|
|
||||||
# The leeches position has to be updated accordingly.
|
|
||||||
if(angle > PI + abs(rot_angle) / 2 or angle < - abs(rot_angle) / 2):
|
|
||||||
angle = fmod(angle + PI, PI)
|
|
||||||
position = position.rotated(rot_angle)
|
|
||||||
|
|
||||||
# StepChecker determines whether there is ground for the next step.
|
|
||||||
# Place the StepChecker on the side of the next step to be made.
|
|
||||||
if(move_dir == 1 and angle < 1 or move_dir == -1 and angle > PI - 1):
|
|
||||||
$StepChecker.global_position = position.rotated(rot_angle)
|
|
||||||
$StepChecker.rotation = rot_angle
|
|
||||||
|
|
||||||
# At some point of the movement, check whether there is ground to step on, turn around otherwise.
|
|
||||||
if(move_dir == 1 and angle < 0.5 or move_dir == -1 and angle > PI - 0.5):
|
|
||||||
if(not $StepChecker.has_overlapping_bodies()):
|
|
||||||
move_dir *= -1
|
|
||||||
|
|
||||||
# Update the position and rotation according to the end's position
|
|
||||||
for i in range(segment_count):
|
|
||||||
var segment_pos_data = calculate_segment_location_and_rotation(i)
|
|
||||||
if not is_instance_valid(segments[i]):
|
|
||||||
get_tree().get_root().print_tree_pretty()
|
|
||||||
segments[i].position = segment_pos_data.position
|
|
||||||
segments[i].rotation = segment_pos_data.rotation
|
|
||||||
|
|
||||||
func calculate_segment_location_and_rotation (i) -> Dictionary:
|
|
||||||
var aerial_end_location = Vector2.from_angle(-angle) * broadth
|
|
||||||
|
|
||||||
# Compute the gravicenter of the standing end, the moving end and the apex of the movement.
|
|
||||||
var gravicenter = (aerial_end_location + Vector2(0, -broadth) + Vector2.ZERO) / 3
|
|
||||||
|
|
||||||
# Compute the circle through the above gravicenter, the standing end and the moving end.
|
|
||||||
var ax = gravicenter.x
|
|
||||||
var ay = gravicenter.y
|
|
||||||
var bx = aerial_end_location.x
|
|
||||||
var by = aerial_end_location.y
|
|
||||||
var cx = 0
|
|
||||||
var cy = 0
|
|
||||||
var d = 2 * (ax * (by - cy) + bx * (cy - ay) + cx * (ay - by))
|
|
||||||
var ux = ((ax * ax + ay * ay) * (by - cy) + (bx * bx + by * by) * (cy - ay) + (cx * cx + cy * cy) * (ay - by)) / d
|
|
||||||
var uy = ((ax * ax + ay * ay) * (cx - bx) + (bx * bx + by * by) * (ax - cx) + (cx * cx + cy * cy) * (bx - ax)) / d
|
|
||||||
var circum_center = Vector2(ux, uy)
|
|
||||||
var radius = circum_center.length()
|
|
||||||
|
|
||||||
# Determine the direction of the correct arc between the standing and the moving end
|
|
||||||
var switch_arc_dir = false
|
|
||||||
# When the moving end crosses above the standing end, the circumcenter jumps
|
|
||||||
# from one side of the leech to the other, reverting the direction of the arc
|
|
||||||
if ux < 0:
|
|
||||||
switch_arc_dir = !switch_arc_dir
|
|
||||||
|
|
||||||
# For sufficiently large size of circum_center.angle() it can happen that
|
|
||||||
# the sign of the (circum_center - aerial_end_location).angle() flips while
|
|
||||||
# that of circum_center.angle() doesn't, which has to be counteracted.
|
|
||||||
if circum_center.angle() > 1:
|
|
||||||
switch_arc_dir = !switch_arc_dir
|
|
||||||
|
|
||||||
var angle1 = - PI + circum_center.angle()
|
|
||||||
var angle2 = - PI + (circum_center - aerial_end_location).angle()
|
|
||||||
if(switch_arc_dir):
|
|
||||||
angle1 += TAU
|
|
||||||
|
|
||||||
# In the edge case where the leech is almost a straight line, the circum_center
|
|
||||||
# and radius approach infty, leading to numerical errors producing flickering.
|
|
||||||
# This is ruled out by treating these cases as actual straight lines.
|
|
||||||
if radius > 1000000:
|
|
||||||
return {"position" : Vector2.UP * broadth * i / (segment_count - 1),
|
|
||||||
"rotation" : 3 * PI / 2}
|
|
||||||
|
|
||||||
# Otherwise, the segments are distributed regularly along the arc.
|
|
||||||
else:
|
|
||||||
var arc_angle = (i * angle1 + (segment_count - 1 - i) * angle2)/(segment_count - 1)
|
|
||||||
return {"position": circum_center + radius * Vector2.from_angle(arc_angle),
|
|
||||||
"rotation": arc_angle + sign(ux) * PI/2}
|
|
||||||
|
|
||||||
|
|
||||||
func _on_damage_taken(_damage, _dir, _id):
|
|
||||||
$AudioStreamPlayer2D.play()
|
|
||||||
|
|
||||||
func _on_death():
|
|
||||||
# Free all other children while waiting for the death sound to play.
|
|
||||||
dead = true
|
|
||||||
for child in get_children():
|
|
||||||
if not child is AudioStreamPlayer2D:
|
|
||||||
child.queue_free()
|
|
||||||
$AudioStreamPlayer2D.play()
|
|
||||||
await $AudioStreamPlayer2D.finished
|
|
||||||
queue_free()
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
uid://b70f2ylbb3btt
|
|
||||||
|
|
@ -1,64 +0,0 @@
|
||||||
[gd_scene load_steps=7 format=3 uid="uid://b62xcg0dd3vct"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b70f2ylbb3btt" path="res://enemies/leech/leech.gd" id="1_6u582"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://dn8qucrpq6k72" path="res://enemies/leech/segment_end.tscn" id="2_i1r8c"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://cvoicwo2xnf7e" path="res://enemies/leech/segment.tscn" id="2_oqch2"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="3_0r7dp"]
|
|
||||||
[ext_resource type="AudioStream" uid="uid://co07360hqn6fk" path="res://sounds/686321__cjspellsfish__punch-land-soft.wav" id="4_b1m5t"]
|
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_cq6dk"]
|
|
||||||
size = Vector2(2, 12)
|
|
||||||
|
|
||||||
[node name="Leech" type="Area2D"]
|
|
||||||
scale = Vector2(1, 1.2)
|
|
||||||
script = ExtResource("1_6u582")
|
|
||||||
broadth = 200
|
|
||||||
max_hp = 80
|
|
||||||
|
|
||||||
[node name="Segments" type="Node2D" parent="."]
|
|
||||||
|
|
||||||
[node name="SegmentEnd1" parent="Segments" instance=ExtResource("2_i1r8c")]
|
|
||||||
rotation = 3.1415927
|
|
||||||
scale = Vector2(-1, -1)
|
|
||||||
|
|
||||||
[node name="Segment2" parent="Segments" instance=ExtResource("2_oqch2")]
|
|
||||||
|
|
||||||
[node name="Segment3" parent="Segments" instance=ExtResource("2_oqch2")]
|
|
||||||
|
|
||||||
[node name="Segment4" parent="Segments" instance=ExtResource("2_oqch2")]
|
|
||||||
|
|
||||||
[node name="Segment5" parent="Segments" instance=ExtResource("2_oqch2")]
|
|
||||||
|
|
||||||
[node name="Segment6" parent="Segments" instance=ExtResource("2_oqch2")]
|
|
||||||
|
|
||||||
[node name="Segment7" parent="Segments" instance=ExtResource("2_oqch2")]
|
|
||||||
|
|
||||||
[node name="Segment8" parent="Segments" instance=ExtResource("2_oqch2")]
|
|
||||||
|
|
||||||
[node name="SegmentEnd2" parent="Segments" instance=ExtResource("2_i1r8c")]
|
|
||||||
|
|
||||||
[node name="EarthAligner" parent="." instance=ExtResource("3_0r7dp")]
|
|
||||||
|
|
||||||
[node name="StepChecker" type="Area2D" parent="."]
|
|
||||||
position = Vector2(248, 31.2)
|
|
||||||
collision_layer = 0
|
|
||||||
collision_mask = 8
|
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="StepChecker"]
|
|
||||||
position = Vector2(0, 14.8)
|
|
||||||
shape = SubResource("RectangleShape2D_cq6dk")
|
|
||||||
|
|
||||||
[node name="GroundSensor" type="Area2D" parent="."]
|
|
||||||
collision_layer = 0
|
|
||||||
collision_mask = 8
|
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="GroundSensor"]
|
|
||||||
position = Vector2(0, 8.8)
|
|
||||||
shape = SubResource("RectangleShape2D_cq6dk")
|
|
||||||
|
|
||||||
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
|
|
||||||
stream = ExtResource("4_b1m5t")
|
|
||||||
volume_db = 15.0
|
|
||||||
|
|
||||||
[connection signal="damage_taken" from="." to="." method="_on_damage_taken"]
|
|
||||||
[connection signal="died" from="." to="." method="_on_death"]
|
|
||||||
|
|
@ -1,61 +0,0 @@
|
||||||
[gd_scene load_steps=7 format=3 uid="uid://b62xcg0dd3vct"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b70f2ylbb3btt" path="res://enemies/leech/leech.gd" id="1_6u582"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://dn8qucrpq6k72" path="res://enemies/leech/segment_end.tscn" id="2_i1r8c"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://cvoicwo2xnf7e" path="res://enemies/leech/segment.tscn" id="2_oqch2"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="3_0r7dp"]
|
|
||||||
[ext_resource type="AudioStream" uid="uid://co07360hqn6fk" path="res://sounds/686321__cjspellsfish__punch-land-soft.wav" id="4_b1m5t"]
|
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_cq6dk"]
|
|
||||||
size = Vector2(2, 12)
|
|
||||||
|
|
||||||
[node name="Leech" type="Node2D"]
|
|
||||||
scale = Vector2(1, 1.2)
|
|
||||||
script = ExtResource("1_6u582")
|
|
||||||
broadth = 200
|
|
||||||
max_hp = 80
|
|
||||||
|
|
||||||
[node name="Segments" type="Node2D" parent="."]
|
|
||||||
|
|
||||||
[node name="SegmentEnd1" parent="Segments" instance=ExtResource("2_i1r8c")]
|
|
||||||
rotation = 3.1415927
|
|
||||||
scale = Vector2(-1, -1)
|
|
||||||
|
|
||||||
[node name="Segment2" parent="Segments" instance=ExtResource("2_oqch2")]
|
|
||||||
|
|
||||||
[node name="Segment3" parent="Segments" instance=ExtResource("2_oqch2")]
|
|
||||||
|
|
||||||
[node name="Segment4" parent="Segments" instance=ExtResource("2_oqch2")]
|
|
||||||
|
|
||||||
[node name="Segment5" parent="Segments" instance=ExtResource("2_oqch2")]
|
|
||||||
|
|
||||||
[node name="Segment6" parent="Segments" instance=ExtResource("2_oqch2")]
|
|
||||||
|
|
||||||
[node name="Segment7" parent="Segments" instance=ExtResource("2_oqch2")]
|
|
||||||
|
|
||||||
[node name="Segment8" parent="Segments" instance=ExtResource("2_oqch2")]
|
|
||||||
|
|
||||||
[node name="SegmentEnd2" parent="Segments" instance=ExtResource("2_i1r8c")]
|
|
||||||
|
|
||||||
[node name="EarthAligner" parent="." instance=ExtResource("3_0r7dp")]
|
|
||||||
|
|
||||||
[node name="RayCast2D" type="Area2D" parent="."]
|
|
||||||
position = Vector2(248, 31.2)
|
|
||||||
collision_layer = 0
|
|
||||||
collision_mask = 8
|
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="RayCast2D"]
|
|
||||||
position = Vector2(0, 14.8)
|
|
||||||
shape = SubResource("RectangleShape2D_cq6dk")
|
|
||||||
|
|
||||||
[node name="RayCast2D2" type="Area2D" parent="."]
|
|
||||||
collision_layer = 0
|
|
||||||
collision_mask = 8
|
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="RayCast2D2"]
|
|
||||||
position = Vector2(0, 8.8)
|
|
||||||
shape = SubResource("RectangleShape2D_cq6dk")
|
|
||||||
|
|
||||||
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
|
|
||||||
stream = ExtResource("4_b1m5t")
|
|
||||||
volume_db = 15.0
|
|
||||||
|
|
@ -1,61 +0,0 @@
|
||||||
[gd_scene load_steps=7 format=3 uid="uid://b62xcg0dd3vct"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b70f2ylbb3btt" path="res://enemies/leech/leech.gd" id="1_6u582"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://dn8qucrpq6k72" path="res://enemies/leech/segment_end.tscn" id="2_i1r8c"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://cvoicwo2xnf7e" path="res://enemies/leech/segment.tscn" id="2_oqch2"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="3_0r7dp"]
|
|
||||||
[ext_resource type="AudioStream" uid="uid://co07360hqn6fk" path="res://sounds/686321__cjspellsfish__punch-land-soft.wav" id="4_b1m5t"]
|
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_cq6dk"]
|
|
||||||
size = Vector2(2, 12)
|
|
||||||
|
|
||||||
[node name="Leech" type="Node2D"]
|
|
||||||
scale = Vector2(1, 1.2)
|
|
||||||
script = ExtResource("1_6u582")
|
|
||||||
broadth = 200
|
|
||||||
max_hp = 80
|
|
||||||
|
|
||||||
[node name="Segments" type="Node2D" parent="."]
|
|
||||||
|
|
||||||
[node name="SegmentEnd1" parent="Segments" instance=ExtResource("2_i1r8c")]
|
|
||||||
rotation = 3.1415927
|
|
||||||
scale = Vector2(-1, -1)
|
|
||||||
|
|
||||||
[node name="Segment2" parent="Segments" instance=ExtResource("2_oqch2")]
|
|
||||||
|
|
||||||
[node name="Segment3" parent="Segments" instance=ExtResource("2_oqch2")]
|
|
||||||
|
|
||||||
[node name="Segment4" parent="Segments" instance=ExtResource("2_oqch2")]
|
|
||||||
|
|
||||||
[node name="Segment5" parent="Segments" instance=ExtResource("2_oqch2")]
|
|
||||||
|
|
||||||
[node name="Segment6" parent="Segments" instance=ExtResource("2_oqch2")]
|
|
||||||
|
|
||||||
[node name="Segment7" parent="Segments" instance=ExtResource("2_oqch2")]
|
|
||||||
|
|
||||||
[node name="Segment8" parent="Segments" instance=ExtResource("2_oqch2")]
|
|
||||||
|
|
||||||
[node name="SegmentEnd2" parent="Segments" instance=ExtResource("2_i1r8c")]
|
|
||||||
|
|
||||||
[node name="EarthAligner" parent="." instance=ExtResource("3_0r7dp")]
|
|
||||||
|
|
||||||
[node name="RayCast2D" type="Area2D" parent="."]
|
|
||||||
position = Vector2(248, 31.2)
|
|
||||||
collision_layer = 0
|
|
||||||
collision_mask = 8
|
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="RayCast2D"]
|
|
||||||
position = Vector2(0, 14.8)
|
|
||||||
shape = SubResource("RectangleShape2D_cq6dk")
|
|
||||||
|
|
||||||
[node name="RayCast2D2" type="Area2D" parent="."]
|
|
||||||
collision_layer = 0
|
|
||||||
collision_mask = 8
|
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="RayCast2D2"]
|
|
||||||
position = Vector2(0, 8.8)
|
|
||||||
shape = SubResource("RectangleShape2D_cq6dk")
|
|
||||||
|
|
||||||
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
|
|
||||||
stream = ExtResource("4_b1m5t")
|
|
||||||
volume_db = 15.0
|
|
||||||
|
|
@ -1,61 +0,0 @@
|
||||||
[gd_scene load_steps=7 format=3 uid="uid://b62xcg0dd3vct"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b70f2ylbb3btt" path="res://enemies/leech/leech.gd" id="1_6u582"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://dn8qucrpq6k72" path="res://enemies/leech/segment_end.tscn" id="2_i1r8c"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://cvoicwo2xnf7e" path="res://enemies/leech/segment.tscn" id="2_oqch2"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="3_0r7dp"]
|
|
||||||
[ext_resource type="AudioStream" uid="uid://co07360hqn6fk" path="res://sounds/686321__cjspellsfish__punch-land-soft.wav" id="4_b1m5t"]
|
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_cq6dk"]
|
|
||||||
size = Vector2(2, 12)
|
|
||||||
|
|
||||||
[node name="Leech" type="Node2D"]
|
|
||||||
scale = Vector2(1, 1.2)
|
|
||||||
script = ExtResource("1_6u582")
|
|
||||||
broadth = 200
|
|
||||||
max_hp = 80
|
|
||||||
|
|
||||||
[node name="Segments" type="Node2D" parent="."]
|
|
||||||
|
|
||||||
[node name="SegmentEnd1" parent="Segments" instance=ExtResource("2_i1r8c")]
|
|
||||||
rotation = 3.1415927
|
|
||||||
scale = Vector2(-1, -1)
|
|
||||||
|
|
||||||
[node name="Segment2" parent="Segments" instance=ExtResource("2_oqch2")]
|
|
||||||
|
|
||||||
[node name="Segment3" parent="Segments" instance=ExtResource("2_oqch2")]
|
|
||||||
|
|
||||||
[node name="Segment4" parent="Segments" instance=ExtResource("2_oqch2")]
|
|
||||||
|
|
||||||
[node name="Segment5" parent="Segments" instance=ExtResource("2_oqch2")]
|
|
||||||
|
|
||||||
[node name="Segment6" parent="Segments" instance=ExtResource("2_oqch2")]
|
|
||||||
|
|
||||||
[node name="Segment7" parent="Segments" instance=ExtResource("2_oqch2")]
|
|
||||||
|
|
||||||
[node name="Segment8" parent="Segments" instance=ExtResource("2_oqch2")]
|
|
||||||
|
|
||||||
[node name="SegmentEnd2" parent="Segments" instance=ExtResource("2_i1r8c")]
|
|
||||||
|
|
||||||
[node name="EarthAligner" parent="." instance=ExtResource("3_0r7dp")]
|
|
||||||
|
|
||||||
[node name="RayCast2D" type="Area2D" parent="."]
|
|
||||||
position = Vector2(248, 31.2)
|
|
||||||
collision_layer = 0
|
|
||||||
collision_mask = 8
|
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="RayCast2D"]
|
|
||||||
position = Vector2(0, 14.8)
|
|
||||||
shape = SubResource("RectangleShape2D_cq6dk")
|
|
||||||
|
|
||||||
[node name="RayCast2D2" type="Area2D" parent="."]
|
|
||||||
collision_layer = 0
|
|
||||||
collision_mask = 8
|
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="RayCast2D2"]
|
|
||||||
position = Vector2(0, 8.8)
|
|
||||||
shape = SubResource("RectangleShape2D_cq6dk")
|
|
||||||
|
|
||||||
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
|
|
||||||
stream = ExtResource("4_b1m5t")
|
|
||||||
volume_db = 15.0
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
extends Area2D
|
|
||||||
@onready var player = get_tree().get_root().get_node_or_null("main/Player")
|
|
||||||
var damage = 1
|
|
||||||
|
|
||||||
func _process(_delta: float) -> void:
|
|
||||||
if (player != null and overlaps_body(player)):
|
|
||||||
player.hurt(damage, self.global_position-player.global_position)
|
|
||||||
|
|
||||||
# Forward taken damage to the parent leech.
|
|
||||||
func _on_hurtbox_damaged(dmg : int, dir : Vector2, id):
|
|
||||||
get_parent().get_parent().hurt(dmg, dir, id)
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
uid://b3q5khoqnnicx
|
|
||||||
|
Before Width: | Height: | Size: 2.5 KiB |
|
|
@ -1,40 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://bx4w0yifutm7y"
|
|
||||||
path="res://.godot/imported/segment.png-cdd72fb07696c7bd21dcdf251ba1e79d.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://enemies/leech/segment.png"
|
|
||||||
dest_files=["res://.godot/imported/segment.png-cdd72fb07696c7bd21dcdf251ba1e79d.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
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
[gd_scene load_steps=5 format=3 uid="uid://cvoicwo2xnf7e"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b3q5khoqnnicx" path="res://enemies/leech/segment.gd" id="1_o43lr"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://bx4w0yifutm7y" path="res://enemies/leech/segment.png" id="2_jsq5k"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://mtfsdd4cdf3a" path="res://utils/enemy_hurtbox.tscn" id="3_sa5vt"]
|
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_fgt1l"]
|
|
||||||
|
|
||||||
[node name="Segment" type="Area2D"]
|
|
||||||
z_index = 4
|
|
||||||
collision_layer = 0
|
|
||||||
collision_mask = 4
|
|
||||||
script = ExtResource("1_o43lr")
|
|
||||||
|
|
||||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
|
||||||
position = Vector2(-1.9073486e-06, 0)
|
|
||||||
rotation = 1.5707964
|
|
||||||
scale = Vector2(0.6233792, 0.6257627)
|
|
||||||
texture = ExtResource("2_jsq5k")
|
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
|
||||||
scale = Vector2(2, 1)
|
|
||||||
shape = SubResource("RectangleShape2D_fgt1l")
|
|
||||||
|
|
||||||
[node name="EnemyHurtbox" parent="." node_paths=PackedStringArray("canvasItem") instance=ExtResource("3_sa5vt")]
|
|
||||||
collision_layer = 16
|
|
||||||
canvasItem = NodePath("..")
|
|
||||||
flashColor = Color(2.00392, 2.00392, 2.00392, 1)
|
|
||||||
id_block_time = 0.0
|
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="EnemyHurtbox"]
|
|
||||||
visible = false
|
|
||||||
scale = Vector2(2, 1)
|
|
||||||
shape = SubResource("RectangleShape2D_fgt1l")
|
|
||||||
|
|
||||||
[connection signal="damage_taken" from="EnemyHurtbox" to="." method="_on_hurtbox_damaged"]
|
|
||||||
|
Before Width: | Height: | Size: 3 KiB |
|
|
@ -1,40 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://03pv5447noi8"
|
|
||||||
path="res://.godot/imported/segment_end.png-3737d47c0764ba7974a4bc464eccda0b.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://enemies/leech/segment_end.png"
|
|
||||||
dest_files=["res://.godot/imported/segment_end.png-3737d47c0764ba7974a4bc464eccda0b.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
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
[gd_scene load_steps=5 format=3 uid="uid://dn8qucrpq6k72"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b3q5khoqnnicx" path="res://enemies/leech/segment.gd" id="1_tokuw"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://03pv5447noi8" path="res://enemies/leech/segment_end.png" id="2_tokuw"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://mtfsdd4cdf3a" path="res://utils/enemy_hurtbox.tscn" id="3_ws4kp"]
|
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_fgt1l"]
|
|
||||||
|
|
||||||
[node name="Segment" type="Area2D"]
|
|
||||||
z_index = 4
|
|
||||||
collision_layer = 0
|
|
||||||
collision_mask = 4
|
|
||||||
script = ExtResource("1_tokuw")
|
|
||||||
|
|
||||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
|
||||||
position = Vector2(-1.9073486e-06, 0)
|
|
||||||
rotation = 1.5707964
|
|
||||||
scale = Vector2(0.6233792, 0.6257627)
|
|
||||||
texture = ExtResource("2_tokuw")
|
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
|
||||||
scale = Vector2(2, 1)
|
|
||||||
shape = SubResource("RectangleShape2D_fgt1l")
|
|
||||||
|
|
||||||
[node name="EnemyHurtbox" parent="." node_paths=PackedStringArray("canvasItem") instance=ExtResource("3_ws4kp")]
|
|
||||||
collision_layer = 16
|
|
||||||
canvasItem = NodePath("..")
|
|
||||||
flashColor = Color(2.00392, 2.00392, 2.00392, 1)
|
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="EnemyHurtbox"]
|
|
||||||
visible = false
|
|
||||||
scale = Vector2(2, 1)
|
|
||||||
shape = SubResource("RectangleShape2D_fgt1l")
|
|
||||||
|
|
||||||
[connection signal="damage_taken" from="EnemyHurtbox" to="." method="_on_hurtbox_damaged"]
|
|
||||||
|
|
@ -1,110 +0,0 @@
|
||||||
[preset.0]
|
|
||||||
|
|
||||||
name="Windows Desktop"
|
|
||||||
platform="Windows Desktop"
|
|
||||||
runnable=true
|
|
||||||
advanced_options=false
|
|
||||||
dedicated_server=false
|
|
||||||
custom_features=""
|
|
||||||
export_filter="all_resources"
|
|
||||||
include_filter=""
|
|
||||||
exclude_filter=""
|
|
||||||
export_path="../The Dark Side of Earth.exe"
|
|
||||||
patches=PackedStringArray()
|
|
||||||
encryption_include_filters=""
|
|
||||||
encryption_exclude_filters=""
|
|
||||||
seed=0
|
|
||||||
encrypt_pck=false
|
|
||||||
encrypt_directory=false
|
|
||||||
script_export_mode=2
|
|
||||||
|
|
||||||
[preset.0.options]
|
|
||||||
|
|
||||||
custom_template/debug=""
|
|
||||||
custom_template/release=""
|
|
||||||
debug/export_console_wrapper=1
|
|
||||||
binary_format/embed_pck=false
|
|
||||||
texture_format/s3tc_bptc=true
|
|
||||||
texture_format/etc2_astc=false
|
|
||||||
shader_baker/enabled=false
|
|
||||||
binary_format/architecture="x86_64"
|
|
||||||
codesign/enable=false
|
|
||||||
codesign/timestamp=true
|
|
||||||
codesign/timestamp_server_url=""
|
|
||||||
codesign/digest_algorithm=1
|
|
||||||
codesign/description=""
|
|
||||||
codesign/custom_options=PackedStringArray()
|
|
||||||
application/modify_resources=true
|
|
||||||
application/icon=""
|
|
||||||
application/console_wrapper_icon=""
|
|
||||||
application/icon_interpolation=4
|
|
||||||
application/file_version=""
|
|
||||||
application/product_version=""
|
|
||||||
application/company_name=""
|
|
||||||
application/product_name=""
|
|
||||||
application/file_description=""
|
|
||||||
application/copyright=""
|
|
||||||
application/trademarks=""
|
|
||||||
application/export_angle=0
|
|
||||||
application/export_d3d12=0
|
|
||||||
application/d3d12_agility_sdk_multiarch=true
|
|
||||||
ssh_remote_deploy/enabled=false
|
|
||||||
ssh_remote_deploy/host="user@host_ip"
|
|
||||||
ssh_remote_deploy/port="22"
|
|
||||||
ssh_remote_deploy/extra_args_ssh=""
|
|
||||||
ssh_remote_deploy/extra_args_scp=""
|
|
||||||
ssh_remote_deploy/run_script="Expand-Archive -LiteralPath '{temp_dir}\\{archive_name}' -DestinationPath '{temp_dir}'
|
|
||||||
$action = New-ScheduledTaskAction -Execute '{temp_dir}\\{exe_name}' -Argument '{cmd_args}'
|
|
||||||
$trigger = New-ScheduledTaskTrigger -Once -At 00:00
|
|
||||||
$settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries
|
|
||||||
$task = New-ScheduledTask -Action $action -Trigger $trigger -Settings $settings
|
|
||||||
Register-ScheduledTask godot_remote_debug -InputObject $task -Force:$true
|
|
||||||
Start-ScheduledTask -TaskName godot_remote_debug
|
|
||||||
while (Get-ScheduledTask -TaskName godot_remote_debug | ? State -eq running) { Start-Sleep -Milliseconds 100 }
|
|
||||||
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue"
|
|
||||||
ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue
|
|
||||||
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue
|
|
||||||
Remove-Item -Recurse -Force '{temp_dir}'"
|
|
||||||
|
|
||||||
[preset.1]
|
|
||||||
|
|
||||||
name="Linux"
|
|
||||||
platform="Linux"
|
|
||||||
runnable=true
|
|
||||||
advanced_options=false
|
|
||||||
dedicated_server=false
|
|
||||||
custom_features=""
|
|
||||||
export_filter="all_resources"
|
|
||||||
include_filter=""
|
|
||||||
exclude_filter=""
|
|
||||||
export_path="../The Dark Side of Earth.x86_64"
|
|
||||||
patches=PackedStringArray()
|
|
||||||
encryption_include_filters=""
|
|
||||||
encryption_exclude_filters=""
|
|
||||||
seed=0
|
|
||||||
encrypt_pck=false
|
|
||||||
encrypt_directory=false
|
|
||||||
script_export_mode=2
|
|
||||||
|
|
||||||
[preset.1.options]
|
|
||||||
|
|
||||||
custom_template/debug=""
|
|
||||||
custom_template/release=""
|
|
||||||
debug/export_console_wrapper=1
|
|
||||||
binary_format/embed_pck=false
|
|
||||||
texture_format/s3tc_bptc=true
|
|
||||||
texture_format/etc2_astc=false
|
|
||||||
shader_baker/enabled=false
|
|
||||||
binary_format/architecture="x86_64"
|
|
||||||
ssh_remote_deploy/enabled=false
|
|
||||||
ssh_remote_deploy/host="user@host_ip"
|
|
||||||
ssh_remote_deploy/port="22"
|
|
||||||
ssh_remote_deploy/extra_args_ssh=""
|
|
||||||
ssh_remote_deploy/extra_args_scp=""
|
|
||||||
ssh_remote_deploy/run_script="#!/usr/bin/env bash
|
|
||||||
export DISPLAY=:0
|
|
||||||
unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\"
|
|
||||||
\"{temp_dir}/{exe_name}\" {cmd_args}"
|
|
||||||
ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash
|
|
||||||
kill $(pgrep -x -f \"{temp_dir}/{exe_name} {cmd_args}\")
|
|
||||||
rm -rf \"{temp_dir}\""
|
|
||||||
46
grid.gd
Normal file
|
|
@ -0,0 +1,46 @@
|
||||||
|
class_name Grid extends Node2D
|
||||||
|
|
||||||
|
@export var ground_radius : float
|
||||||
|
@export var cell_height : float
|
||||||
|
@export var num_collumns : int
|
||||||
|
@export var debug : bool
|
||||||
|
|
||||||
|
var buildings : Array[Building] = []
|
||||||
|
|
||||||
|
func _draw() -> void:
|
||||||
|
if !debug:
|
||||||
|
return
|
||||||
|
|
||||||
|
for i in range(10):
|
||||||
|
draw_arc(Vector2.ZERO, ground_radius + i * cell_height, 0, TAU, 250, Color.SKY_BLUE, 1.0, true);
|
||||||
|
|
||||||
|
for i in range(num_collumns):
|
||||||
|
var angle = i * TAU / num_collumns;
|
||||||
|
draw_line(Vector2.ZERO, 10000 * Vector2.from_angle(angle), Color.SKY_BLUE);
|
||||||
|
|
||||||
|
func add_building_to_collumn(building : Building, collumn : int):
|
||||||
|
# find the height of the top building in the buildings list:
|
||||||
|
building.location = Vector2(collumn, 0)
|
||||||
|
var height = 0
|
||||||
|
|
||||||
|
# TODO: support other dimensions for buildings
|
||||||
|
|
||||||
|
# add the new building one higher than the previous
|
||||||
|
height += 1
|
||||||
|
building.location = Vector2i(collumn, height);
|
||||||
|
|
||||||
|
# for testing
|
||||||
|
func _ready() -> void:
|
||||||
|
var packed : PackedScene = preload("res://building.tscn")
|
||||||
|
|
||||||
|
var test_building = packed.instantiate()
|
||||||
|
test_building.location = Vector2(45, 0)
|
||||||
|
add_child(test_building)
|
||||||
|
|
||||||
|
test_building = packed.instantiate()
|
||||||
|
test_building.location = Vector2(44, 0)
|
||||||
|
add_child(test_building)
|
||||||
|
|
||||||
|
test_building = packed.instantiate()
|
||||||
|
test_building.location = Vector2(45, 1)
|
||||||
|
add_child(test_building)
|
||||||
|
|
@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.cte
|
||||||
compress/mode=0
|
compress/mode=0
|
||||||
compress/high_quality=false
|
compress/high_quality=false
|
||||||
compress/lossy_quality=0.7
|
compress/lossy_quality=0.7
|
||||||
compress/uastc_level=0
|
|
||||||
compress/rdo_quality_loss=0.0
|
|
||||||
compress/hdr_compression=1
|
compress/hdr_compression=1
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
compress/channel_pack=0
|
compress/channel_pack=0
|
||||||
|
|
@ -27,10 +25,6 @@ mipmaps/generate=false
|
||||||
mipmaps/limit=-1
|
mipmaps/limit=-1
|
||||||
roughness/mode=0
|
roughness/mode=0
|
||||||
roughness/src_normal=""
|
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/fix_alpha_border=true
|
||||||
process/premult_alpha=false
|
process/premult_alpha=false
|
||||||
process/normal_map_invert_y=false
|
process/normal_map_invert_y=false
|
||||||
|
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
extends Area2D
|
|
||||||
|
|
||||||
var damage = 20
|
|
||||||
var direction = Vector2(1,0)
|
|
||||||
@export var speed = 2000
|
|
||||||
@onready var dmg_id = Global.next_dmg_id
|
|
||||||
|
|
||||||
func _process(delta: float) -> void:
|
|
||||||
self.position += delta * speed * direction
|
|
||||||
for area in get_overlapping_areas():
|
|
||||||
area.hurt(damage, -3 * direction, dmg_id)
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
uid://bglrm0bb4nla
|
|
||||||
|
Before Width: | Height: | Size: 875 B |
|
|
@ -1,40 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://bavoghl2pxs83"
|
|
||||||
path="res://.godot/imported/arrow.png-2cffe6fabf19679230c231a1fd8a329e.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://items/consumables/bow/arrow.png"
|
|
||||||
dest_files=["res://.godot/imported/arrow.png-2cffe6fabf19679230c231a1fd8a329e.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=0
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
[gd_scene load_steps=4 format=3 uid="uid://dfva4dhflxglr"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://bglrm0bb4nla" path="res://items/consumables/bow/arrow.gd" id="1_lxthq"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://bavoghl2pxs83" path="res://items/consumables/bow/arrow.png" id="2_ilsew"]
|
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_tfcgf"]
|
|
||||||
size = Vector2(20, 5)
|
|
||||||
|
|
||||||
[node name="Arrow" type="Area2D"]
|
|
||||||
collision_layer = 0
|
|
||||||
collision_mask = 18
|
|
||||||
script = ExtResource("1_lxthq")
|
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
|
||||||
scale = Vector2(3, 2)
|
|
||||||
shape = SubResource("RectangleShape2D_tfcgf")
|
|
||||||
|
|
||||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
|
||||||
texture_filter = 1
|
|
||||||
position = Vector2(0, -1)
|
|
||||||
scale = Vector2(2, 2)
|
|
||||||
texture = ExtResource("2_ilsew")
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
[gd_scene load_steps=2 format=3 uid="uid://bu3j6ambrybd2"]
|
|
||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://bavoghl2pxs83" path="res://items/consumables/bow/arrow.png" id="1_7lvex"]
|
|
||||||
|
|
||||||
[node name="TextureRect" type="TextureRect"]
|
|
||||||
custom_minimum_size = Vector2(0, 3)
|
|
||||||
texture = ExtResource("1_7lvex")
|
|
||||||
expand_mode = 3
|
|
||||||
stretch_mode = 3
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
extends ActiveItem
|
|
||||||
@export var cooldown = 0.3
|
|
||||||
@export var arrow_scene : PackedScene
|
|
||||||
|
|
||||||
func actually_collect():
|
|
||||||
player.set_cooldown(cooldown)
|
|
||||||
|
|
||||||
func activate():
|
|
||||||
player.activate_cooldown()
|
|
||||||
|
|
||||||
# Spawn an arrow on activation
|
|
||||||
var arrow : Area2D = arrow_scene.instantiate()
|
|
||||||
get_tree().get_root().add_child(arrow)
|
|
||||||
arrow.position = player.position
|
|
||||||
arrow.rotation = player.rotation
|
|
||||||
arrow.direction = player.get_node("EarthAligner").right * player.facing
|
|
||||||
|
|
||||||
# Make sure the arrow sprite faces the right direction
|
|
||||||
if(player.facing == -1):
|
|
||||||
arrow.get_node("Sprite2D").scale.x = - arrow.get_node("Sprite2D").scale.x
|
|
||||||
$SoundBowRelease.play()
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
uid://bkcip66at5sug
|
|
||||||
|
Before Width: | Height: | Size: 967 B |
|
|
@ -1,40 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://d01h01le82gyh"
|
|
||||||
path="res://.godot/imported/bow.png-7ca2f79a3aaf0404b0d2a5f64b2c7b38.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://items/consumables/bow/bow.png"
|
|
||||||
dest_files=["res://.godot/imported/bow.png-7ca2f79a3aaf0404b0d2a5f64b2c7b38.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
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
||||||
[gd_scene load_steps=10 format=3 uid="uid://ddn025xnjngko"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://bkcip66at5sug" path="res://items/consumables/bow/bow.gd" id="1_xppub"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://dfva4dhflxglr" path="res://items/consumables/bow/arrow.tscn" id="2_0id2q"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://d01h01le82gyh" path="res://items/consumables/bow/bow.png" id="3_vkelq"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="4_0id2q"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://bu3j6ambrybd2" path="res://items/consumables/bow/arrow_icon.tscn" id="4_2dslu"]
|
|
||||||
[ext_resource type="AudioStream" uid="uid://bg1w0fyeyys2p" path="res://sounds/item-equip-6904.mp3" id="5_gfbg0"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://d4mrbgfl7jpqq" path="res://items/generic/ItemShine.png" id="5_o1smo"]
|
|
||||||
[ext_resource type="AudioStream" uid="uid://10ljbd4djqgb" path="res://sounds/263675__porkmuncher__bow_release_cut.wav" id="7_o1smo"]
|
|
||||||
|
|
||||||
[sub_resource type="CircleShape2D" id="CircleShape2D_gllxn"]
|
|
||||||
radius = 13.239409
|
|
||||||
|
|
||||||
[node name="Bow" type="Area2D"]
|
|
||||||
collision_layer = 0
|
|
||||||
collision_mask = 4
|
|
||||||
script = ExtResource("1_xppub")
|
|
||||||
arrow_scene = ExtResource("2_0id2q")
|
|
||||||
sprite = ExtResource("3_vkelq")
|
|
||||||
uses_left_icon = ExtResource("4_2dslu")
|
|
||||||
uses = 5
|
|
||||||
icon = ExtResource("3_vkelq")
|
|
||||||
item_name = "Bow"
|
|
||||||
|
|
||||||
[node name="EarthAligner" parent="." instance=ExtResource("4_0id2q")]
|
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
|
||||||
position = Vector2(5, 2)
|
|
||||||
scale = Vector2(2.17, 3.5)
|
|
||||||
shape = SubResource("CircleShape2D_gllxn")
|
|
||||||
|
|
||||||
[node name="Sprite2D2" type="Sprite2D" parent="."]
|
|
||||||
position = Vector2(8, 2)
|
|
||||||
scale = Vector2(1.5, 1.5)
|
|
||||||
texture = ExtResource("5_o1smo")
|
|
||||||
|
|
||||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
|
||||||
scale = Vector2(1.4, 1.4)
|
|
||||||
texture = ExtResource("3_vkelq")
|
|
||||||
|
|
||||||
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
|
|
||||||
stream = ExtResource("5_gfbg0")
|
|
||||||
volume_db = 15.0
|
|
||||||
|
|
||||||
[node name="SoundBowRelease" type="AudioStreamPlayer2D" parent="."]
|
|
||||||
stream = ExtResource("7_o1smo")
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
extends Item
|
|
||||||
@export var heal_amount = 1
|
|
||||||
|
|
||||||
func collect() -> bool:
|
|
||||||
if(player.current_hp < player.max_hp):
|
|
||||||
player.current_hp += heal_amount
|
|
||||||
return true
|
|
||||||
return false
|
|
||||||