Пример #1
0
    public void next()
    {
        if (_items.Count > 0)
        {
            P_Reward temp = _items.Dequeue();

            spIcon.spriteName = WSDefine.getItemIconByRewardCode(temp.code);
            spIcon.MakePixelPerfect();

//			Debug.LogError(temp.code + " spIcon.spriteName : "  +  spIcon.spriteName);

            switch (temp.code)
            {
            case WSDefine.REWARD_TYPE_FRIENDPOINT:
            case WSDefine.REWARD_TYPE_EXP:
                lbText.text = Util.getUIText("GET_REWARD_COUNT", temp.count.ToString());
                break;

            case WSDefine.REWARD_TYPE_GOLD:
                lbText.text = Util.getUIText("GET_REWARD_GOLD_COUNT", Util.GetCommaScore(temp.count));
                break;

            default:
                lbText.text = Util.getUIText("GET_REWARD_COUNT1", temp.count.ToString());
                break;
            }

            isPlaying = true;
            ani.Play("NoticeGetReward");
        }
        else
        {
            hide();
        }
    }
Пример #2
0
    public static void addGold(int gold)
    {
        P_Reward boughtShopItem = new P_Reward();

        boughtShopItem.count = gold;
        boughtShopItem.code  = WSDefine.GOLD;
        GameManager.me.uiManager.rewardNotice.start(true, boughtShopItem);
    }
Пример #3
0
    public void start(ToC_PULL_SLOT_MACHINE reward)
    {
        GameManager.me.uiManager.uiMenu.uiFriend.btnBack.isEnabled   = false;
        GameManager.me.uiManager.uiMenu.uiFriend.btnInvite.isEnabled = false;

        receiveReward         = GameDataManager.instance.slotMachineRewardList[reward.rewardId];
        slotMachinePacketInfo = reward;

        isReady     = false;
        time        = 0;
        step        = 0;
        borderIndex = 0;
        ++_playIndex;
        _speed = startSpeed;
        StartCoroutine(progress(_playIndex));

        GameManager.soundManager.playLoopEffect(GameManager.info.soundData["uifr_bonusturn"]);
    }
Пример #4
0
    public static bool checkReward(string code, bool startNow)
    {
        if (code.StartsWith("EN"))
        {
            P_Reward boughtShopItem = new P_Reward();
            boughtShopItem.count = 0;
            int.TryParse(code.Split('_')[1], out boughtShopItem.count);
            boughtShopItem.code = WSDefine.ENERGY;
            GameManager.me.uiManager.rewardNotice.start(startNow, boughtShopItem);
            return(true);
        }
        else if (code.StartsWith("GO"))
        {
            P_Reward boughtShopItem = new P_Reward();
            boughtShopItem.count = 0;
            int.TryParse(code.Split('_')[1], out boughtShopItem.count);
            boughtShopItem.code = WSDefine.GOLD;
            GameManager.me.uiManager.rewardNotice.start(startNow, boughtShopItem);
            return(true);
        }
        else if (code.StartsWith("RU"))
        {
            P_Reward boughtShopItem = new P_Reward();
            boughtShopItem.count = 0;
            int.TryParse(code.Split('_')[1], out boughtShopItem.count);
            boughtShopItem.code = WSDefine.RUBY;
            GameManager.me.uiManager.rewardNotice.start(startNow, boughtShopItem);
            return(true);
        }
        else if (code.StartsWith("RS"))
        {
            P_Reward boughtShopItem = new P_Reward();
            boughtShopItem.count = 0;
            int.TryParse(code.Split('_')[1], out boughtShopItem.count);
            boughtShopItem.code = WSDefine.RUNESTONE;
            GameManager.me.uiManager.rewardNotice.start(startNow, boughtShopItem);
            return(true);
        }

        return(false);
    }