Esempio n. 1
0
        private void OnUpdateRankingAllElement(GameObject go, int index)
        {
            CSDT_RANKING_LIST_SUCC rankList = Singleton <RankingSystem> .instance.GetRankList(RankingSystem.RankingType.Ladder);

            if (rankList != null)
            {
                string     serverUrl  = string.Empty;
                GameObject headIcon   = null;
                GameObject gameObject = null;
                GameObject obj4       = null;
                headIcon   = go.transform.Find("HeadIcon").gameObject;
                gameObject = go.transform.Find("HeadbgNo1").gameObject;
                obj4       = go.transform.Find("123No").gameObject;
                serverUrl  = Singleton <ApolloHelper> .GetInstance().ToSnsHeadUrl(ref rankList.astItemDetail[index].stExtraInfo.stDetailInfo.stLadderPoint.szHeadUrl);

                gameObject.CustomSetActive(index == 0);
                RankingSystem.SetUrlHeadIcon(headIcon, serverUrl);
                obj4.transform.GetChild(0).gameObject.CustomSetActive(0 == index);
                obj4.transform.GetChild(1).gameObject.CustomSetActive(1 == index);
                obj4.transform.GetChild(2).gameObject.CustomSetActive(2 == index);
                int   dwHeadIconId = (int)rankList.astItemDetail[index].stExtraInfo.stDetailInfo.stLadderPoint.stGameVip.dwHeadIconId;
                Image component    = go.transform.Find("NobeImag").GetComponent <Image>();
                if (component != null)
                {
                    MonoSingleton <NobeSys> .GetInstance().SetHeadIconBk(component, dwHeadIconId);
                }
                GameObject qQVipIcon = go.transform.Find("QQVipIcon").gameObject;
                this.SetQQVip(qQVipIcon, false, (int)rankList.astItemDetail[index].stExtraInfo.stDetailInfo.stLadderPoint.dwVipLevel);
            }
        }
Esempio n. 2
0
 public void OnTriggerEnter(Collider other)
 {
     if (!ranking)
     {
         ranking = FindObjectOfType <RankingSystem> ();
     }
     if (other.GetComponent <Car>() != null)
     {
         ranking.SetCarDist(other.GetComponent <Car>(), dist);
         //Debug.Log("car " + other.name + " pass point " + dist + " at "+name);
     }
 }
 void Start()
 {
     Player          = FindObjectOfType <Player>();
     finishcollider  = FindObjectOfType <FinishCollider>();
     MyrankingSystem = FindObjectOfType <RankingSystem>();
     endpos          = FindObjectOfType <FinishCollider>().transform.position.z;
     coin            = PlayerPrefs.GetInt("coin");
     Coinstext.text  = "" + coin;
     leveltext.text  = SceneManager.GetActiveScene().name;
     if (SceneManager.GetActiveScene().name == "1")
     {
         Help.SetActive(true);
     }
 }
Esempio n. 4
0
        private void OnUpdateRankingFriendElement(GameObject go, int index)
        {
            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo();

            string     serverUrl  = string.Empty;
            GameObject headIcon   = null;
            GameObject gameObject = null;
            GameObject obj4       = null;
            int        num        = (index <= this.myRankingNo) ? 0 : -1;
            Transform  transform  = go.transform;

            headIcon   = transform.Find("HeadIcon").gameObject;
            gameObject = transform.transform.Find("HeadbgNo1").gameObject;
            obj4       = transform.transform.Find("123No").gameObject;
            int headIdx = 0;

            if (index == this.myRankingNo)
            {
                if (masterRoleInfo != null)
                {
                    serverUrl = masterRoleInfo.HeadUrl;
                    headIdx   = (int)masterRoleInfo.GetNobeInfo().stGameVipClient.dwHeadIconId;
                    GameObject qQVipIcon = transform.transform.Find("QQVipIcon").gameObject;
                    this.SetQQVip(qQVipIcon, true, 0);
                }
            }
            else if ((index + num) < this.rankFriendList.Count)
            {
                serverUrl = Singleton <ApolloHelper> .GetInstance().ToSnsHeadUrl(ref this.rankFriendList[index + num].szHeadUrl);

                headIdx = (int)this.rankFriendList[index + num].stGameVip.dwHeadIconId;
                GameObject obj6 = transform.transform.Find("QQVipIcon").gameObject;
                this.SetQQVip(obj6, false, (int)this.rankFriendList[index + num].dwQQVIPMask);
            }
            gameObject.CustomSetActive(index == 0);
            obj4.transform.GetChild(0).gameObject.CustomSetActive(0 == index);
            obj4.transform.GetChild(1).gameObject.CustomSetActive(1 == index);
            obj4.transform.GetChild(2).gameObject.CustomSetActive(2 == index);
            Image component = transform.transform.Find("NobeImag").GetComponent <Image>();

            if (component != null)
            {
                MonoSingleton <NobeSys> .GetInstance().SetHeadIconBk(component, headIdx);
            }
            RankingSystem.SetUrlHeadIcon(headIcon, serverUrl);
        }
Esempio n. 5
0
 private void Start()
 {
     cam  = GetComponent <Camera>();
     rank = GameObject.Find("PlayerInputManager").GetComponent <RankingSystem>();
 }
Esempio n. 6
0
    //

    private void Awake()
    {
        track = FindObjectOfType <RankingSystem>();
    }