public void ShowFinishRankCtrl()
 {
     //PlayerRankNum = 2; //test
     PlayerRankNum = WaterwheelPlayerNetCtrl.GetInstance().GetPlayerRankNo();
     if (PlayerRankNum == 1)
     {
         FinishRankCtrl.GetInstance().InitShowFinishRank(PlayerRankNum);
     }
     else
     {
         FinishRankCtrl.GetInstancePlayer().InitShowFinishRank(PlayerRankNum);
     }
 }
예제 #2
0
    // Use this for initialization
    void Awake()
    {
        if (PanelNum == FinishPanelNum.FinishPanel)
        {
            _Instance = this;
        }
        else
        {
            _InstancePlayer = this;
        }

        FinishRankTPos         = GetComponent <TweenPosition>();
        FinishRankTPos.enabled = false;

        FinishRankTRot         = GetComponent <TweenRotation>();
        FinishRankTRot.enabled = false;

        RankSpriteArray    = new UISprite[8];
        RankSpriteArray[0] = FinishRankObj_1.GetComponent <UISprite>();
        RankSpriteArray[1] = FinishRankObj_2.GetComponent <UISprite>();
        RankSpriteArray[2] = FinishRankObj_3.GetComponent <UISprite>();
        RankSpriteArray[3] = FinishRankObj_4.GetComponent <UISprite>();
        RankSpriteArray[4] = FinishRankObj_5.GetComponent <UISprite>();
        RankSpriteArray[5] = FinishRankObj_6.GetComponent <UISprite>();
        RankSpriteArray[6] = FinishRankObj_7.GetComponent <UISprite>();
        RankSpriteArray[7] = FinishRankObj_8.GetComponent <UISprite>();

        if (WFinishRankObj_1 != null)
        {
            WRankSpriteArray    = new UISprite[RankingCtrl.MaxPlayerRankNum];
            WRankSpriteArray[0] = WFinishRankObj_1.GetComponent <UISprite>();
            WRankSpriteArray[1] = WFinishRankObj_2.GetComponent <UISprite>();
            WRankSpriteArray[2] = WFinishRankObj_3.GetComponent <UISprite>();
            WRankSpriteArray[3] = WFinishRankObj_4.GetComponent <UISprite>();
            WRankSpriteArray[4] = WFinishRankObj_5.GetComponent <UISprite>();
            WRankSpriteArray[5] = WFinishRankObj_6.GetComponent <UISprite>();
            WRankSpriteArray[6] = WFinishRankObj_7.GetComponent <UISprite>();
            WRankSpriteArray[7] = WFinishRankObj_8.GetComponent <UISprite>();
        }

        for (int i = 0; i < RankingCtrl.MaxPlayerRankNum; i++)
        {
            RankSpriteArray[i].enabled = false;
            if (WRankSpriteArray != null)
            {
                WRankSpriteArray[i].enabled = false;
            }
        }

        gameObject.SetActive(false);
    }