diff --git a/1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0392.png b/1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_a.png similarity index 100% rename from 1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0392.png rename to 1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_a.png 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 new file mode 100644 index 0000000..fc81e90 --- /dev/null +++ b/1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_a.png.import @@ -0,0 +1,34 @@ +[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)/tile_0289.png b/1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_esc.png similarity index 100% rename from 1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0289.png rename to 1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_esc.png diff --git a/1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0289.png.import b/1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_esc.png.import similarity index 69% rename from 1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0289.png.import rename to 1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_esc.png.import index 640ac86..8779583 100644 --- a/1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0289.png.import +++ b/1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_esc.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://cb0jbsmewh5ir" -path="res://.godot/imported/tile_0289.png-8c9db24bb657563e4fdbf06f15b9a590.ctex" +path="res://.godot/imported/prompt_esc.png-00149f6edf157296d91072ddb4c28746.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0289.png" -dest_files=["res://.godot/imported/tile_0289.png-8c9db24bb657563e4fdbf06f15b9a590.ctex"] +source_file="res://1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_esc.png" +dest_files=["res://.godot/imported/prompt_esc.png-00149f6edf157296d91072ddb4c28746.ctex"] [params] diff --git a/1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0357.png b/1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_q.png similarity index 100% rename from 1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0357.png rename to 1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_q.png diff --git a/1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0357.png.import b/1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_q.png.import similarity index 69% rename from 1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0357.png.import rename to 1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_q.png.import index 78a7724..2ccd3e0 100644 --- a/1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0357.png.import +++ b/1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_q.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://cqxvhnxgi4k7" -path="res://.godot/imported/tile_0357.png-e226bbce15a13db50278679661e9ee5f.ctex" +path="res://.godot/imported/prompt_q.png-3c3c5b7a9e7231a25d20d6531fb937f8.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0357.png" -dest_files=["res://.godot/imported/tile_0357.png-e226bbce15a13db50278679661e9ee5f.ctex"] +source_file="res://1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_q.png" +dest_files=["res://.godot/imported/prompt_q.png-3c3c5b7a9e7231a25d20d6531fb937f8.ctex"] [params] diff --git a/1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0360.png b/1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_r.png similarity index 100% rename from 1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0360.png rename to 1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_r.png 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 new file mode 100644 index 0000000..df2289d --- /dev/null +++ b/1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_r.png.import @@ -0,0 +1,34 @@ +[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)/tile_0425.png b/1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_space.png similarity index 100% rename from 1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0425.png rename to 1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_space.png diff --git a/1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0425.png.import b/1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_space.png.import similarity index 68% rename from 1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0425.png.import rename to 1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_space.png.import index fb42380..b62696c 100644 --- a/1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0425.png.import +++ b/1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_space.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://bdcjy1fcuq23s" -path="res://.godot/imported/tile_0425.png-bb7d98afa87c8e4ee6f3e5e68b5b6877.ctex" +path="res://.godot/imported/prompt_space.png-5ceabdad7d53da09738da849717a4ee9.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://1-Bit Input Prompts Pixel 16/Tiles (White)/tile_0425.png" -dest_files=["res://.godot/imported/tile_0425.png-bb7d98afa87c8e4ee6f3e5e68b5b6877.ctex"] +source_file="res://1-Bit Input Prompts Pixel 16/Tiles (White)/prompt_space.png" +dest_files=["res://.godot/imported/prompt_space.png-5ceabdad7d53da09738da849717a4ee9.ctex"] [params] diff --git a/MainMenu.gd b/MainMenu.gd index 4241b1b..2d48354 100644 --- a/MainMenu.gd +++ b/MainMenu.gd @@ -1,6 +1,7 @@ extends Control const MAIN_SCENE_PATH = "res://main.tscn" +const TUTORIAL_SCENE_PATH = "res://tutorial.tscn" var tip_level = 1 var config = ConfigFile.new() @@ -41,3 +42,12 @@ 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 57d087d..862b12f 100644 --- a/RechargeProgress.gd +++ b/RechargeProgress.gd @@ -2,6 +2,9 @@ extends TextureProgressBar var animating = false +signal done_countdown +signal done_countup + func start_countdown(time: float): material.set("shader_parameter/strength", 1) animating = true @@ -9,6 +12,7 @@ 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) @@ -19,5 +23,6 @@ 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/TrajectoryDisplay.gd b/TrajectoryDisplay.gd index 7767f77..615177f 100644 --- a/TrajectoryDisplay.gd +++ b/TrajectoryDisplay.gd @@ -2,17 +2,23 @@ extends Line2D @export var target_shield = false -func _ready(): - $ShapeCast2D.target_position = $"..".linear_velocity * 1000 - $ShapeCast2D.force_shapecast_update() +const PLAY_AREA = Rect2(0, 0, 1920, 1080) + +@onready var player = $"/root/Node2D/Player" func _physics_process(delta): #global_rotation = $"..".linear_velocity.angle() - $ShapeCast2D.target_position = to_local($"..".linear_velocity * 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)) + 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) 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 94c210d..56ec0f4 100644 --- a/bullet.tscn +++ b/bullet.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=13 format=3 uid="uid://c6ybtahxwpukd"] +[gd_scene load_steps=12 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,9 +53,6 @@ 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") @@ -92,8 +89,4 @@ 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 711c742..51ab4ff 100644 --- a/exagon.tscn +++ b/exagon.tscn @@ -1,7 +1,6 @@ -[gd_scene load_steps=10 format=3 uid="uid://c87easb8570vd"] +[gd_scene load_steps=9 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"] @@ -43,7 +42,6 @@ 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 4a3eea7..644df07 100644 --- a/laser-ability.tscn +++ b/laser-ability.tscn @@ -1,9 +1,8 @@ -[gd_scene load_steps=6 format=3 uid="uid://1ex46dwbqgdn"] +[gd_scene load_steps=5 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 @@ -17,10 +16,3 @@ 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 02619d5..c8ee704 100644 --- a/main.tscn +++ b/main.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=121 format=3 uid="uid://bmd4m7lqj4v0x"] +[gd_scene load_steps=117 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,12 +12,12 @@ [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://ba01r62bwm6av" path="res://eptagon_enemy.tres" id="9_q67ak"] +[ext_resource type="Resource" uid="uid://dd8me0deake37" 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://cso5ufbf7u7oj" path="res://Circle.png" id="13_318fy"] +[ext_resource type="Texture2D" uid="uid://bvpoajwx0yw3y" 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"] @@ -26,38 +26,6 @@ [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")]) @@ -693,7 +661,7 @@ 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"), SubResource("Resource_viqo8"), SubResource("Resource_o3j5s"), SubResource("Resource_cygv1")]) +waves = Array[ExtResource("4_um0x7")]([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"] @@ -965,8 +933,7 @@ script = ExtResource("13_lkv81") process_mode = 3 script = ExtResource("1_k8sg3") -[node name="Music" type="AudioStreamPlayer2D" parent="."] -position = Vector2(-13, 29) +[node name="Music" type="AudioStreamPlayer" parent="."] stream = ExtResource("21_7hdkm") autoplay = true bus = &"Music" diff --git a/main_menu.tscn b/main_menu.tscn index 7e447e5..cecbca7 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 = "CONFIG" +text = "SETTINGS" 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="AudioStreamPlayer2D" parent="."] +[node name="Music" type="AudioStreamPlayer" 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="Tutorial Text" method="show"] -[connection signal="pressed" from="Settings Panel/Close" to="Settings Panel" method="hide"] +[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="Settings Panel/Close" to="Settings Panel" method="hide"] [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 0253bf9..4bb0543 100644 --- a/player-iamond.gd +++ b/player-iamond.gd @@ -12,14 +12,16 @@ func _ready(): func _input(event): if event.is_action_pressed("primary_fire") and can_jump: can_jump = false - $"../".get_node("%Ability/Portal").start_countup(0.5) + $"../".get_node("%Ability/Portal").start_countup(1) $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 ddcca2b..b3b561a 100644 --- a/player-ite.gd +++ b/player-ite.gd @@ -56,6 +56,8 @@ 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 80db79a..a4d4344 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,9 +63,4 @@ func aquire_quare(): break await get_tree().create_timer(3).timeout num_quares -= 1 - $QuareFX.play() - -func aquire_exagon(): - await get_tree().create_timer(15).timeout - exagons += 1 - $ExagonFX.play() + $AbilityRechargeFX.play() diff --git a/player-row.tscn b/player-row.tscn index ef435b8..c2abd29 100644 --- a/player-row.tscn +++ b/player-row.tscn @@ -1,10 +1,8 @@ -[gd_scene load_steps=31 format=3 uid="uid://bfd8oqdyt6m3g"] +[gd_scene load_steps=29 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"] @@ -198,13 +196,5 @@ speed_scale = 0.75 position = Vector2(3, 0) shape = SubResource("CircleShape2D_caugh") -[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"] +[node name="ShieldMarker" type="Marker2D" parent="." index="3"] scale = Vector2(1.5, 1.5) diff --git a/player.gd b/player.gd index 3785928..0785fb2 100644 --- a/player.gd +++ b/player.gd @@ -39,6 +39,8 @@ 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() @@ -46,3 +48,8 @@ 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 d2f11fe..68a2d56 100644 --- a/player.tscn +++ b/player.tscn @@ -1,6 +1,7 @@ -[gd_scene load_steps=3 format=3 uid="uid://cgcjicue76wsr"] +[gd_scene load_steps=4 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"]] @@ -9,6 +10,10 @@ gravity_scale = 1.66533e-16 linear_damp = 1.0 script = ExtResource("1_p12hv") -[node name="DeathFX" type="AudioStreamPlayer2D" parent="."] +[node name="DeathFX" type="AudioStreamPlayer" 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 index 906b795..5b2767f 100644 --- a/tutorial.tscn +++ b/tutorial.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=13 format=3 uid="uid://d2qpcmkfsm7u4"] +[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"] @@ -6,6 +6,12 @@ [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") @@ -60,5 +66,77 @@ wait_for_killed = true [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"] -visible = true +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")