diff --git a/.DS_Store b/.DS_Store index 6866fca..293e264 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e79812c..c8038f0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,5 +1,3 @@ -# This is a basic workflow to help you get started with Actions - name: CI # Controls when the action will run. @@ -28,6 +26,14 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: + - name: Build Release + if: env.GITHUB_EVENT_NAME == 'push' + run: echo "BUILD_TYPE=release" >> $GITHUB_ENV + + - name: Build Debug/Beta + if: env.GITHUB_EVENT_NAME == 'pull_request' + run: echo "BUILD_TYPE=debug" >> $GITHUB_ENV + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v2 name: Checkout Files @@ -57,10 +63,11 @@ jobs: mkdir -v -p build/web EXPORT_DIR="$(readlink -f build)" cd $GITHUB_WORKSPACE - /usr/bin/godot --headless --verbose --export-release "Web" "$EXPORT_DIR/web/index.html" + /usr/bin/godot --headless --verbose --export-${{ env.BUILD_TYPE }} "Web" "$EXPORT_DIR/web/index.html" - name: Upload Build uses: https://code.forgejo.org/forgejo/upload-artifact@v4 + id: upload-build with: name: Web Build path: build/web diff --git a/1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0366.png b/1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_p.png similarity index 100% rename from 1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0366.png rename to 1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_p.png diff --git a/1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0366.png.import b/1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_p.png.import similarity index 69% rename from 1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0366.png.import rename to 1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_p.png.import index 15759ee..00479ef 100644 --- a/1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0366.png.import +++ b/1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_p.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://cpjtncjaomqwm" -path="res://.godot/imported/tile_0366.png-edb08678f52d381824bd466af55fc5c0.ctex" +path="res://.godot/imported/prompt_p.png-9bae51d7552c94969996b613509af9e3.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0366.png" -dest_files=["res://.godot/imported/tile_0366.png-edb08678f52d381824bd466af55fc5c0.ctex"] +source_file="res://1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_p.png" +dest_files=["res://.godot/imported/prompt_p.png-9bae51d7552c94969996b613509af9e3.ctex"] [params] diff --git a/Entagon.gd b/Entagon.gd index b4e729a..9ddafe9 100644 --- a/Entagon.gd +++ b/Entagon.gd @@ -8,7 +8,7 @@ func hit(body): body.destroy() else: body.queue_free() - spawn_explosion() + spawn_explosion() queue_free() if body.name == "Border": queue_free() @@ -21,4 +21,4 @@ func spawn_explosion(): # Called every frame. 'delta' is the elapsed time since the previous frame. func _physics_process(delta): - apply_central_force((global_position - (player.global_position + player.linear_velocity * 3)).normalized() * -1200) + apply_central_force((global_position - player.global_position).normalized() * -1400) diff --git a/Shield.gd b/Shield.gd deleted file mode 100644 index 3ad1fe5..0000000 --- a/Shield.gd +++ /dev/null @@ -1,18 +0,0 @@ -extends StaticBody2D - -@export var health = 10 -var max_health = 10.0 - -func destroy(): - health -= 1 - - if health == 1: - $PowerDownFX.play() - - if health <= 0: - if not is_queued_for_deletion(): - $"..".queue_free() - $"../../Player".aquire_exagon() - - modulate = Color(Color.CYAN, 0.7 - lerp(0.7, 0.1, health / max_health)) - diff --git a/Spawner.gd b/Spawner.gd index 59af8f7..de62d4c 100644 --- a/Spawner.gd +++ b/Spawner.gd @@ -45,6 +45,8 @@ func spawn_loop(): func spawn_enemies(count: int, duration: float, enemy: WaveEnemy): var delay = duration / count for i in range(count): + if get_tree().paused: + await get_parent().unpaused spawn(enemy) await get_tree().create_timer(delay).timeout @@ -56,7 +58,7 @@ func spawn(item: WaveEnemy): print("Spawning Boss!") spawn_loc = Vector2(1920/2, 1080/2) else: - for i in range(100): + for i in range(1000): var test_pos = Vector2(randf(), randf()) * Vector2(1920, 1080) if not $"../CollisionCheck".is_clear(test_pos, item.check_distance): continue diff --git a/bullet.gd b/bullet.gd index 6b54bf3..8f3a48f 100644 --- a/bullet.gd +++ b/bullet.gd @@ -21,6 +21,7 @@ func hit(body): queue_free() else: bounces += 1 + $Sprite2D.play("depleted") #print(bounces) if bounces >= 2: diff --git a/bullet.tscn b/bullet.tscn index 45568ea..94c210d 100644 --- a/bullet.tscn +++ b/bullet.tscn @@ -20,11 +20,11 @@ region = Rect2(0, 0, 40, 40) atlas = ExtResource("2_unua3") region = Rect2(40, 0, 40, 40) -[sub_resource type="AtlasTexture" id="AtlasTexture_u3ov1"] +[sub_resource type="AtlasTexture" id="AtlasTexture_m7c0a"] atlas = ExtResource("2_unua3") region = Rect2(80, 0, 40, 40) -[sub_resource type="AtlasTexture" id="AtlasTexture_ia1sw"] +[sub_resource type="AtlasTexture" id="AtlasTexture_uq6kd"] atlas = ExtResource("2_unua3") region = Rect2(120, 0, 40, 40) @@ -36,27 +36,32 @@ animations = [{ }, { "duration": 1.0, "texture": SubResource("AtlasTexture_ldqff") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_u3ov1") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_ia1sw") }], "loop": true, "name": &"default", "speed": 7.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_m7c0a") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_uq6kd") +}], +"loop": true, +"name": &"depleted", +"speed": 5.0 }] [sub_resource type="CircleShape2D" id="CircleShape2D_13gk7"] radius = 30.0 -[node name="Bullet" type="RigidBody2D" groups=["bullet"]] +[node name="Bullet" type="RigidBody2D" groups=["bullet", "destructible"]] collision_layer = 2 physics_material_override = SubResource("PhysicsMaterial_xnhwp") gravity_scale = 1.66533e-16 -max_contacts_reported = 1 contact_monitor = true +max_contacts_reported = 1 linear_velocity = Vector2(2.08165e-12, 2.08165e-12) script = ExtResource("1_3q13i") @@ -70,7 +75,10 @@ position = Vector2(-0.0234375, -0.00781251) rotation = 1.5708 scale = Vector2(4, 4) sprite_frames = SubResource("SpriteFrames_pacu6") +animation = &"depleted" autoplay = "default" +frame = 1 +frame_progress = 0.323082 offset = Vector2(7.05637, 10.7826) [node name="TrajectoryDisplay" type="Line2D" parent="."] diff --git a/eart.gd b/eart.gd index ebffe73..7ebf226 100644 --- a/eart.gd +++ b/eart.gd @@ -16,7 +16,7 @@ func shoot(): $Turret.target = find_target() - $ShootTimer.start(1) + #$ShootTimer.start(1) func find_target(): diff --git a/eart.tres b/eart.tres index 886e17f..ba101e4 100644 --- a/eart.tres +++ b/eart.tres @@ -9,4 +9,4 @@ script = ExtResource("1_0iu7m") enemy = ExtResource("1_hy2xe") boss = false portal_texture = ExtResource("2_nxpif") -check_distance = 100 +check_distance = 150 diff --git a/eart.tscn b/eart.tscn index 9d700f2..6541a8f 100644 --- a/eart.tscn +++ b/eart.tscn @@ -140,7 +140,6 @@ radius = 44.1475 script = ExtResource("1_xkxbf") [node name="ShootTimer" type="Timer" parent="."] -one_shot = true autostart = true [node name="Turret" type="Node2D" parent="."] diff --git a/entagon.tscn b/entagon.tscn index 8106dd9..139d3ce 100644 --- a/entagon.tscn +++ b/entagon.tscn @@ -65,9 +65,9 @@ radius = 30.0 collision_mask = 0 physics_material_override = SubResource("PhysicsMaterial_odemo") gravity_scale = 1.66533e-16 -max_contacts_reported = 2 contact_monitor = true -linear_damp = 3.0 +max_contacts_reported = 2 +linear_damp = 2.0 angular_velocity = 0.174533 script = ExtResource("1_726g8") @@ -100,4 +100,7 @@ target_shield = true shape = SubResource("CircleShape2D_eo18f") target_position = Vector2(2.08165e-12, 500) +[node name="ShieldMarker" type="Marker2D" parent="."] +scale = Vector2(1.5, 1.5) + [connection signal="body_entered" from="." to="." method="hit"] diff --git a/entagon_enemy.tres b/entagon_enemy.tres index a1d3fbc..bae3c74 100644 --- a/entagon_enemy.tres +++ b/entagon_enemy.tres @@ -9,4 +9,4 @@ script = ExtResource("3_t4kaf") enemy = ExtResource("1_mfudl") boss = false portal_texture = ExtResource("2_2xm8e") -check_distance = 250 +check_distance = 200 diff --git a/eptagon base.png b/eptagon base.png new file mode 100644 index 0000000..52a42b4 Binary files /dev/null and b/eptagon base.png differ diff --git a/eptagon base.png.import b/eptagon base.png.import new file mode 100644 index 0000000..aa6fc9e --- /dev/null +++ b/eptagon base.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ccbd4o2iasbun" +path="res://.godot/imported/eptagon base.png-f7cfa0569b442888d2d8722ed916ca54.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://eptagon base.png" +dest_files=["res://.godot/imported/eptagon base.png-f7cfa0569b442888d2d8722ed916ca54.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +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/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 diff --git a/eptagon shoot.png b/eptagon shoot.png new file mode 100644 index 0000000..907509d Binary files /dev/null and b/eptagon shoot.png differ diff --git a/eptagon shoot.png.import b/eptagon shoot.png.import new file mode 100644 index 0000000..bbd242e --- /dev/null +++ b/eptagon shoot.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://da478jrss0ira" +path="res://.godot/imported/eptagon shoot.png-5691739fab2bd478303ccc7f4ddc2612.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://eptagon shoot.png" +dest_files=["res://.godot/imported/eptagon shoot.png-5691739fab2bd478303ccc7f4ddc2612.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +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/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 diff --git a/eptagon.gd b/eptagon.gd index d3bbb2f..993581b 100644 --- a/eptagon.gd +++ b/eptagon.gd @@ -1,10 +1,21 @@ extends StaticBody2D +var dying = false + # Called when the node enters the scene tree for the first time. func _ready(): $Turret.target = $"../Player" #print($Turret.target) +func destroy(): + if dying: + return + dying = true + var explosion = load("res://explosion.tscn").instantiate() + $"/root/Node2D".add_child(explosion) + explosion.global_position = global_position + await get_tree().create_timer(0.2).timeout + queue_free() # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta): diff --git a/eptagon.tscn b/eptagon.tscn index 233b17b..3cdc55e 100644 --- a/eptagon.tscn +++ b/eptagon.tscn @@ -1,39 +1,60 @@ -[gd_scene load_steps=12 format=3 uid="uid://bda763f0fxh5k"] +[gd_scene load_steps=15 format=3 uid="uid://bda763f0fxh5k"] [ext_resource type="Script" path="res://eptagon.gd" id="1_d0pdl"] -[ext_resource type="Texture2D" uid="uid://d4f0f3ggnd3rl" path="res://eptagon.png" id="1_kwkxh"] [ext_resource type="Script" path="res://Turret.gd" id="2_6tkha"] +[ext_resource type="Texture2D" uid="uid://ccbd4o2iasbun" path="res://eptagon base.png" id="2_ook2g"] [ext_resource type="Script" path="res://Gun.gd" id="2_sea5o"] -[ext_resource type="Texture2D" uid="uid://d1wxsdwad10p6" path="res://eptagon-turret.png" id="3_jhgw8"] [ext_resource type="PackedScene" uid="uid://c6ybtahxwpukd" path="res://bullet.tscn" id="4_cyd7j"] +[ext_resource type="Texture2D" uid="uid://da478jrss0ira" path="res://eptagon shoot.png" id="4_unb6p"] -[sub_resource type="AtlasTexture" id="AtlasTexture_1fcnk"] -atlas = ExtResource("3_jhgw8") -region = Rect2(0, 0, 32, 32) +[sub_resource type="AtlasTexture" id="AtlasTexture_ynjjr"] +atlas = ExtResource("4_unb6p") +region = Rect2(0, 0, 128, 128) -[sub_resource type="AtlasTexture" id="AtlasTexture_hhi7e"] -atlas = ExtResource("3_jhgw8") -region = Rect2(32, 0, 32, 32) +[sub_resource type="AtlasTexture" id="AtlasTexture_7lu72"] +atlas = ExtResource("4_unb6p") +region = Rect2(128, 0, 128, 128) -[sub_resource type="AtlasTexture" id="AtlasTexture_lo0cp"] -atlas = ExtResource("3_jhgw8") -region = Rect2(0, 32, 32, 32) +[sub_resource type="AtlasTexture" id="AtlasTexture_i6mfs"] +atlas = ExtResource("4_unb6p") +region = Rect2(256, 0, 128, 128) + +[sub_resource type="AtlasTexture" id="AtlasTexture_g3rpy"] +atlas = ExtResource("4_unb6p") +region = Rect2(384, 0, 128, 128) + +[sub_resource type="AtlasTexture" id="AtlasTexture_4lb8x"] +atlas = ExtResource("4_unb6p") +region = Rect2(512, 0, 128, 128) + +[sub_resource type="AtlasTexture" id="AtlasTexture_bkh2l"] +atlas = ExtResource("4_unb6p") +region = Rect2(640, 0, 128, 128) [sub_resource type="SpriteFrames" id="SpriteFrames_1fj5a"] animations = [{ "frames": [{ "duration": 1.0, -"texture": SubResource("AtlasTexture_1fcnk") +"texture": SubResource("AtlasTexture_ynjjr") }, { "duration": 1.0, -"texture": SubResource("AtlasTexture_hhi7e") +"texture": SubResource("AtlasTexture_7lu72") }, { "duration": 1.0, -"texture": SubResource("AtlasTexture_lo0cp") +"texture": SubResource("AtlasTexture_i6mfs") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_g3rpy") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_4lb8x") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_bkh2l") }], "loop": true, "name": &"default", -"speed": 3.0 +"speed": 7.0 }] [sub_resource type="CircleShape2D" id="CircleShape2D_03ifk"] @@ -43,18 +64,18 @@ radius = 36.0139 script = ExtResource("1_d0pdl") [node name="Sprite2D" type="Sprite2D" parent="."] -scale = Vector2(3, 3) -texture = ExtResource("1_kwkxh") +position = Vector2(1, 5) +texture = ExtResource("2_ook2g") [node name="Turret" type="Node2D" parent="."] script = ExtResource("2_6tkha") [node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="Turret"] -position = Vector2(14, 0) +position = Vector2(5, 0) rotation = -1.5708 -scale = Vector2(3, 3) sprite_frames = SubResource("SpriteFrames_1fj5a") autoplay = "default" +frame_progress = 0.726849 [node name="Gun" type="Marker2D" parent="Turret"] position = Vector2(56, 0) @@ -64,4 +85,7 @@ bullet = ExtResource("4_cyd7j") [node name="Collider" type="CollisionShape2D" parent="."] shape = SubResource("CircleShape2D_03ifk") +[node name="ShieldMarker" type="Marker2D" parent="."] +scale = Vector2(2, 2) + [connection signal="animation_looped" from="Turret/AnimatedSprite2D" to="Turret/Gun" method="shoot"] diff --git a/main.gd b/main.gd index 88d0c28..622b378 100644 --- a/main.gd +++ b/main.gd @@ -1,11 +1,14 @@ extends Node2D var config = ConfigFile.new() +signal paused +signal unpaused + # Called when the node enters the scene tree for the first time. func _init(): if OS.is_debug_build(): - Engine.set_time_scale(0.25) + Engine.set_time_scale(1) if config.load("user://settings.cfg") == OK: var player = load(config.get_value("gameplay", "class", "res://player-row.tscn")).instantiate() diff --git a/main.tscn b/main.tscn index 0300133..02619d5 100644 --- a/main.tscn +++ b/main.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=117 format=3 uid="uid://bmd4m7lqj4v0x"] +[gd_scene load_steps=121 format=3 uid="uid://bmd4m7lqj4v0x"] [ext_resource type="Script" path="res://main.gd" id="1_3dydx"] [ext_resource type="Script" path="res://Spawner.gd" id="1_ifu8g"] @@ -12,15 +12,16 @@ [ext_resource type="Texture2D" uid="uid://yvrhlh04k8w1" path="res://background space.png" id="6_yg4g1"] [ext_resource type="Script" path="res://wave_enemy.gd" id="7_54h7d"] [ext_resource type="Texture2D" uid="uid://cwquv3mq5kk1d" path="res://countdown-spritesheet.png" id="8_e1eub"] -[ext_resource type="Resource" uid="uid://dd8me0deake37" path="res://eptagon_enemy.tres" id="9_q67ak"] +[ext_resource type="Resource" uid="uid://ba01r62bwm6av" path="res://eptagon_enemy.tres" id="9_q67ak"] [ext_resource type="Resource" uid="uid://c805aej5v7cvr" path="res://eart.tres" id="10_jib8h"] [ext_resource type="AudioStream" uid="uid://dn65uapn0wsok" path="res://impactMetal_002.ogg" id="11_acuni"] [ext_resource type="Script" path="res://CollisionCheck.gd" id="11_ryeyk"] [ext_resource type="FontFile" uid="uid://bnguin7bsyx6e" path="res://Kenney Future.ttf" id="11_s4q6p"] -[ext_resource type="Texture2D" uid="uid://bvpoajwx0yw3y" path="res://Circle.png" id="13_318fy"] +[ext_resource type="Texture2D" uid="uid://cso5ufbf7u7oj" path="res://Circle.png" id="13_318fy"] [ext_resource type="Script" path="res://Notification.gd" id="13_lkv81"] [ext_resource type="Script" path="res://Stopwatch.gd" id="13_xhnp2"] [ext_resource type="Script" path="res://Leaderboard.gd" id="14_v1elq"] +[ext_resource type="Script" path="res://pause_game.gd" id="16_bto6x"] [ext_resource type="FontFile" uid="uid://bpcp43g74vhgo" path="res://monogram-extended.ttf" id="16_s4rjt"] [ext_resource type="PackedScene" uid="uid://4sdwatj6up8i" path="res://tar.tscn" id="19_8258f"] [ext_resource type="AudioStream" uid="uid://b8soxqg0jquqg" path="res://Flow State 2.ogg" id="21_7hdkm"] @@ -129,12 +130,36 @@ wait_for_killed = true [sub_resource type="Resource" id="Resource_2j32b"] script = ExtResource("4_um0x7") -enemies = Array[ExtResource("7_54h7d")]([ExtResource("5_e24vf"), ExtResource("9_q67ak")]) -quantities = Array[int]([2, 2]) +enemies = Array[ExtResource("7_54h7d")]([ExtResource("5_xdrk0"), ExtResource("9_q67ak"), ExtResource("10_jib8h")]) +quantities = Array[int]([2, 2, 1]) spawning_duration = 10.0 wait = 3.0 wait_for_killed = true +[sub_resource type="Resource" id="Resource_viqo8"] +script = ExtResource("4_um0x7") +enemies = Array[ExtResource("7_54h7d")]([ExtResource("5_xdrk0"), ExtResource("9_q67ak"), ExtResource("10_jib8h")]) +quantities = Array[int]([15, 3, 4]) +spawning_duration = 30.0 +wait = 10.0 +wait_for_killed = true + +[sub_resource type="Resource" id="Resource_o3j5s"] +script = ExtResource("4_um0x7") +enemies = Array[ExtResource("7_54h7d")]([ExtResource("5_e24vf"), ExtResource("3_xmk5u"), ExtResource("10_jib8h")]) +quantities = Array[int]([5, 5, 3]) +spawning_duration = 20.0 +wait = 5.0 +wait_for_killed = true + +[sub_resource type="Resource" id="Resource_cygv1"] +script = ExtResource("4_um0x7") +enemies = Array[ExtResource("7_54h7d")]([ExtResource("5_e24vf"), ExtResource("10_jib8h"), ExtResource("3_xmk5u"), ExtResource("5_xdrk0"), ExtResource("9_q67ak")]) +quantities = Array[int]([5, 5, 10, 15, 5]) +spawning_duration = 30.0 +wait = 1.0 +wait_for_killed = true + [sub_resource type="RectangleShape2D" id="RectangleShape2D_7w8g6"] size = Vector2(328, 185.333) @@ -668,9 +693,8 @@ script = ExtResource("1_3dydx") [node name="Spawner" type="Node2D" parent="." node_paths=PackedStringArray("wave_label")] script = ExtResource("1_ifu8g") -waves = Array[ExtResource("4_um0x7")]([SubResource("Resource_ur7l5"), SubResource("Resource_kupyp"), SubResource("Resource_o8cet"), SubResource("Resource_0cevq"), SubResource("Resource_eppj0"), SubResource("Resource_rpu1y"), SubResource("Resource_4b1vo"), SubResource("Resource_gg7kj"), SubResource("Resource_fjkob"), SubResource("Resource_5sdy5"), SubResource("Resource_61v84"), SubResource("Resource_82qld"), SubResource("Resource_2j32b")]) +waves = Array[ExtResource("4_um0x7")]([SubResource("Resource_ur7l5"), SubResource("Resource_kupyp"), SubResource("Resource_o8cet"), SubResource("Resource_0cevq"), SubResource("Resource_eppj0"), SubResource("Resource_rpu1y"), SubResource("Resource_4b1vo"), SubResource("Resource_gg7kj"), SubResource("Resource_fjkob"), SubResource("Resource_5sdy5"), SubResource("Resource_61v84"), SubResource("Resource_82qld"), SubResource("Resource_2j32b"), SubResource("Resource_viqo8"), SubResource("Resource_o3j5s"), SubResource("Resource_cygv1")]) wave_label = NodePath("../UI/Wave Count") -start_wave = 8 [node name="Timer" type="Timer" parent="Spawner"] wait_time = 0.1 @@ -736,6 +760,35 @@ position = Vector2(1920, 540) rotation = -1.5708 shape = SubResource("WorldBoundaryShape2D_rmvst") +[node name="PauseButton" type="ColorRect" parent="."] +process_mode = 3 +visible = false +z_index = 1000 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_right = 1920.0 +offset_bottom = 1080.0 +grow_horizontal = 2 +grow_vertical = 2 +color = Color(0, 0, 0, 0.466667) +script = ExtResource("16_bto6x") + +[node name="Label" type="Label" parent="PauseButton"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_fonts/font = ExtResource("11_s4q6p") +theme_override_font_sizes/font_size = 100 +text = "PAUSED" +horizontal_alignment = 1 +vertical_alignment = 1 + [node name="UI" type="Control" parent="."] z_index = 10 layout_mode = 3 diff --git a/main_menu.tscn b/main_menu.tscn index 37e837c..7e447e5 100644 --- a/main_menu.tscn +++ b/main_menu.tscn @@ -161,7 +161,6 @@ text = "Movement " layout_mode = 2 theme_override_fonts/font = ExtResource("4_ybv7t") theme_override_font_sizes/font_size = 54 -selected = 0 item_count = 2 popup/item_0/text = "Relative" popup/item_1/text = "Absolute" @@ -179,7 +178,6 @@ text = "CLASS" layout_mode = 2 theme_override_fonts/font = ExtResource("4_ybv7t") theme_override_font_sizes/font_size = 54 -selected = 0 item_count = 3 popup/item_0/text = "Row" popup/item_1/text = "Ite" @@ -325,8 +323,8 @@ bus = &"Music" [connection signal="pressed" from="Layout/Play" to="." method="play"] [connection signal="pressed" from="Layout/Settings" to="Settings Panel" method="show"] [connection signal="pressed" from="Layout/Tutorial" to="Tutorial Text" method="show"] -[connection signal="pressed" from="Settings Panel/Close" to="Settings Panel" method="save"] [connection signal="pressed" from="Settings Panel/Close" to="Settings Panel" method="hide"] +[connection signal="pressed" from="Settings Panel/Close" to="Settings Panel" method="save"] [connection signal="text_changed" from="Settings Panel/Menu/Username" to="Settings Panel" method="check_valid"] [connection signal="text_changed" from="Settings Panel/Menu/Username" to="Settings Panel/Menu/Username" method="check"] [connection signal="value_changed" from="Settings Panel/Menu/MusicVolume" to="Settings Panel/Menu/MusicVolume" method="_on_value_changed"] diff --git a/pause_game.gd b/pause_game.gd new file mode 100644 index 0000000..e77d83a --- /dev/null +++ b/pause_game.gd @@ -0,0 +1,11 @@ +extends Control + +func _input(event): + if event.is_action_pressed("pause"): + get_tree().paused = not get_tree().paused + visible = not visible + if get_tree().paused: + get_parent().paused.emit() + else: + get_parent().unpaused.emit() + diff --git a/player-iamond.gd b/player-iamond.gd index 531da0a..0253bf9 100644 --- a/player-iamond.gd +++ b/player-iamond.gd @@ -10,7 +10,7 @@ func _ready(): absolute_movement = not config.get_value("config", "relative_controls") func _input(event): - if event.is_action_pressed("jump") and can_jump: + if event.is_action_pressed("primary_fire") and can_jump: can_jump = false $"../".get_node("%Ability/Portal").start_countup(0.5) $Sprite.speed_scale = 1 diff --git a/player-ite.gd b/player-ite.gd index 75aa6a5..ddcca2b 100644 --- a/player-ite.gd +++ b/player-ite.gd @@ -21,7 +21,7 @@ func update_animation(): $Engine.play("idle") func _input(event): - if event.is_action_pressed("shoot") and speed != 0: + if event.is_action_pressed("primary_fire") and speed != 0: fire_laser() func _process(delta): @@ -46,7 +46,7 @@ func fire_laser(): tween.set_parallel(false) tween.tween_callback(set_laser_texture.bind(active_texture)) tween.tween_property(self, "can_damage", true, 0) - tween.tween_interval(0.5) + tween.tween_interval(0.25) tween.tween_property(self, "can_damage", false, 0) tween.tween_callback(set_laser_texture.bind(aiming_texture)) tween.set_parallel(true) diff --git a/player-row.gd b/player-row.gd index 0707f74..80db79a 100644 --- a/player-row.gd +++ b/player-row.gd @@ -20,7 +20,7 @@ func _ready(): absolute_movement = not config.get_value("config", "relative_controls") func _input(event): - if event.is_action_pressed("quare"): + if event.is_action_pressed("primary_fire"): if num_quares >= max_quares: notifier.notify("All Quares in Use!") return @@ -37,7 +37,7 @@ func _input(event): new_quare.position = get_global_mouse_position() $/root/Node2D.add_child(new_quare) new_quare.name = "Quare" - if event.is_action_pressed("exagon"): + if event.is_action_pressed("secondary_fire"): if exagons > 1: exagons = 1 if exagons <= 0: diff --git a/player-row.tscn b/player-row.tscn index 6faa3c8..ef435b8 100644 --- a/player-row.tscn +++ b/player-row.tscn @@ -207,5 +207,4 @@ stream = ExtResource("4_lwgj5") bus = &"SFX" [node name="ShieldMarker" type="Marker2D" parent="." index="5"] -position = Vector2(4, 0) scale = Vector2(1.5, 1.5) diff --git a/player-shield.gd b/player-shield.gd new file mode 100644 index 0000000..dd0c732 --- /dev/null +++ b/player-shield.gd @@ -0,0 +1,4 @@ +extends CollisionShape2D + +func destroy(): + $AnimatedSprite2D.play("die") diff --git a/player-shield.tscn b/player-shield.tscn new file mode 100644 index 0000000..6746af2 --- /dev/null +++ b/player-shield.tscn @@ -0,0 +1,125 @@ +[gd_scene load_steps=19 format=3 uid="uid://b11jmnjkk6ibm"] + +[ext_resource type="Script" path="res://player-shield.gd" id="1_wq4q6"] +[ext_resource type="Texture2D" uid="uid://cc3nl13t7c4mj" path="res://eart-shield.png" id="2_iu5tn"] +[ext_resource type="Texture2D" uid="uid://dysewmpj8nvgx" path="res://eart-shield-break.png" id="3_yw3j3"] + +[sub_resource type="CircleShape2D" id="CircleShape2D_0lade"] +radius = 24.3425 + +[sub_resource type="AtlasTexture" id="AtlasTexture_mcb3o"] +atlas = ExtResource("2_iu5tn") +region = Rect2(0, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_l8lnp"] +atlas = ExtResource("2_iu5tn") +region = Rect2(64, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_so4um"] +atlas = ExtResource("2_iu5tn") +region = Rect2(128, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_sel7y"] +atlas = ExtResource("2_iu5tn") +region = Rect2(192, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_iumxh"] +atlas = ExtResource("2_iu5tn") +region = Rect2(256, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_jb6hd"] +atlas = ExtResource("2_iu5tn") +region = Rect2(320, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_5xoy6"] +atlas = ExtResource("2_iu5tn") +region = Rect2(384, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_a5ids"] +atlas = ExtResource("3_yw3j3") +region = Rect2(0, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_x2842"] +atlas = ExtResource("3_yw3j3") +region = Rect2(64, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ckp3b"] +atlas = ExtResource("3_yw3j3") +region = Rect2(128, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_b6w7a"] +atlas = ExtResource("3_yw3j3") +region = Rect2(192, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_m7ilu"] +atlas = ExtResource("3_yw3j3") +region = Rect2(256, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_w1mec"] +atlas = ExtResource("3_yw3j3") +region = Rect2(320, 0, 64, 64) + +[sub_resource type="SpriteFrames" id="SpriteFrames_gcmwu"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_mcb3o") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_l8lnp") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_so4um") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_sel7y") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_iumxh") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_jb6hd") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_5xoy6") +}], +"loop": true, +"name": &"default", +"speed": 7.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_a5ids") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_x2842") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ckp3b") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_b6w7a") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_m7ilu") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_w1mec") +}], +"loop": false, +"name": &"die", +"speed": 7.0 +}] + +[node name="Shield" type="CollisionShape2D" groups=["destructible"]] +scale = Vector2(3, 3) +shape = SubResource("CircleShape2D_0lade") +script = ExtResource("1_wq4q6") + +[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] +sprite_frames = SubResource("SpriteFrames_gcmwu") +autoplay = "default" +frame = 4 +frame_progress = 0.495833 + +[connection signal="animation_finished" from="AnimatedSprite2D" to="." method="queue_free"] diff --git a/player.gd b/player.gd index edd0bbf..3785928 100644 --- a/player.gd +++ b/player.gd @@ -27,10 +27,10 @@ func _physics_process(delta): return var move_input = Input.get_axis("down", "up") var side_input = Input.get_axis("right", "left") - if move_input > 0 and not moving: + if move_input != 0 or side_input != 0: moving = true update_animation() - elif move_input <= 0 and moving: + else: moving = false update_animation() @@ -40,6 +40,9 @@ func _physics_process(delta): apply_central_force(transform.y * side_input * speed / -2 + transform.x * move_input * speed * linear_damp) func destroy(): + if has_node("Shield"): + $Shield.destroy() + return $DeathFX.play() get_tree().paused = true $"../GameOver".visible = true diff --git a/portal-ability.tscn b/portal-ability.tscn index d6d30be..dcb35a9 100644 --- a/portal-ability.tscn +++ b/portal-ability.tscn @@ -1,9 +1,8 @@ -[gd_scene load_steps=6 format=3 uid="uid://bl3178jc8lq1x"] +[gd_scene load_steps=5 format=3 uid="uid://bl3178jc8lq1x"] [ext_resource type="PackedScene" uid="uid://d2xigwib6hka4" path="res://quare_ability.tscn" id="1_ttx3n"] [ext_resource type="Texture2D" uid="uid://dgd2mofq75e01" path="res://portal-icon.png" id="2_2epev"] [ext_resource type="Shader" uid="uid://c2p7rwspwqmr8" path="res://greyscale.tres" id="2_s8u32"] -[ext_resource type="Texture2D" uid="uid://dux6o222ain2r" path="res://1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_mouse.png" id="4_kefbp"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_ia5nv"] resource_local_to_scene = true @@ -13,10 +12,3 @@ shader_parameter/strength = null [node name="Portal" instance=ExtResource("1_ttx3n")] material = SubResource("ShaderMaterial_ia5nv") texture_under = ExtResource("2_2epev") - -[node name="prompt" parent="." index="0"] -offset_left = -20.0 -offset_top = 3.0 -offset_right = 20.0 -offset_bottom = 43.0 -texture = ExtResource("4_kefbp") diff --git a/project.godot b/project.godot index e13206e..f8386a5 100644 --- a/project.godot +++ b/project.godot @@ -64,31 +64,28 @@ restart={ "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":82,"key_label":0,"unicode":114,"location":0,"echo":false,"script":null) ] } -jump={ -"deadzone": 0.5, -"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":1,"position":Vector2(130, 40),"global_position":Vector2(138, 120),"factor":1.0,"button_index":1,"canceled":false,"pressed":true,"double_click":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null) -] -} -quare={ -"deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":81,"key_label":0,"unicode":113,"location":0,"echo":false,"script":null) -] -} -exagon={ -"deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":69,"key_label":0,"unicode":101,"location":0,"echo":false,"script":null) -] -} quit={ "deadzone": 0.5, "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194305,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) ] } -shoot={ +primary_fire={ "deadzone": 0.5, "events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":1,"position":Vector2(91, 32),"global_position":Vector2(99, 112),"factor":1.0,"button_index":1,"canceled":false,"pressed":true,"double_click":false,"script":null) , Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":81,"key_label":0,"unicode":113,"location":0,"echo":false,"script":null) +] +} +secondary_fire={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":81,"key_label":0,"unicode":113,"location":0,"echo":false,"script":null) +, Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":2,"canceled":false,"pressed":false,"double_click":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194325,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +] +} +pause={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":80,"key_label":0,"unicode":112,"location":0,"echo":false,"script":null) ] } diff --git a/quare_ability.tscn b/quare_ability.tscn index 12b65f5..4dde334 100644 --- a/quare_ability.tscn +++ b/quare_ability.tscn @@ -1,10 +1,9 @@ -[gd_scene load_steps=8 format=3 uid="uid://d2xigwib6hka4"] +[gd_scene load_steps=7 format=3 uid="uid://d2xigwib6hka4"] [ext_resource type="Texture2D" uid="uid://ba2tcipuc8rdi" path="res://quare 2.png" id="1_thx02"] [ext_resource type="Shader" uid="uid://c2p7rwspwqmr8" path="res://greyscale.tres" id="1_unkpb"] [ext_resource type="Texture2D" uid="uid://barlie6sierj" path="res://square.png" id="2_odtey"] [ext_resource type="Script" path="res://RechargeProgress.gd" id="3_gufwx"] -[ext_resource type="Texture2D" uid="uid://cqxvhnxgi4k7" path="res://1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0357.png" id="5_isqlk"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_5a8v0"] resource_local_to_scene = true @@ -30,18 +29,3 @@ texture_progress = ExtResource("2_odtey") texture_progress_offset = Vector2(2.08165e-12, 2.08165e-12) tint_progress = Color(0, 0, 0, 0.443137) script = ExtResource("3_gufwx") - -[node name="prompt" type="TextureRect" parent="."] -self_modulate = Color(1, 1, 1, 0.552941) -layout_mode = 1 -anchors_preset = 7 -anchor_left = 0.5 -anchor_top = 1.0 -anchor_right = 0.5 -anchor_bottom = 1.0 -offset_left = -17.0 -offset_right = 23.0 -offset_bottom = 40.0 -grow_horizontal = 2 -grow_vertical = 0 -texture = ExtResource("5_isqlk") diff --git a/riangle.tscn b/riangle.tscn index 057f708..9c24a59 100644 --- a/riangle.tscn +++ b/riangle.tscn @@ -66,7 +66,7 @@ animations = [{ }], "loop": true, "name": &"default", -"speed": 10.0 +"speed": 5.0 }] [node name="Riangle" type="StaticBody2D" groups=["destructible", "enemy"]] @@ -80,6 +80,8 @@ rotation = 1.5708 scale = Vector2(5.50033, 5.50033) sprite_frames = SubResource("SpriteFrames_p5dvv") autoplay = "default" +frame = 6 +frame_progress = 0.850246 [node name="Gun2" type="Marker2D" parent="."] position = Vector2(-224, 284) @@ -99,7 +101,7 @@ script = ExtResource("3_kffl0") bullet = ExtResource("4_tfncc") [node name="Timer" type="Timer" parent="."] -wait_time = 3.0 +wait_time = 1.5 autostart = true [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."] diff --git a/shield.gd b/shield.gd index c37ac2a..18aa90d 100644 --- a/shield.gd +++ b/shield.gd @@ -13,7 +13,7 @@ func _ready() -> void: if find_collisionshape(): print(find_collisionshape().get_parent().name) find_collisionshape().set_deferred("disabled", true) - #$Collider.set_deferred("disabled", false) + $Collider.set_deferred("disabled", false) func destroy(): if find_collisionshape(): diff --git a/shield.tscn b/shield.tscn index 1b8347c..7edd12e 100644 --- a/shield.tscn +++ b/shield.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=19 format=3 uid="uid://c3s8as813frjc"] -[ext_resource type="Script" path="res://shield.gd" id="1_ni0ln"] +[ext_resource type="Script" path="res://shield.gd" id="1_v4v4e"] [ext_resource type="Texture2D" uid="uid://cc3nl13t7c4mj" path="res://eart-shield.png" id="2_2bt8h"] [ext_resource type="Texture2D" uid="uid://dysewmpj8nvgx" path="res://eart-shield-break.png" id="3_1tta6"] @@ -111,9 +111,9 @@ animations = [{ [sub_resource type="CircleShape2D" id="CircleShape2D_00lvq"] radius = 25.1794 -[node name="Shield" type="AnimatableBody2D" groups=["destructible"]] -scale = Vector2(3, 3) -script = ExtResource("1_ni0ln") +[node name="Shield" type="StaticBody2D" groups=["destructible"]] +scale = Vector2(3.5, 3.5) +script = ExtResource("1_v4v4e") [node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] sprite_frames = SubResource("SpriteFrames_gcmwu") @@ -123,5 +123,6 @@ autoplay = "default" [node name="Collider" type="CollisionShape2D" parent="."] position = Vector2(-1, 0) shape = SubResource("CircleShape2D_00lvq") +disabled = true [connection signal="animation_finished" from="AnimatedSprite2D" to="." method="queue_free"] diff --git a/shield_bullet.gd b/shield_bullet.gd index b76dc5a..a315d78 100644 --- a/shield_bullet.gd +++ b/shield_bullet.gd @@ -3,6 +3,7 @@ extends RigidBody2D @onready var player = $"../Player" var shield_scene = preload("res://shield.tscn") +var player_shield = preload("res://player-shield.tscn") func _physics_process(delta): rotation = linear_velocity.angle() @@ -14,8 +15,23 @@ func hit(body): var shield = shield_scene.instantiate() + if body.has_node("Shield"): + queue_free() + return - if body.has_node("ShieldMarker"): + if body.name == "Player": + shield = player_shield.instantiate() + var marker = body.get_node("ShieldMarker") + + shield.position = marker.position + shield.scale = marker.scale + + body.add_child(shield) + + elif body.has_node("ShieldMarker"): + if body.get_node("ShieldMarker").has_node("Shield"): + queue_free() + return shield.scale = Vector2.ONE body.get_node("ShieldMarker").add_child(shield) else: