Compare commits
2 commits
0b03dda8a3
...
f9075777e8
| Author | SHA1 | Date | |
|---|---|---|---|
| f9075777e8 | |||
| 39b825f572 |
8 changed files with 97 additions and 10 deletions
|
|
@ -1,7 +1,8 @@
|
||||||
[gd_scene load_steps=6 format=3 uid="uid://5nb7pf8g1ck"]
|
[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="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://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="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"]
|
[ext_resource type="AudioStream" uid="uid://co07360hqn6fk" path="res://sounds/686321__cjspellsfish__punch-land-soft.wav" id="4_ps8gx"]
|
||||||
|
|
||||||
|
|
@ -16,8 +17,8 @@ hp = 180
|
||||||
|
|
||||||
[node name="Segments" type="Node2D" parent="."]
|
[node name="Segments" type="Node2D" parent="."]
|
||||||
|
|
||||||
[node name="Segment0" parent="Segments" instance=ExtResource("2_7ngsb")]
|
[node name="SegmentEnd1" parent="Segments" instance=ExtResource("2_poqop")]
|
||||||
scale = Vector2(2, 2)
|
scale = Vector2(-2, -2)
|
||||||
|
|
||||||
[node name="Segment2" parent="Segments" instance=ExtResource("2_7ngsb")]
|
[node name="Segment2" parent="Segments" instance=ExtResource("2_7ngsb")]
|
||||||
scale = Vector2(2, 2)
|
scale = Vector2(2, 2)
|
||||||
|
|
@ -43,6 +44,9 @@ scale = Vector2(2, 2)
|
||||||
[node name="Segment9" parent="Segments" instance=ExtResource("2_7ngsb")]
|
[node name="Segment9" parent="Segments" instance=ExtResource("2_7ngsb")]
|
||||||
scale = Vector2(2, 2)
|
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="EarthAligner" parent="." instance=ExtResource("3_vk62e")]
|
||||||
|
|
||||||
[node name="RayCast2D" type="Area2D" parent="."]
|
[node name="RayCast2D" type="Area2D" parent="."]
|
||||||
|
|
|
||||||
|
|
@ -70,8 +70,9 @@ func calculate_segment_location_and_rotation (i) -> Dictionary:
|
||||||
angle1 += TAU
|
angle1 += TAU
|
||||||
|
|
||||||
if radius < 10000000:
|
if radius < 10000000:
|
||||||
return {"position": center + radius * Vector2.from_angle((i * angle1 + (segment_count - 1 - i) * angle2)/(segment_count - 1))
|
return {"position": center + radius * Vector2.from_angle((i * angle1 + (segment_count - 1 - i) * angle2)/(segment_count - 1)),
|
||||||
, "rotation": (i * angle1 + (segment_count - 1 - i) * angle2)/ (segment_count - 1) + PI/2}
|
"rotation": (i * angle1 + (segment_count - 1 - i) * angle2)/ (segment_count - 1) + sign(ux) * PI/2}
|
||||||
|
|
||||||
else:
|
else:
|
||||||
return {"position" : Vector2.UP * broadth * i / (segment_count - 1),
|
return {"position" : Vector2.UP * broadth * i / (segment_count - 1),
|
||||||
"rotation" : 3 * PI / 2}
|
"rotation" : 3 * PI / 2}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
[gd_scene load_steps=6 format=3 uid="uid://b62xcg0dd3vct"]
|
[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="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://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="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"]
|
[ext_resource type="AudioStream" uid="uid://co07360hqn6fk" path="res://sounds/686321__cjspellsfish__punch-land-soft.wav" id="4_b1m5t"]
|
||||||
|
|
@ -16,7 +17,9 @@ hp = 80
|
||||||
|
|
||||||
[node name="Segments" type="Node2D" parent="."]
|
[node name="Segments" type="Node2D" parent="."]
|
||||||
|
|
||||||
[node name="Segment0" parent="Segments" instance=ExtResource("2_oqch2")]
|
[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="Segment2" parent="Segments" instance=ExtResource("2_oqch2")]
|
||||||
|
|
||||||
|
|
@ -32,7 +35,7 @@ hp = 80
|
||||||
|
|
||||||
[node name="Segment8" parent="Segments" instance=ExtResource("2_oqch2")]
|
[node name="Segment8" parent="Segments" instance=ExtResource("2_oqch2")]
|
||||||
|
|
||||||
[node name="Segment9" 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="EarthAligner" parent="." instance=ExtResource("3_0r7dp")]
|
||||||
|
|
||||||
|
|
|
||||||
BIN
enemies/leech/segment_end.png
Normal file
BIN
enemies/leech/segment_end.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3 KiB |
40
enemies/leech/segment_end.png.import
Normal file
40
enemies/leech/segment_end.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
[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
|
||||||
35
enemies/leech/segment_end.tscn
Normal file
35
enemies/leech/segment_end.tscn
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
[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,4 +1,4 @@
|
||||||
[gd_scene load_steps=14 format=3 uid="uid://cxo6bq26huau7"]
|
[gd_scene load_steps=15 format=3 uid="uid://cxo6bq26huau7"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://cmaovvr15b3qk" path="res://player/player.tscn" id="2_1bvp3"]
|
[ext_resource type="PackedScene" uid="uid://cmaovvr15b3qk" path="res://player/player.tscn" id="2_1bvp3"]
|
||||||
[ext_resource type="Texture2D" uid="uid://d3fpq76anm4t7" path="res://world/Background Prototype/Background prototype.png" id="3_kek77"]
|
[ext_resource type="Texture2D" uid="uid://d3fpq76anm4t7" path="res://world/Background Prototype/Background prototype.png" id="3_kek77"]
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
[ext_resource type="PackedScene" uid="uid://ca5ndobertnp4" path="res://water/water.tscn" id="10_4c57u"]
|
[ext_resource type="PackedScene" uid="uid://ca5ndobertnp4" path="res://water/water.tscn" id="10_4c57u"]
|
||||||
[ext_resource type="Script" uid="uid://cpaskpj67pnaj" path="res://enemies/boss/boss_spawner.gd" id="10_efxa6"]
|
[ext_resource type="Script" uid="uid://cpaskpj67pnaj" path="res://enemies/boss/boss_spawner.gd" id="10_efxa6"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cpe4s6vsn0ujd" path="res://enemies/boss/boss.tscn" id="11_efxa6"]
|
[ext_resource type="PackedScene" uid="uid://cpe4s6vsn0ujd" path="res://enemies/boss/boss.tscn" id="11_efxa6"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://5nb7pf8g1ck" path="res://enemies/leech/giant_leech.tscn" id="14_w48qg"]
|
||||||
|
|
||||||
[node name="main" type="Node2D"]
|
[node name="main" type="Node2D"]
|
||||||
|
|
||||||
|
|
@ -88,6 +89,9 @@ texture = ExtResource("3_kek77")
|
||||||
script = ExtResource("10_efxa6")
|
script = ExtResource("10_efxa6")
|
||||||
boss = ExtResource("11_efxa6")
|
boss = ExtResource("11_efxa6")
|
||||||
|
|
||||||
|
[node name="Giant_Leech" parent="." instance=ExtResource("14_w48qg")]
|
||||||
|
position = Vector2(-49, -3162)
|
||||||
|
|
||||||
[connection signal="active_item_changed" from="Player" to="UIOverlay/ItemUI" method="_on_player_active_item_changed"]
|
[connection signal="active_item_changed" from="Player" to="UIOverlay/ItemUI" method="_on_player_active_item_changed"]
|
||||||
[connection signal="health_changed" from="Player" to="UIOverlay/Healthbar" method="_on_player_health_changed"]
|
[connection signal="health_changed" from="Player" to="UIOverlay/Healthbar" method="_on_player_health_changed"]
|
||||||
[connection signal="max_hp_changed" from="Player" to="UIOverlay/Healthbar" method="_on_player_max_hp_changed"]
|
[connection signal="max_hp_changed" from="Player" to="UIOverlay/Healthbar" method="_on_player_max_hp_changed"]
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ var max_hp = 5:
|
||||||
set(new_max_hp):
|
set(new_max_hp):
|
||||||
max_hp = new_max_hp
|
max_hp = new_max_hp
|
||||||
max_hp_changed.emit(max_hp)
|
max_hp_changed.emit(max_hp)
|
||||||
var hit_invulnerability = 0.5
|
var hit_invulnerability = 0.8
|
||||||
var inv_time = 0;
|
var inv_time = 0;
|
||||||
var dead = false;
|
var dead = false;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue