示例#1
0
    void ShowGetGold(int gold, Vector3 pos)
    {
        GoldEffectLabelData getGold = new GoldEffectLabelData();

        getGold.GameObj    = Initobj(m_GetGoldLabelObj);
        getGold.bScaleAnim = false;
        getGold.Init();
        //  getGold.ResetScale();
        getGold.LifeTime = 0.5f;
        getGold.SetPos(pos);
        getGold.SetTweenPos();
        getGold.SetText(gold.ToString());
        m_GetGoldList.Add(getGold);
    }
示例#2
0
    public void ShowGetGoldNum(int GoldNum, byte ClientSeat)
    {
        //显示一炮获得的总的金币数
        //剔除掉时间间隔短的
        if (m_GetGoldList.Count > 0)
        {
            GoldEffectLabelData gold = m_GetGoldList[m_GetGoldList.Count - 1];
            if (gold.LifeTime > 0.48f)
            {
                return;
            }
        }

        Vector3 pos = SceneRuntime.PlayerMgr.GetPlayer(ClientSeat).Launcher.LauncherPos;

        pos.x += 0.4f;
        pos.y += 0.125f;
        ShowGetGold(GoldNum, pos);
    }
示例#3
0
    void ShowGoldNumLabel(uint _Score, Vector3 Pos, Fish fish, bool bScale = true)
    {
        GoldEffectLabelData label = new GoldEffectLabelData();

        label.GameObj    = Initobj(m_LabelObj);
        label.bScaleAnim = bScale;
        label.Init();
        if (!bScale)
        {
            label.ResetScale();
            label.LifeTime = 2.0f;
        }
        label.SetPos(Pos);
        label.SetText(_Score.ToString());
        if (fish.IsBossFish())
        {
            label.LifeTime = 3.0f;
            label.SetLabelFontSize();
        }
        m_CatchedLabelList.Add(label);
    }
示例#4
0
    public void Update(float delta)
    {
        for (byte i = 0; i < m_CatchedList.Count;)
        {
            GoldEffectData ged = m_CatchedList[i];
            if (ged.Update(delta) == false)
            {
                if (++ged.catchedData.GoldFinished == ged.catchedData.FishList.Count)
                {
                }                                              // ShowGoldNumLabel(ged);
                ShowGoldEndLargen(ged.catchedData.ClientSeat); //金币结束动画后放大效果
                UpdateRoleGold(ged);
                if (SceneRuntime.PlayerMgr.GetPlayer(ged.catchedData.ClientSeat) == SceneRuntime.PlayerMgr.MySelf)
                {
                    GlobalAudioMgr.Instance.PlayOrdianryMusic(Audio.OrdianryMusic.m_UserGetGold);
                }

                ged.DsetorySelf();
                Utility.ListRemoveAt(m_CatchedList, i);
            }
            else
            {
                ++i;
            }
        }

        for (int i = 0; i < m_UnlockRateList.Count;)
        {
            GoldEffectData ged = m_UnlockRateList[i];
            if (ged.Update(delta) == false)
            {
                ged.DsetorySelf();
                Utility.ListRemoveAt(m_UnlockRateList, i);
                GlobalAudioMgr.Instance.PlayOrdianryMusic(Audio.OrdianryMusic.m_Niuniu17);
            }
            else
            {
                i++;
            }
        }
        for (int i = 0; i < m_diamondList.Count;)
        {
            GoldEffectData ged = m_diamondList[i];
            if (ged.Update(delta) == false)
            {
                ged.DsetorySelf();
                Utility.ListRemoveAt(m_diamondList, i);
            }
            else
            {
                i++;
            }
        }

        for (byte i = 0; i < m_CatchedLabelList.Count;)
        {
            GoldEffectLabelData data = m_CatchedLabelList[i];
            if (data.Update(delta) == false)
            {
                data.DestorySelf();
                Utility.ListRemoveAt(m_CatchedLabelList, i);
            }
            else
            {
                ++i;
            }
        }
        for (byte j = 0; j < m_GetGoldList.Count;)
        {
            GoldEffectLabelData getGold = m_GetGoldList[j];
            if (getGold.Update(delta) == false)
            {
                getGold.DestorySelf();
                Utility.ListRemoveAt(m_GetGoldList, j);
            }
            else
            {
                ++j;
            }
        }
        if (m_EndLargenGold.m_GameObj != null)
        {
            if (m_EndLargenGold.Update(delta) == false)
            {
                m_EndLargenGold.DestorySelf();
            }
        }
    }