Exemplo n.º 1
0
 public void SetPreviewUniformAnim(float rValue, float rUniformSpeed01 = 1, Action rOnAnimEnd = null)
 {
     previewAnim = SliderAnimControlCenter.PlayUniformSpeed(previewHandle,
                                                            previewHandle.SliderValue,
                                                            Mathf.Clamp01(rValue - Mathf.FloorToInt(currentValue)), rUniformSpeed01, rOnAnimEnd);
     previewValue = rValue;
 }
Exemplo n.º 2
0
    private void RefreshBattleInfos()
    {
        SliderAnimControlCenter.PlayUniformSpeed <SliderAnim3>(m_factionScore, m_factionScore.value, moduleFactionBattle.FactionPower, 1);

        var redInfo = moduleFactionBattle.GetFactionInfo(Module_FactionBattle.Faction.Red);

        if (redInfo != null)
        {
            Util.SetText(m_redScore, redInfo.score.ToString());
            var list = new List <PFactionPlayerInfo>(redInfo.members);
            list.Sort((a, b) => a.battleInfo.rank.CompareTo(b.battleInfo.rank));
            if (m_redDataSource == null)
            {
                m_redDataSource = new DataSource <PFactionPlayerInfo>(list, m_redRank, OnSetData);
            }
            else
            {
                m_redDataSource.SetItems(list);
            }
        }

        var blueInfo = moduleFactionBattle.GetFactionInfo(Module_FactionBattle.Faction.Blue);

        if (blueInfo != null)
        {
            Util.SetText(m_blueScore, blueInfo.score.ToString());

            var list = new List <PFactionPlayerInfo>(blueInfo.members);
            list.Sort((a, b) => a.battleInfo.rank.CompareTo(b.battleInfo.rank));
            if (m_blueDataSource == null)
            {
                m_blueDataSource = new DataSource <PFactionPlayerInfo>(list, m_blueRank, OnSetData);
            }
            else
            {
                m_blueDataSource.SetItems(list);
            }
        }
    }
Exemplo n.º 3
0
 public void SetCurrentUniformAnim(float rValue, float rUniformSpeed01 = 1, Action rOnAnimEnd = null)
 {
     currentAnim  = SliderAnimControlCenter.PlayUniformSpeed(currentHandle, currentValue, rValue, rUniformSpeed01, rOnAnimEnd);
     currentValue = rValue;
 }