From 1572f7db6dc30b05e0dc5a6468ad4ff06ca8b4bc Mon Sep 17 00:00:00 2001 From: bance <90307762+bance23@users.noreply.github.com> Date: Sat, 13 May 2023 16:51:40 +0200 Subject: [PATCH] playgomb bugfix --- .DS_Store | Bin 0 -> 8196 bytes Assets/Scenes/Menu.unity | 42 ++++++------------------- Assets/Scripts/Network/DatabaseData.cs | 2 +- Assets/Scripts/jatekmanager.cs | 30 ++++++++++++------ 4 files changed, 31 insertions(+), 43 deletions(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..55b5d956365221c19c8619447c2fa915d52d7a98 GIT binary patch literal 8196 zcmeHML2uJA6n<{Ynra}57-$!yNZimU9jcHJm#*CoNFbqQzyZ)`+O7*r<0?t1#x$vC z_$x?U`6c`pPVo8JRB5^mu>+dGj_l8|-)B4DdyVIeh(v4LTPIp2A_rMvbs5D8N%gC| zkP4>d8c={wG$fxwI;6YQUa+6|f3i1O>2XtK^)r@9SP$S_P~E|D^)z z{oo=iY#N+uDE4K@ueGWTRAG)7LetUjDsy1d;8dfg zlhAY$W@cedD1v7P&t-EGO^vp+3Rnde6;NmQo3ud*uKwKl-J^Z#P)sALQ5U@<)Fr)p z9LlaAN*_G+Q`TXBM(EnBM_%DL~WVgD~mQmUXqJGSTpx1}V>z6^)larPlN4W$+y_vj(lA2g1SE6$DE_a1HU9)!b4e&i=4VO~LWMc>cL zPpHj3|9dZvLKzLvt~h0SLIJ*z#H{P#ygK3*EV4?LU@d8oS5c^0vUWvS`FX#H?>Q@n zo?+H59iSY*(>dQ1)Ecv+t{8vsVZ|ZrV{%c8Xb-c+h?5SbxR(^oKLy9b=S)0Y#k?Fh z7^4f02TYk8Ej}Bm2>Ao{KN2&)(I^*1*P-Z`KHyS*X~PF0`=kY*gt%(>t%iBOaCBvr ztjbsI!dg^pW=FnE z&-v{WpB)_>qcfh}|DmEyR)O;?P}I~_b^hNv{rmsurl: " + url); } diff --git a/Assets/Scripts/jatekmanager.cs b/Assets/Scripts/jatekmanager.cs index d579a31..f9514e3 100644 --- a/Assets/Scripts/jatekmanager.cs +++ b/Assets/Scripts/jatekmanager.cs @@ -16,7 +16,7 @@ public class jatekmanager : MonoBehaviour public static event Action OnGameStateChanged; //gameobjectek,gombok,scriptek - public GameObject playButton; + public GameObject playGomb; public GameObject garazs; public GameObject homeGomb; public GameObject settingsGomb; @@ -96,6 +96,7 @@ public class jatekmanager : MonoBehaviour homeGomb.SetActive(true); settingsGomb.SetActive(true); shopGomb.SetActive(true); + goLeftButton.SetActive(false); jumpButton.SetActive(false); goRightButton.SetActive(false); @@ -107,6 +108,7 @@ public class jatekmanager : MonoBehaviour { //deactivate buttons StartCoroutine(TimerHome()); + playGomb.SetActive(true); GetComponent().enabled = false; GetComponent().enabled = false; goLeftButton.SetActive(false); @@ -120,32 +122,36 @@ public class jatekmanager : MonoBehaviour IEnumerator TimerHome() { yield return new WaitForSecondsRealtime(2); - playButton.SetActive(true); + + } public void ChangeToSettings() { UpdateGameState(GameState.Settings); + playGomb.SetActive(false); } private async void HandleSettings() { - playButton.SetActive(false); + playGomb.SetActive(false); goLeftButton.SetActive(false); jumpButton.SetActive(false); goRightButton.SetActive(false); scoreText.gameObject.SetActive(false); timerText.gameObject.SetActive(false); + playGomb.SetActive(false); } public void ChangeToShop() { UpdateGameState(GameState.Shop); + } private async void HandleShop() { - playButton.SetActive(false); + playGomb.SetActive(false); goLeftButton.SetActive(false); jumpButton.SetActive(false); goRightButton.SetActive(false); @@ -158,31 +164,37 @@ public class jatekmanager : MonoBehaviour homeGomb.SetActive(false); settingsGomb.SetActive(false); shopGomb.SetActive(false); - playButton.SetActive(false); + playGomb.SetActive(false); UpdateGameState(GameState.Game); + } IEnumerator TimerGame() { yield return new WaitForSecondsRealtime(1); garazs.SetActive(false); + + } private async void HandleGame() { StartCoroutine(TimerGame()); - + + GetComponent ().enabled = true; GetComponent ().enabled = true; + goLeftButton.SetActive(true); jumpButton.SetActive(true); goRightButton.SetActive(true); scoreText.gameObject.SetActive(true); - timerText.gameObject.SetActive(true); - playButton.SetActive(false); + timerText.gameObject.SetActive(true);; + timer.playTime.Start(); + } public void ChangeToMeghaltal() @@ -205,7 +217,7 @@ public class jatekmanager : MonoBehaviour SceneUIManager.LoadScene(1); //HighScore scene - /*playButton.SetActive(false); + /* homeGomb.SetActive(true); GetComponent().enabled = false; GetComponent().enabled = false;