Bug Fixes

dev-hazim
Ali Sharoz 1 month ago
parent b575704a08
commit 2a137f67f5

File diff suppressed because it is too large Load Diff

@ -74,11 +74,12 @@ public class HomeScene : MonoBehaviour
public Popup[] popups; public Popup[] popups;
public static HomeScene instance; public static HomeScene instance;
public UnityEvent OnPlayButtonPressed=new UnityEvent(); public UnityEvent OnPlayButtonPressed;
private List<int> ReverseNumbers = new List<int>{4, 6, 10, 12, 16, 18,22,24,28,30,34,36,40,42,46,48}; private List<int> ReverseNumbers = new List<int>{4, 6, 10, 12, 16, 18,22,24,28,30,34,36,40,42,46,48};
private void Start() private void Start()
{ {
instance = this; instance = this;
OnPlayButtonPressed = new UnityEvent();
CheckForDisplayName(); CheckForDisplayName();
SetupSettingToggle(); SetupSettingToggle();
if (GameManager.openLevelSelection) if (GameManager.openLevelSelection)

@ -13,6 +13,7 @@ U should buy the asset from home store if u use it in your project!
*/ */
using MS; using MS;
using System.Collections;
using TMPro; using TMPro;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
@ -37,12 +38,17 @@ public class LevelGroupButton : MonoBehaviour
HomeScene.instance.PlayButton(); HomeScene.instance.PlayButton();
GameObject.FindWithTag("LevelGroupPopup").GetComponent<Popup>().Close(); GameObject.FindWithTag("LevelGroupPopup").GetComponent<Popup>().Close();
}); });
//HomeScene.instance.OnPlayButtonPressed = new UnityEngine.Events.UnityEvent();
StartCoroutine(OnPlayButtonPressedDelayed());
}
IEnumerator OnPlayButtonPressedDelayed()
{
yield return new WaitForSeconds(1f);
HomeScene.instance.OnPlayButtonPressed.AddListener(() => HomeScene.instance.OnPlayButtonPressed.AddListener(() =>
{ {
UpdateUI(); UpdateUI();
}); });
} }
private void Update() private void Update()
{ {
} }

@ -51,7 +51,7 @@ public class ShopManager : MonoBehaviour, IDetailedStoreListener
public PayloadData payloadData; public PayloadData payloadData;
private void Start() private void Start()
{ {
int coins = PlayerPrefs.GetInt("Coins"); int coins = PlayerPrefs.GetInt("Coin");
coinTxt.text = coins.ToString(); coinTxt.text = coins.ToString();
SetupBuilder(); SetupBuilder();
} }

Loading…
Cancel
Save