Esempio n. 1
0
    public static AwardItem AddAward(string awardType, int awardValue)
    {
        AwardItem awardItem = new AwardItem(awardType, awardValue);

        if (PlayerDataPack.IsMoney(awardType))
        {
            PlayerDataPack.Instance.AddMoney(awardType, awardValue);
        }

        //gem
        if (awardType.Equals("20001"))
        {
            GemDataPack.Instance.AddRandomGem(1);
        }
        else if (awardType.Equals("20002"))
        {
            GemDataPack.Instance.AddRandomGem(2);
        }
        else if (awardType.Equals("20003"))
        {
            GemDataPack.Instance.AddRandomGem(3);
        }
        else if (awardType.Equals("20004"))
        {
            GemDataPack.Instance.AddRandomGem(4);
        }

        return(awardItem);
    }
Esempio n. 2
0
 private void RefreshOwnCurrency(object sender, Hashtable hash)
 {
     if (PlayerDataPack.IsMoney(_ShowOwnCurrency))
     {
         ShowCurrency(_ShowOwnCurrency, PlayerDataPack.Instance.GetMoney(_ShowOwnCurrency));
     }
 }
Esempio n. 3
0
 void OnDisable()
 {
     if (PlayerDataPack.IsMoney(_ShowOwnCurrency))
     {
         GameCore.Instance.EventController.UnRegisteEvent(EVENT_TYPE.EVENT_LOGIC_REFRESH_MONEY, RefreshOwnCurrency);
     }
 }
Esempio n. 4
0
    public void GetAward(string id, int value)
    {
        if (PlayerDataPack.IsMoney(id))
        {
            PlayerDataPack.Instance.AddMoney(id, value);
        }

        //gem
        if (id.Equals("20001"))
        {
            GemDataPack.Instance.AddRandomGem(1);
        }
        else if (id.Equals("20002"))
        {
            GemDataPack.Instance.AddRandomGem(2);
        }
        else if (id.Equals("20003"))
        {
            GemDataPack.Instance.AddRandomGem(3);
        }
        else if (id.Equals("20004"))
        {
            GemDataPack.Instance.AddRandomGem(4);
        }
    }
Esempio n. 5
0
 public void ShowOwnCurrency(string itemDataID)
 {
     if (PlayerDataPack.IsMoney(itemDataID))
     {
         if (!_ShowOwnCurrency.Equals(itemDataID))
         {
             _ShowOwnCurrency = itemDataID;
         }
         ShowCurrency(itemDataID, PlayerDataPack.Instance.GetMoney(itemDataID));
         GameCore.Instance.EventController.RegisteEvent(EVENT_TYPE.EVENT_LOGIC_REFRESH_MONEY, RefreshOwnCurrency);
     }
     else
     {
     }
 }