From 9b06a6514b0b0e7439fe00b22194ac80c5e62443 Mon Sep 17 00:00:00 2001 From: Anthony Wilcox <35226681+antonwilc0x@users.noreply.github.com> Date: Wed, 12 Jun 2019 21:55:41 -0400 Subject: [PATCH] Use GameKit singleton --- icon.png.import | 5 +++++ lang/local.en.translation | Bin 852 -> 825 bytes lang/local.sv.translation | Bin 868 -> 856 bytes project.godot | 1 - scn/GameScn.tscn | 5 ++--- scn/{WinDialogs.tscn => PauseScn.tscn} | 8 +++----- scn/TitleScn.tscn | 5 ++--- src/GameScn.gd | 6 +++--- src/{WinDialogs.gd => PauseScn.gd} | 8 ++++---- src/TitleScn.gd | 8 ++++---- 10 files changed, 23 insertions(+), 23 deletions(-) rename scn/{WinDialogs.tscn => PauseScn.tscn} (97%) rename src/{WinDialogs.gd => PauseScn.gd} (72%) diff --git a/icon.png.import b/icon.png.import index 0041ef8..96cbf46 100644 --- a/icon.png.import +++ b/icon.png.import @@ -3,6 +3,9 @@ importer="texture" type="StreamTexture" path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" +metadata={ +"vram_texture": false +} [deps] @@ -14,6 +17,7 @@ dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ] compress/mode=0 compress/lossy_quality=0.7 compress/hdr_mode=0 +compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 flags/filter=true @@ -23,6 +27,7 @@ flags/srgb=2 process/fix_alpha_border=true process/premult_alpha=false process/HDR_as_SRGB=false +process/invert_color=false stream=false size_limit=0 detect_3d=true diff --git a/lang/local.en.translation b/lang/local.en.translation index 83193381c2b8ecadf601c123a7cd54b654f7f317..e6089ff90875f72123c020cefb3ea04bccbdf268 100644 GIT binary patch delta 301 zcmcb@wv$aTC^*QO0ScIbG~-4=0Y+vZYqC9KBcto&gN)*m%0O{8C}sqy0b-kz?w!7q zKQgLI+5vg&K+FM^0m<&XSTT)%vLTbWqzqIRqynb**+2Ch_Q{DrS)d?TFS6`aL&ZeR z$rG8x87+Y(2(!9=QcuyFe2_`JMg*uDWD5v`+#?Uf2|yf_T3ni&$`D+hnvz+Z!Qhda zQ^4Swm!1RS1SFOgr=~DCCgqowFa+czRx7|M3sl^PzsU;g9(V0Kq5c@k^zZ<=+wN)DvXVi{y-)N6f**8 z5O%Tuy+V5OK1OjywaM2Q)fpKk|6>%FWCzNCG=nfq<(3G=Dv`;0OyZJGKv8saiX7GU z8BC4?%6ehZ`|<_rZpF!cKv{F3EH@DI05QyDn;)!4c_!~;5>NT((`+37kHI4~r+~pV zFFhx-ID;V|v9vffg~2f?zqEwGwIZ{G!6z{%mc)XQ0!v=dxh-e zvy9@5x|5$WsxvZ7=4BF>WCzN^Fiho^2*oO~$+kdQFQ6<36vJeT9M$%jOwI+$1_5Q* zpcp3m@&)T|)yZ>#vi3k3ZXo6bVwkMW57wi6lg~1Vv-xBur{)z;{>CKlA6k-rcxhfb zLvTUS;icIOhg(Zhi%JU$N)j3Vc~8#q=Hm2c{>Knp22`G%2vn4s1C(&p+2Q(Y$3KRD Vo(Gu!Gag" - [connection signal="pressed" from="PauseWin/PauseVbox/SettingsBtn" to="." method="_on_SettingsBtn_pressed"] [connection signal="pressed" from="PauseWin/PauseVbox/ResumeBtn" to="." method="_on_ResumeBtn_pressed"] [connection signal="pressed" from="PauseWin/PauseVbox/ExitBtn" to="." method="_on_ExitBtn_pressed"] diff --git a/scn/TitleScn.tscn b/scn/TitleScn.tscn index 7200e54..412b9f3 100644 --- a/scn/TitleScn.tscn +++ b/scn/TitleScn.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=3 format=2] [ext_resource path="res://src/TitleScn.gd" type="Script" id=1] -[ext_resource path="res://scn/WinDialogs.tscn" type="PackedScene" id=2] +[ext_resource path="res://scn/PauseScn.tscn" type="PackedScene" id=2] [node name="TitleScn" type="Node"] script = ExtResource( 1 ) @@ -30,8 +30,7 @@ margin_right = 147.0 margin_bottom = 68.0 text = "KLIC" -[node name="WinDialogs" parent="." instance=ExtResource( 2 )] - +[node name="PauseScn" parent="." instance=ExtResource( 2 )] [connection signal="pressed" from="TitleVBox/PlayBtn" to="." method="_on_PlayBtn_pressed"] [connection signal="pressed" from="TitleVBox/CreditsBtn" to="." method="_on_CreditsBtn_pressed"] [connection signal="pressed" from="TitleVBox/LicenseBtn" to="." method="_on_LicenseBtn_pressed"] diff --git a/src/GameScn.gd b/src/GameScn.gd index d5b5dc2..ba66f57 100644 --- a/src/GameScn.gd +++ b/src/GameScn.gd @@ -1,6 +1,6 @@ -extends "res://src/GameKit.gd" +extends Node func _process(delta): if Input.is_action_pressed("ui_pause"): - is_game_paused(true) - $WinDialogs/PauseWin.show() \ No newline at end of file + GameKit.is_game_paused(true) + $PauseScn/PauseWin.show() \ No newline at end of file diff --git a/src/WinDialogs.gd b/src/PauseScn.gd similarity index 72% rename from src/WinDialogs.gd rename to src/PauseScn.gd index 506d5f0..0baf1a0 100644 --- a/src/WinDialogs.gd +++ b/src/PauseScn.gd @@ -1,8 +1,8 @@ -extends "res://src/GameKit.gd" +extends Control func _on_ExitBtn_pressed(): - is_game_paused(false) - switch_scenes("title") + GameKit.is_game_paused(false) + GameKit.switch_scenes("title") func _on_SettingsBtn_pressed(): $SettingsWin.show() @@ -18,4 +18,4 @@ func _on_CloseAbtBtn_pressed(): func _on_ResumeBtn_pressed(): $PauseWin.hide() - is_game_paused(false) \ No newline at end of file + GameKit.is_game_paused(false) \ No newline at end of file diff --git a/src/TitleScn.gd b/src/TitleScn.gd index 549c0c5..1b88877 100644 --- a/src/TitleScn.gd +++ b/src/TitleScn.gd @@ -1,10 +1,10 @@ -extends "res://src/GameKit.gd" +extends Node func _on_PlayBtn_pressed(): - switch_scenes("game") + GameKit.switch_scenes("game") func _on_LicenseBtn_pressed(): - $WinDialogs/LicenseWin.show() + $PauseScn/LicenseWin.show() func _on_CreditsBtn_pressed(): - $WinDialogs/CreditsWin.show() + $PauseScn/CreditsWin.show()