diff --git a/1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_a.png.import b/1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_a.png.import deleted file mode 100644 index fc81e90..0000000 --- a/1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_a.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://bikv7jgvwhcoy" -path="res://.godot/imported/prompt_a.png-97a05cf566b76ae895476618e8c733dc.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_a.png" -dest_files=["res://.godot/imported/prompt_a.png-97a05cf566b76ae895476618e8c733dc.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/1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_r.png.import b/1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_r.png.import deleted file mode 100644 index df2289d..0000000 --- a/1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_r.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://b664lyfilq1kw" -path="res://.godot/imported/prompt_r.png-129f8c9696706c24d4294a0bcb1b79de.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_r.png" -dest_files=["res://.godot/imported/prompt_r.png-129f8c9696706c24d4294a0bcb1b79de.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/1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_esc.png b/1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0289.png similarity index 100% rename from 1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_esc.png rename to 1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0289.png diff --git a/1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_esc.png.import b/1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0289.png.import similarity index 69% rename from 1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_esc.png.import rename to 1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0289.png.import index 8779583..640ac86 100644 --- a/1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_esc.png.import +++ b/1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0289.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://cb0jbsmewh5ir" -path="res://.godot/imported/prompt_esc.png-00149f6edf157296d91072ddb4c28746.ctex" +path="res://.godot/imported/tile_0289.png-8c9db24bb657563e4fdbf06f15b9a590.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_esc.png" -dest_files=["res://.godot/imported/prompt_esc.png-00149f6edf157296d91072ddb4c28746.ctex"] +source_file="res://1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0289.png" +dest_files=["res://.godot/imported/tile_0289.png-8c9db24bb657563e4fdbf06f15b9a590.ctex"] [params] diff --git a/1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_q.png b/1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0357.png similarity index 100% rename from 1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_q.png rename to 1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0357.png diff --git a/1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_q.png.import b/1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0357.png.import similarity index 69% rename from 1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_q.png.import rename to 1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0357.png.import index 2ccd3e0..78a7724 100644 --- a/1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_q.png.import +++ b/1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0357.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://cqxvhnxgi4k7" -path="res://.godot/imported/prompt_q.png-3c3c5b7a9e7231a25d20d6531fb937f8.ctex" +path="res://.godot/imported/tile_0357.png-e226bbce15a13db50278679661e9ee5f.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_q.png" -dest_files=["res://.godot/imported/prompt_q.png-3c3c5b7a9e7231a25d20d6531fb937f8.ctex"] +source_file="res://1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0357.png" +dest_files=["res://.godot/imported/tile_0357.png-e226bbce15a13db50278679661e9ee5f.ctex"] [params] diff --git a/1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_r.png b/1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0360.png similarity index 100% rename from 1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_r.png rename to 1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0360.png diff --git a/1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_a.png b/1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0392.png similarity index 100% rename from 1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_a.png rename to 1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0392.png diff --git a/1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_space.png b/1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0425.png similarity index 100% rename from 1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_space.png rename to 1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0425.png diff --git a/1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_space.png.import b/1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0425.png.import similarity index 68% rename from 1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_space.png.import rename to 1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0425.png.import index b62696c..fb42380 100644 --- a/1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_space.png.import +++ b/1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0425.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://bdcjy1fcuq23s" -path="res://.godot/imported/prompt_space.png-5ceabdad7d53da09738da849717a4ee9.ctex" +path="res://.godot/imported/tile_0425.png-bb7d98afa87c8e4ee6f3e5e68b5b6877.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_space.png" -dest_files=["res://.godot/imported/prompt_space.png-5ceabdad7d53da09738da849717a4ee9.ctex"] +source_file="res://1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0425.png" +dest_files=["res://.godot/imported/tile_0425.png-bb7d98afa87c8e4ee6f3e5e68b5b6877.ctex"] [params] diff --git a/MainMenu.gd b/MainMenu.gd index 2d48354..4241b1b 100644 --- a/MainMenu.gd +++ b/MainMenu.gd @@ -1,7 +1,6 @@ extends Control const MAIN_SCENE_PATH = "res://main.tscn" -const TUTORIAL_SCENE_PATH = "res://tutorial.tscn" var tip_level = 1 var config = ConfigFile.new() @@ -42,12 +41,3 @@ func play(): await get_tree().create_timer(0.8).timeout var game = ResourceLoader.load_threaded_get(MAIN_SCENE_PATH) get_tree().change_scene_to_packed(game) - -func play_tutorial(): - ResourceLoader.load_threaded_request(TUTORIAL_SCENE_PATH) - $"LoadingScreen".show() - var tip_options = [] - $LoadingScreen/Tip.text = "Try different characters and movement settings" - await get_tree().create_timer(3).timeout - var game = ResourceLoader.load_threaded_get(TUTORIAL_SCENE_PATH) - get_tree().change_scene_to_packed(game) diff --git a/RechargeProgress.gd b/RechargeProgress.gd index 862b12f..57d087d 100644 --- a/RechargeProgress.gd +++ b/RechargeProgress.gd @@ -2,9 +2,6 @@ extends TextureProgressBar var animating = false -signal done_countdown -signal done_countup - func start_countdown(time: float): material.set("shader_parameter/strength", 1) animating = true @@ -12,7 +9,6 @@ func start_countdown(time: float): var tween = get_tree().create_tween() tween.tween_property(self, "value", 0, time) await tween.finished - done_countdown.emit() animating = false material.set("shader_parameter/strength", 0) @@ -23,6 +19,5 @@ func start_countup(time: float): var tween = get_tree().create_tween() tween.tween_property(self, "value", 100, time) await tween.finished - done_countup.emit() animating = false material.set("shader_parameter/strength", 0) diff --git a/Spawner.gd b/Spawner.gd index c5b4a9b..de62d4c 100644 --- a/Spawner.gd +++ b/Spawner.gd @@ -62,8 +62,6 @@ func spawn(item: WaveEnemy): var test_pos = Vector2(randf(), randf()) * Vector2(1920, 1080) if not $"../CollisionCheck".is_clear(test_pos, item.check_distance): continue - if Geometry2D.segment_intersects_circle($"../Player".global_position, $"../Player".global_position + $"../Player".linear_velocity, test_pos, 250) != -1: - continue spawn_loc = test_pos break diff --git a/TrajectoryDisplay.gd b/TrajectoryDisplay.gd index 615177f..7767f77 100644 --- a/TrajectoryDisplay.gd +++ b/TrajectoryDisplay.gd @@ -2,23 +2,17 @@ extends Line2D @export var target_shield = false -const PLAY_AREA = Rect2(0, 0, 1920, 1080) - -@onready var player = $"/root/Node2D/Player" +func _ready(): + $ShapeCast2D.target_position = $"..".linear_velocity * 1000 + $ShapeCast2D.force_shapecast_update() func _physics_process(delta): #global_rotation = $"..".linear_velocity.angle() + $ShapeCast2D.target_position = to_local($"..".linear_velocity * 1000) - var poi = Geometry2D.segment_intersects_segment(player.global_position, player.global_position + player.linear_velocity, global_position, global_position + get_parent().linear_velocity) - - if poi != null and PLAY_AREA.has_point(poi): - set_point_position(1, Vector2.RIGHT * 1000) + + if $ShapeCast2D.get_collider(0) != null and ["Player", "Shield" if target_shield else "None"].has($ShapeCast2D.get_collider(0).name): + points[1] = to_local($ShapeCast2D.get_collision_point(0)) visible = true else: visible = false - - #queue_redraw() - -#func _draw() -> void: -# - #draw_line(Vector2.ZERO, to_local(global_position + get_parent().linear_velocity), Color.RED) diff --git a/bullet.tscn b/bullet.tscn index 56ec0f4..94c210d 100644 --- a/bullet.tscn +++ b/bullet.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=12 format=3 uid="uid://c6ybtahxwpukd"] +[gd_scene load_steps=13 format=3 uid="uid://c6ybtahxwpukd"] [ext_resource type="Script" path="res://bullet.gd" id="1_3q13i"] [ext_resource type="Texture2D" uid="uid://fgfa8x6icumw" path="res://bullets.png" id="2_unua3"] @@ -53,6 +53,9 @@ animations = [{ "speed": 5.0 }] +[sub_resource type="CircleShape2D" id="CircleShape2D_13gk7"] +radius = 30.0 + [node name="Bullet" type="RigidBody2D" groups=["bullet", "destructible"]] collision_layer = 2 physics_material_override = SubResource("PhysicsMaterial_xnhwp") @@ -89,4 +92,8 @@ texture = ExtResource("4_h1jno") texture_mode = 1 script = ExtResource("5_0jcwc") +[node name="ShapeCast2D" type="ShapeCast2D" parent="TrajectoryDisplay"] +shape = SubResource("CircleShape2D_13gk7") +target_position = Vector2(500, 2.08165e-12) + [connection signal="body_entered" from="." to="." method="hit"] diff --git a/exagon.tscn b/exagon.tscn index 51ab4ff..711c742 100644 --- a/exagon.tscn +++ b/exagon.tscn @@ -1,6 +1,7 @@ -[gd_scene load_steps=9 format=3 uid="uid://c87easb8570vd"] +[gd_scene load_steps=10 format=3 uid="uid://c87easb8570vd"] [ext_resource type="PhysicsMaterial" uid="uid://c5tm7od8mwjjb" path="res://elastic.tres" id="1_1oplx"] +[ext_resource type="Script" path="res://Shield.gd" id="2_q7qjq"] [ext_resource type="Texture2D" uid="uid://ciwpkhcp4pvqt" path="res://exagon.png" id="3_445cx"] [ext_resource type="AudioStream" uid="uid://b73ik24u615jc" path="res://phaserDown1.ogg" id="5_8ceda"] @@ -42,6 +43,7 @@ radius = 25.0 collision_layer = 2 collision_mask = 2 physics_material_override = ExtResource("1_1oplx") +script = ExtResource("2_q7qjq") [node name="Sprite" type="AnimatedSprite2D" parent="Shield"] z_index = 2 diff --git a/laser-ability.tscn b/laser-ability.tscn index 644df07..4a3eea7 100644 --- a/laser-ability.tscn +++ b/laser-ability.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=5 format=3 uid="uid://1ex46dwbqgdn"] +[gd_scene load_steps=6 format=3 uid="uid://1ex46dwbqgdn"] [ext_resource type="PackedScene" uid="uid://d2xigwib6hka4" path="res://quare_ability.tscn" id="1_k107v"] [ext_resource type="Shader" uid="uid://c2p7rwspwqmr8" path="res://greyscale.tres" id="2_6nuob"] [ext_resource type="Texture2D" uid="uid://dtipytdgtqr88" path="res://laser-icon.png" id="2_wo0et"] +[ext_resource type="Texture2D" uid="uid://dux6o222ain2r" path="res://1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_mouse.png" id="4_krrm2"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_hrqqm"] resource_local_to_scene = true @@ -16,3 +17,10 @@ stretch_margin_top = 0 stretch_margin_right = 0 stretch_margin_bottom = 0 texture_under = ExtResource("2_wo0et") + +[node name="prompt" parent="." index="0"] +offset_left = -14.0 +offset_top = 7.0 +offset_right = 26.0 +offset_bottom = 47.0 +texture = ExtResource("4_krrm2") diff --git a/main.tscn b/main.tscn index e2af315..02619d5 100644 --- a/main.tscn +++ b/main.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=116 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"] @@ -26,6 +26,38 @@ [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"] +[sub_resource type="Resource" id="Resource_ur7l5"] +script = ExtResource("4_um0x7") +enemies = Array[ExtResource("7_54h7d")]([ExtResource("3_xmk5u")]) +quantities = Array[int]([1]) +spawning_duration = 1.0 +wait = 1.0 +wait_for_killed = true + +[sub_resource type="Resource" id="Resource_kupyp"] +script = ExtResource("4_um0x7") +enemies = Array[ExtResource("7_54h7d")]([ExtResource("3_xmk5u")]) +quantities = Array[int]([7]) +spawning_duration = 25.0 +wait = 3.0 +wait_for_killed = true + +[sub_resource type="Resource" id="Resource_o8cet"] +script = ExtResource("4_um0x7") +enemies = Array[ExtResource("7_54h7d")]([ExtResource("5_xdrk0"), ExtResource("3_xmk5u")]) +quantities = Array[int]([1, 2]) +spawning_duration = 2.0 +wait = 5.0 +wait_for_killed = true + +[sub_resource type="Resource" id="Resource_0cevq"] +script = ExtResource("4_um0x7") +enemies = Array[ExtResource("7_54h7d")]([ExtResource("5_xdrk0")]) +quantities = Array[int]([3]) +spawning_duration = 10.0 +wait = 1.0 +wait_for_killed = true + [sub_resource type="Resource" id="Resource_eppj0"] script = ExtResource("4_um0x7") enemies = Array[ExtResource("7_54h7d")]([ExtResource("3_xmk5u"), ExtResource("5_xdrk0")]) @@ -34,6 +66,14 @@ spawning_duration = 20.0 wait = 10.0 wait_for_killed = true +[sub_resource type="Resource" id="Resource_rpu1y"] +script = ExtResource("4_um0x7") +enemies = Array[ExtResource("7_54h7d")]([ExtResource("5_e24vf")]) +quantities = Array[int]([3]) +spawning_duration = 10.0 +wait = 2.0 +wait_for_killed = true + [sub_resource type="Resource" id="Resource_4b1vo"] script = ExtResource("4_um0x7") enemies = Array[ExtResource("7_54h7d")]([ExtResource("5_xdrk0"), ExtResource("5_e24vf")]) @@ -648,11 +688,12 @@ colors = PackedColorArray(1, 0, 0, 1, 1, 0, 0, 1) gradient = SubResource("Gradient_or5lt") [node name="Node2D" type="Node2D"] +position = Vector2(-2, -1) 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_eppj0"), 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")]) +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") [node name="Timer" type="Timer" parent="Spawner"] @@ -924,7 +965,8 @@ script = ExtResource("13_lkv81") process_mode = 3 script = ExtResource("1_k8sg3") -[node name="Music" type="AudioStreamPlayer" parent="."] +[node name="Music" type="AudioStreamPlayer2D" parent="."] +position = Vector2(-13, 29) stream = ExtResource("21_7hdkm") autoplay = true bus = &"Music" diff --git a/main_menu.tscn b/main_menu.tscn index cecbca7..7e447e5 100644 --- a/main_menu.tscn +++ b/main_menu.tscn @@ -72,7 +72,7 @@ layout_mode = 2 size_flags_horizontal = 4 theme_override_fonts/font = ExtResource("4_ybv7t") theme_override_font_sizes/font_size = 100 -text = "SETTINGS" +text = "CONFIG" flat = true alignment = 0 @@ -315,16 +315,16 @@ theme_override_font_sizes/normal_font_size = 200 bbcode_enabled = true text = "[center][wave]LOADING..." -[node name="Music" type="AudioStreamPlayer" parent="."] +[node name="Music" type="AudioStreamPlayer2D" parent="."] stream = ExtResource("9_rc4r7") autoplay = true 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="." method="play_tutorial"] -[connection signal="pressed" from="Settings Panel/Close" to="Settings Panel" method="save"] +[connection signal="pressed" from="Layout/Tutorial" to="Tutorial Text" method="show"] [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/player-iamond.gd b/player-iamond.gd index 4bb0543..0253bf9 100644 --- a/player-iamond.gd +++ b/player-iamond.gd @@ -12,16 +12,14 @@ func _ready(): func _input(event): if event.is_action_pressed("primary_fire") and can_jump: can_jump = false - $"../".get_node("%Ability/Portal").start_countup(1) + $"../".get_node("%Ability/Portal").start_countup(0.5) $Sprite.speed_scale = 1 $Sprite.play("jump") await $Sprite.animation_finished + $"../".get_node("%Ability/Portal").start_countdown(0.5) global_position = get_global_mouse_position() $Sprite.speed_scale = -1 $Sprite.play("jump") await $Sprite.animation_finished $Sprite.play("idle") - $"../".get_node("%Ability/Portal").start_countdown(5) - await $"../".get_node("%Ability/Portal").done_countdown can_jump = true - $AbilityRechargeFX.play() diff --git a/player-ite.gd b/player-ite.gd index b3b561a..ddcca2b 100644 --- a/player-ite.gd +++ b/player-ite.gd @@ -56,8 +56,6 @@ func fire_laser(): tween.tween_callback(set_laser_texture.bind(idle_texture)) tween.tween_callback($Body.play.bind("idle")) tween.tween_property(self, "speed", 750, 0) - await tween.finished - $AbilityRechargeFX.play() diff --git a/player-row.gd b/player-row.gd index a4d4344..80db79a 100644 --- a/player-row.gd +++ b/player-row.gd @@ -37,23 +37,23 @@ 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("secondary_fire"): - #if exagons > 1: - #exagons = 1 - #if exagons <= 0: - #notifier.notify("No Exagons!") - #return - # - #if not $"../CollisionCheck".is_clear(get_global_mouse_position()): - #$"../CollisionCheck".flash() - #notifier.notify("Too Close!") - #return - #exagons -= 1 - #var new_exagon = exagon.instantiate() - #new_exagon.position = get_global_mouse_position() - #$/root/Node2D.add_child(new_exagon) - #new_exagon.name = "Exagon" - ##$Gun.shoot() + if event.is_action_pressed("secondary_fire"): + if exagons > 1: + exagons = 1 + if exagons <= 0: + notifier.notify("No Exagons!") + return + + if not $"../CollisionCheck".is_clear(get_global_mouse_position()): + $"../CollisionCheck".flash() + notifier.notify("Too Close!") + return + exagons -= 1 + var new_exagon = exagon.instantiate() + new_exagon.position = get_global_mouse_position() + $/root/Node2D.add_child(new_exagon) + new_exagon.name = "Exagon" + #$Gun.shoot() func aquire_quare(): @@ -63,4 +63,9 @@ func aquire_quare(): break await get_tree().create_timer(3).timeout num_quares -= 1 - $AbilityRechargeFX.play() + $QuareFX.play() + +func aquire_exagon(): + await get_tree().create_timer(15).timeout + exagons += 1 + $ExagonFX.play() diff --git a/player-row.tscn b/player-row.tscn index c2abd29..ef435b8 100644 --- a/player-row.tscn +++ b/player-row.tscn @@ -1,8 +1,10 @@ -[gd_scene load_steps=29 format=3 uid="uid://bfd8oqdyt6m3g"] +[gd_scene load_steps=31 format=3 uid="uid://bfd8oqdyt6m3g"] [ext_resource type="PackedScene" uid="uid://cgcjicue76wsr" path="res://player.tscn" id="1_r3mct"] [ext_resource type="Script" path="res://player-row.gd" id="2_ty4ic"] +[ext_resource type="AudioStream" uid="uid://cbghiy80qmaa0" path="res://powerUp6.ogg" id="3_sk1xt"] [ext_resource type="Texture2D" uid="uid://bd0inrlfuocmv" path="res://player_idle.png" id="3_yynte"] +[ext_resource type="AudioStream" uid="uid://mond5sdmukan" path="res://powerUp7.ogg" id="4_lwgj5"] [ext_resource type="Texture2D" uid="uid://uy21l35yd3p5" path="res://player_moving.png" id="4_x5jjw"] [sub_resource type="AtlasTexture" id="AtlasTexture_7dffy"] @@ -196,5 +198,13 @@ speed_scale = 0.75 position = Vector2(3, 0) shape = SubResource("CircleShape2D_caugh") -[node name="ShieldMarker" type="Marker2D" parent="." index="3"] +[node name="QuareFX" type="AudioStreamPlayer2D" parent="." index="3"] +stream = ExtResource("3_sk1xt") +bus = &"SFX" + +[node name="ExagonFX" type="AudioStreamPlayer2D" parent="." index="4"] +stream = ExtResource("4_lwgj5") +bus = &"SFX" + +[node name="ShieldMarker" type="Marker2D" parent="." index="5"] scale = Vector2(1.5, 1.5) diff --git a/player.gd b/player.gd index 0785fb2..3785928 100644 --- a/player.gd +++ b/player.gd @@ -39,8 +39,6 @@ func _physics_process(delta): else: apply_central_force(transform.y * side_input * speed / -2 + transform.x * move_input * speed * linear_damp) - #queue_redraw() - func destroy(): if has_node("Shield"): $Shield.destroy() @@ -48,8 +46,3 @@ func destroy(): $DeathFX.play() get_tree().paused = true $"../GameOver".visible = true - -func _draw(): - if OS.is_debug_build(): - draw_line(Vector2.ZERO, to_local(global_position + linear_velocity), Color.GREEN, 2, true) - diff --git a/player.tscn b/player.tscn index 68a2d56..d2f11fe 100644 --- a/player.tscn +++ b/player.tscn @@ -1,7 +1,6 @@ -[gd_scene load_steps=4 format=3 uid="uid://cgcjicue76wsr"] +[gd_scene load_steps=3 format=3 uid="uid://cgcjicue76wsr"] [ext_resource type="Script" path="res://player.gd" id="1_p12hv"] -[ext_resource type="AudioStream" uid="uid://mond5sdmukan" path="res://powerUp7.ogg" id="3_71sa0"] [ext_resource type="AudioStream" uid="uid://cuu1qqskoqabg" path="res://Taco_Bell_Bong.ogg" id="3_urvwh"] [node name="Player" type="RigidBody2D" groups=["destructible"]] @@ -10,10 +9,6 @@ gravity_scale = 1.66533e-16 linear_damp = 1.0 script = ExtResource("1_p12hv") -[node name="DeathFX" type="AudioStreamPlayer" parent="."] +[node name="DeathFX" type="AudioStreamPlayer2D" parent="."] process_mode = 3 stream = ExtResource("3_urvwh") - -[node name="AbilityRechargeFX" type="AudioStreamPlayer" parent="."] -stream = ExtResource("3_71sa0") -bus = &"SFX" diff --git a/tutorial.tscn b/tutorial.tscn deleted file mode 100644 index 5b2767f..0000000 --- a/tutorial.tscn +++ /dev/null @@ -1,142 +0,0 @@ -[gd_scene load_steps=19 format=3 uid="uid://c8rjblwa4g4h4"] - -[ext_resource type="PackedScene" uid="uid://bmd4m7lqj4v0x" path="res://main.tscn" id="1_vbure"] -[ext_resource type="Script" path="res://wave.gd" id="2_ptga6"] -[ext_resource type="Script" path="res://wave_enemy.gd" id="3_0n5nc"] -[ext_resource type="Resource" uid="uid://du12lm5aq7g7f" path="res://ircle_enemy.tres" id="4_le7cn"] -[ext_resource type="Resource" uid="uid://3gxjbodh4fwe" path="res://riangle_enemy.tres" id="5_6ndf3"] -[ext_resource type="Resource" uid="uid://824inmsxuois" path="res://entagon_enemy.tres" id="6_yvkbu"] -[ext_resource type="FontFile" uid="uid://bpcp43g74vhgo" path="res://monogram-extended.ttf" id="7_cv2we"] -[ext_resource type="Texture2D" uid="uid://cqxvhnxgi4k7" path="res://1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_q.png" id="8_ix613"] -[ext_resource type="Texture2D" uid="uid://bdcjy1fcuq23s" path="res://1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_space.png" id="9_b2ggs"] -[ext_resource type="Texture2D" uid="uid://dux6o222ain2r" path="res://1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_mouse.png" id="10_tpxnc"] -[ext_resource type="Texture2D" uid="uid://cb0jbsmewh5ir" path="res://1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_esc.png" id="11_r8uaj"] -[ext_resource type="Texture2D" uid="uid://b664lyfilq1kw" path="res://1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_r.png" id="12_unp2s"] - -[sub_resource type="Resource" id="Resource_ur7l5"] -script = ExtResource("2_ptga6") -enemies = Array[ExtResource("3_0n5nc")]([ExtResource("4_le7cn")]) -quantities = Array[int]([1]) -spawning_duration = 1.0 -wait = 1.0 -wait_for_killed = true - -[sub_resource type="Resource" id="Resource_kupyp"] -script = ExtResource("2_ptga6") -enemies = Array[ExtResource("3_0n5nc")]([ExtResource("4_le7cn")]) -quantities = Array[int]([7]) -spawning_duration = 25.0 -wait = 3.0 -wait_for_killed = true - -[sub_resource type="Resource" id="Resource_o8cet"] -script = ExtResource("2_ptga6") -enemies = Array[ExtResource("3_0n5nc")]([ExtResource("5_6ndf3"), ExtResource("4_le7cn")]) -quantities = Array[int]([1, 2]) -spawning_duration = 2.0 -wait = 5.0 -wait_for_killed = true - -[sub_resource type="Resource" id="Resource_0cevq"] -script = ExtResource("2_ptga6") -enemies = Array[ExtResource("3_0n5nc")]([ExtResource("5_6ndf3")]) -quantities = Array[int]([3]) -spawning_duration = 10.0 -wait = 1.0 -wait_for_killed = true - -[sub_resource type="Resource" id="Resource_eppj0"] -script = ExtResource("2_ptga6") -enemies = Array[ExtResource("3_0n5nc")]([ExtResource("4_le7cn"), ExtResource("5_6ndf3")]) -quantities = Array[int]([7, 5]) -spawning_duration = 20.0 -wait = 10.0 -wait_for_killed = true - -[sub_resource type="Resource" id="Resource_rpu1y"] -script = ExtResource("2_ptga6") -enemies = Array[ExtResource("3_0n5nc")]([ExtResource("6_yvkbu")]) -quantities = Array[int]([3]) -spawning_duration = 10.0 -wait = 2.0 -wait_for_killed = true - -[node name="Node2D" instance=ExtResource("1_vbure")] - -[node name="Spawner" parent="." index="0"] -waves = Array[ExtResource("2_ptga6")]([SubResource("Resource_ur7l5"), SubResource("Resource_kupyp"), SubResource("Resource_o8cet"), SubResource("Resource_0cevq"), SubResource("Resource_eppj0"), SubResource("Resource_rpu1y")]) - -[node name="Stopwatch" parent="UI" index="1"] -text = "Tutorial" -script = null - -[node name="HBoxContainer" type="HBoxContainer" parent="UI" index="2"] -modulate = Color(0.716296, 0.716296, 0.716296, 1) -layout_mode = 2 -offset_left = 624.0 -offset_top = 80.0 -offset_right = 1296.0 -offset_bottom = 144.0 - -[node name="Label" type="Label" parent="UI/HBoxContainer" index="0"] -layout_mode = 2 -theme_override_fonts/font = ExtResource("7_cv2we") -theme_override_font_sizes/font_size = 48 -text = "To use your ability press " - -[node name="TextureRect" type="TextureRect" parent="UI/HBoxContainer" index="1"] -custom_minimum_size = Vector2(64, 64) -layout_mode = 2 -size_flags_horizontal = 4 -texture = ExtResource("8_ix613") - -[node name="TextureRect3" type="TextureRect" parent="UI/HBoxContainer" index="2"] -custom_minimum_size = Vector2(64, 64) -layout_mode = 2 -size_flags_horizontal = 4 -texture = ExtResource("9_b2ggs") - -[node name="TextureRect2" type="TextureRect" parent="UI/HBoxContainer" index="3"] -custom_minimum_size = Vector2(64, 64) -layout_mode = 2 -size_flags_horizontal = 4 -texture = ExtResource("10_tpxnc") - -[node name="GameOver" parent="." index="6"] -text = "GAME OVER" - -[node name="Restart" parent="GameOver" index="0"] -offset_left = -175.5 -offset_top = -151.0 -offset_right = 619.5 -text = "To leave -to restart" -horizontal_alignment = 0 - -[node name="Leaderboard" parent="GameOver" index="3"] -theme_override_fonts/normal_font = ExtResource("7_cv2we") -theme_override_font_sizes/normal_font_size = 100 -text = " - - -[center]Go to config and set a username to start playing! -" -script = null - -[node name="Leave Prompt" type="TextureRect" parent="GameOver" index="4"] -layout_mode = 0 -offset_left = 695.0 -offset_top = 926.0 -offset_right = 735.0 -offset_bottom = 966.0 -scale = Vector2(2, 2) -texture = ExtResource("11_r8uaj") - -[node name="Restart Prompt" type="TextureRect" parent="GameOver" index="5"] -layout_mode = 0 -offset_left = 696.0 -offset_top = 998.0 -offset_right = 736.0 -offset_bottom = 1038.0 -scale = Vector2(2, 2) -texture = ExtResource("12_unp2s")