Exemplo n.º 1
0
    public void UpdateTotalCoin(int coinIncome)
    {
        //update to model
        PlayerDataModel.TotalCoin += coinIncome;

        totalCoinTxt.text = PlayerDataModel.TotalCoin.ToString();
        SavePlayerDataManager.SavePlayerDataCollection();
    }
Exemplo n.º 2
0
    public void ResetSlotStatus()
    {
        //update to model

        PlayerDataModel.UsedPotSlot = 0;

        string slotTextFormat = PlayerDataModel.UsedPotSlot.ToString() + "/" + PlayerDataModel.TotalPotSlot.ToString();

        slotStatusTxt.text = slotTextFormat;

        SavePlayerDataManager.SavePlayerDataCollection();
    }
Exemplo n.º 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();
    }
Exemplo n.º 4
0
 void SetFBPlayerName(string fBname)
 {
     FBNameTxt.text             = fbname;
     PlayerDataModel.playerName = fbname;
     SavePlayerDataManager.SavePlayerDataCollection();
 }