예제 #1
0
    /// <summary>
    /// 推荐结果上浮
    /// </summary>
    void ShowGoUpWidget()
    {
        m_sprite_goUp.transform.localPosition = new Vector3(0, -120, 0);

        m_trans_GoUpWight.gameObject.SetActive(true);

        //上浮
        TweenPosition.Begin(m_sprite_goUp.gameObject, 0.35f, Vector3.zero);

        //评分
        string systemScore           = DataManager.Manager <GrowUpManager>().GetSystemScore();
        string systemScoreSpriteName = string.Format("tubiao_pingfen_{0}", systemScore);

        m_sprite_ScoreNum.gameObject.SetActive(true);
        m_sprite_ScoreNum.spriteName = systemScoreSpriteName;

        //推荐
        m_bestRecommendId = DataManager.Manager <GrowUpManager>().GetBestRecommendId();
        GrowUpFightPowerDabaBase db = GameTableManager.Instance.GetTableItem <GrowUpFightPowerDabaBase>(m_bestRecommendId);

        string des = string.Empty;

        if (db != null)
        {
            des = string.Format("恭喜!您的战力评分为:{0}  经检测,当前进行 {1} 的性价比最高!", systemScore.ToUpper(), db.Name);
        }

        m_label_goUpDes.text = des;

        m_label_btn_analysis_label.text = "重新分析";
    }
예제 #2
0
        /// <summary>
        /// 通过[ID]二分快速查表
        /// </summary>
        /// <param name="dwID">ID</param>
        /// <returns></returns>
        public static GrowUpFightPowerDabaBase Query(this List <GrowUpFightPowerDabaBase> sorted, uint dwID)
        {
            var key = new GrowUpFightPowerDabaBase()
            {
                dwID = dwID
            };
            var comparer = new Comparer1();
            var index    = sorted.BinarySearch(key, comparer);

            return(index >= 0 ? sorted[index] : default(GrowUpFightPowerDabaBase));
        }
예제 #3
0
    /// <summary>
    /// 分析后立即前往
    /// </summary>
    /// <param name="caster"></param>
    void onClick_GoUpBtn_Btn(GameObject caster)
    {
        GrowUpFightPowerDabaBase growUpFightPowerDb = GameTableManager.Instance.GetTableItem <GrowUpFightPowerDabaBase>(m_bestRecommendId);

        if (growUpFightPowerDb != null)
        {
            ItemManager.DoJump(growUpFightPowerDb.JumpId);
        }

        m_trans_GoUpWight.gameObject.SetActive(false);
    }
예제 #4
0
    private void OnGridUIEvent(UIEventType eventType, object data, object param)
    {
        if (eventType == UIEventType.Click)
        {
            if (data is UIGrowUpGrid)
            {
                UIGrowUpGrid grid = data as UIGrowUpGrid;
                if (grid == null)
                {
                    return;
                }

                int gotoBtnIndex = 1;

                if (param != null && (int)param == gotoBtnIndex)
                {
                    //立即前往
                    GrowUpDabaBase growUpDB = GameTableManager.Instance.GetTableItem <GrowUpDabaBase>(grid.Id);
                    if (growUpDB != null)
                    {
                        ItemManager.DoJump(growUpDB.JumpId);
                    }
                }
            }

            if (data is UIGrowUpFightPowerGrid)
            {
                UIGrowUpFightPowerGrid grid = data as UIGrowUpFightPowerGrid;
                if (grid == null)
                {
                    return;
                }

                int gotoBtnIndex = 1;
                if (param != null && (int)param == gotoBtnIndex)
                {
                    //立即前往
                    GrowUpFightPowerDabaBase growUpFightPowerDB = GameTableManager.Instance.GetTableItem <GrowUpFightPowerDabaBase>(grid.Id);
                    if (growUpFightPowerDB != null)
                    {
                        ItemManager.DoJump(growUpFightPowerDB.JumpId);
                    }
                }
            }
        }
    }