Example #1
0
    public void SetUnlockedMode(bool isUnlock)
    {
        UnLockPanel.SetActive(isUnlock);
        LockedPanel.SetActive(!isUnlock);

        UnlockedMenuModel.UpdateSpecificUnlockMenu(menuNameKey, isUnlock);

        if (isUnlock)
        {
            SetUnlockedUI();
        }
        else
        {
            SetLockedUI();
        }
    }
Example #2
0
    static void ConvertUnlockMenuDataToStoreInModel(string stringData)
    {
        string[] unlockMenuList = stringData.Split('|');

        foreach (string menu in unlockMenuList)
        {
            if (menu != string.Empty)
            {
                string[] formatData = menu.Split(',');
                string   odenName   = formatData[0].Replace("Menu:", string.Empty);
                bool     isUnlock   = bool.Parse(formatData[1].Replace("IsUnlock:", string.Empty));

                UnlockedMenuModel.UpdateSpecificUnlockMenu(odenName, isUnlock);
            }
        }
    }
Example #3
0
    void OnPurchaseMenu()
    {
        ClosePurchaseDialog();
        coinSound.Play();
        int income = PurchaseMenuPrice * -1;

        playerResourceManager.UpdateTotalCoin(income);
        SetUnlockedMode(true);

        Image ItemPicInDialog = GameObject.Find("ItemPic").GetComponent <Image>();

        ItemPicInDialog.sprite = odenUnlockPic;

        Text ItemNameTxt = GameObject.Find("ItemNameTxt").GetComponent <Text>();

        ItemNameTxt.text = menuName;

        UnlockedMenuModel.UpdateSpecificUnlockMenu(menuNameKey, true);
        SavePlayerDataManager.SavePlayerDataCollection();
    }