From f92b3a6f75f648c63319430a17f1aa2bf2df0225 Mon Sep 17 00:00:00 2001 From: Ultrablob Date: Thu, 9 May 2024 14:23:34 -0400 Subject: [PATCH] idk --- MainMenu.gd | 2 +- RechargeProgress.gd | 19 +++++++++++++++++++ laser-ability.tscn | 11 +++++++++++ laser-icon.png | Bin 0 -> 375 bytes laser-icon.png.import | 34 ++++++++++++++++++++++++++++++++++ main.tscn | 29 +++++++++++++---------------- player-apezoid.gd | 3 +++ player-iamond.gd | 9 ++++++++- player-iamond.tscn | 21 +++++++++++++-------- player-row.gd | 29 ++++++++++++++++------------- portal-ability.tscn | 7 +++++++ portal-icon.png | Bin 0 -> 1942 bytes portal-icon.png.import | 34 ++++++++++++++++++++++++++++++++++ quare_ability.tscn | 24 ++++++++++++++++++++++++ square.png | Bin 0 -> 117 bytes square.png.import | 34 ++++++++++++++++++++++++++++++++++ 16 files changed, 217 insertions(+), 39 deletions(-) create mode 100644 RechargeProgress.gd create mode 100644 laser-ability.tscn create mode 100644 laser-icon.png create mode 100644 laser-icon.png.import create mode 100644 portal-ability.tscn create mode 100644 portal-icon.png create mode 100644 portal-icon.png.import create mode 100644 quare_ability.tscn create mode 100644 square.png create mode 100644 square.png.import diff --git a/MainMenu.gd b/MainMenu.gd index 0fd0765..4241b1b 100644 --- a/MainMenu.gd +++ b/MainMenu.gd @@ -38,6 +38,6 @@ func play(): var tip = pick(tip_options) $LoadingScreen/Tip.text = "Tip: %s" % tip - await get_tree().create_timer(0.4).timeout + await get_tree().create_timer(0.8).timeout var game = ResourceLoader.load_threaded_get(MAIN_SCENE_PATH) get_tree().change_scene_to_packed(game) diff --git a/RechargeProgress.gd b/RechargeProgress.gd new file mode 100644 index 0000000..cecfd70 --- /dev/null +++ b/RechargeProgress.gd @@ -0,0 +1,19 @@ +extends TextureProgressBar + +var animating = false + +func start_countdown(time: float): + animating = true + value = 100 + var tween = get_tree().create_tween() + tween.tween_property(self, "value", 0, time) + await tween.finished + animating = false + +func start_countup(time: float): + animating = true + value = 0 + var tween = get_tree().create_tween() + tween.tween_property(self, "value", 100, time) + await tween.finished + animating = false diff --git a/laser-ability.tscn b/laser-ability.tscn new file mode 100644 index 0000000..c0d5181 --- /dev/null +++ b/laser-ability.tscn @@ -0,0 +1,11 @@ +[gd_scene load_steps=3 format=3 uid="uid://1ex46dwbqgdn"] + +[ext_resource type="PackedScene" uid="uid://d2xigwib6hka4" path="res://quare_ability.tscn" id="1_k107v"] +[ext_resource type="Texture2D" uid="uid://dtipytdgtqr88" path="res://laser-icon.png" id="2_wo0et"] + +[node name="Laser" instance=ExtResource("1_k107v")] +stretch_margin_left = 0 +stretch_margin_top = 0 +stretch_margin_right = 0 +stretch_margin_bottom = 0 +texture_under = ExtResource("2_wo0et") diff --git a/laser-icon.png b/laser-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3c004a2f0306a93b59f4a2e7fc2bbef6603b2844 GIT binary patch literal 375 zcmV--0f_#IP)Px$F-b&0R9J=Ol{*T;KoEv!a{vXwJ|I3iODj7eN3gOVf+-czIz_6(^Fi72*$ z5HB!RE9;uXeT^yno6M3W-~96+42Tu;5JkLSTv*IQ91g~ipE4SVh}EZvH|Ge`GQpxK zFyc3$7-j3zxp4v%aP0)B;93b#!U4Vvp)1^Y=hbQ5 zUYF!QmP!}YWta8Qg1;!cte2x-mR(k03-?tO)|PXj!1TxBTP!UTY{R)w&?X!J;0gN} VFPxBx>f-= max_quares: notifier.notify("All Quares in Use!") return - + for child in $"../".get_node("%Ability").get_children(): + if child.value == 0 and not child.animating: + child.value = 100 + break if not $"../CollisionCheck".is_clear(get_global_mouse_position(), 60): $"../CollisionCheck".flash() notifier.notify("Too Close!") @@ -27,7 +37,6 @@ func _input(event): new_quare.position = get_global_mouse_position() $/root/Node2D.add_child(new_quare) new_quare.name = "Quare" - update_display() if event.is_action_pressed("exagon"): if exagons > 1: exagons = 1 @@ -44,25 +53,19 @@ func _input(event): new_exagon.position = get_global_mouse_position() $/root/Node2D.add_child(new_exagon) new_exagon.name = "Exagon" - update_display() #$Gun.shoot() func aquire_quare(): + for child in $"../".get_node("%Ability").get_children(): + if child.value == 100 and not child.animating: + child.start_countdown(3) + break await get_tree().create_timer(3).timeout num_quares -= 1 $QuareFX.play() - update_display() func aquire_exagon(): await get_tree().create_timer(15).timeout exagons += 1 $ExagonFX.play() - update_display() - -func update_display(): - $"/root/Node2D/UI/Quare Count".text = "%d Quares\n" % [(max_quares - num_quares)] - -var num_quares = 0 -var max_quares = 3 -var exagons = 0 diff --git a/portal-ability.tscn b/portal-ability.tscn new file mode 100644 index 0000000..4ef1bd4 --- /dev/null +++ b/portal-ability.tscn @@ -0,0 +1,7 @@ +[gd_scene load_steps=3 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"] + +[node name="Portal" instance=ExtResource("1_ttx3n")] +texture_under = ExtResource("2_2epev") diff --git a/portal-icon.png b/portal-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3db8fc3e41d033e7f32888dfd35b3c36cac38cba GIT binary patch literal 1942 zcmV;H2Wj|;P)Px+P)S5VR9JNoOXRJ9E!D zd++6k%-jy?q%X5RopTTS{C@kt7o2tB9qQ=*{u>wj{qVm2Z=O6f@P+yN*T)CG0&t=} zFbHt$K>tI>4h($f*nxqe!~6O_cW|t_Y!y>^{sg4fQ)o8?*L(n(6dq*Ca zXSs{vLx#V5>3mC1d1Vn$nvj+yq1*MJa$7l{Z45Vhj=jbyYHF zxlNTR;0nN7iG1`p z1iD19A>e&r7U5cr9Eg#pfHvSd@8iQU>WynQ4u2fzS+nt#A9}Ats{H8eS>59tYnx48 zpKbDHR7!clgtJ`jJ$D%+-)%LaF>+5wyO~g>5h5#`qZE}1UvM-8mV}@uih@UgP3wAw zM-RPLePR9P+VAI%<{5wuTWUK2MEFApI%uuznwilZ0>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&W#< literal 0 HcmV?d00001 diff --git a/portal-icon.png.import b/portal-icon.png.import new file mode 100644 index 0000000..e13d9c7 --- /dev/null +++ b/portal-icon.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dgd2mofq75e01" +path="res://.godot/imported/portal-icon.png-3b1ae569eea6160c02da833f62fdd212.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://portal-icon.png" +dest_files=["res://.godot/imported/portal-icon.png-3b1ae569eea6160c02da833f62fdd212.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/quare_ability.tscn b/quare_ability.tscn new file mode 100644 index 0000000..54dfc7a --- /dev/null +++ b/quare_ability.tscn @@ -0,0 +1,24 @@ +[gd_scene load_steps=5 format=3 uid="uid://d2xigwib6hka4"] + +[ext_resource type="Texture2D" uid="uid://ba2tcipuc8rdi" path="res://quare 2.png" id="1_thx02"] +[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"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_lvo18"] +atlas = ExtResource("1_thx02") +region = Rect2(2.08165e-12, 2.08165e-12, 64, 64) + +[node name="Quare" type="TextureProgressBar"] +custom_minimum_size = Vector2(64, 64) +step = 0.1 +fill_mode = 5 +nine_patch_stretch = true +stretch_margin_left = 2 +stretch_margin_top = 2 +stretch_margin_right = 2 +stretch_margin_bottom = 2 +texture_under = SubResource("AtlasTexture_lvo18") +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") diff --git a/square.png b/square.png new file mode 100644 index 0000000000000000000000000000000000000000..b1502d1565e609f2695eda05b027a7e87fe6cb8c GIT binary patch literal 117 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}`kpS1ArbCx zFE|P^Fz_7O@G#zF@mdK II;Vst0CeaeBme*a literal 0 HcmV?d00001 diff --git a/square.png.import b/square.png.import new file mode 100644 index 0000000..cb4e023 --- /dev/null +++ b/square.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://barlie6sierj" +path="res://.godot/imported/square.png-51b8b31f216285d75f625619e7157806.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://square.png" +dest_files=["res://.godot/imported/square.png-51b8b31f216285d75f625619e7157806.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