Beispiel #1
0
    public static void SetRank()
    {
        switch (Moudle_scene.GetRank())
        {
        case 1:
            if (Moudle_FileRead.FirstChangeName.Val == false)
            {
                setBtnActive(false);
                go_Rank.transform.Find("scrollinglist/第一/玩家名").gameObject.SetActive(true);
                go_Rank.transform.Find("scrollinglist/第一/玩家名").GetComponent <TextMesh>().text = (Moudle_scene.getRankName(0));
            }
            else
            {
                setBtnActive(true);
                go_Rank.transform.Find("scrollinglist/第一/玩家名").gameObject.SetActive(false);
            }
            break;

        case 2:
            if (Moudle_FileRead.FirstChangeName.Val == false)
            {
                setBtnActive(false);
                go_Rank.transform.Find("scrollinglist/第二/玩家名").gameObject.SetActive(true);
                go_Rank.transform.Find("scrollinglist/第二/玩家名").GetComponent <TextMesh>().text = (Moudle_scene.getRankName(1));
            }
            else
            {
                setBtnActive(true);
                go_Rank.transform.Find("scrollinglist/第二/玩家名").gameObject.SetActive(false);
            }
            break;

        default:
            if (Moudle_FileRead.FirstChangeName.Val == false)
            {
                go_Rank.transform.Find("scrollinglist/第三/玩家名").gameObject.SetActive(true);
                go_Rank.transform.Find("scrollinglist/第三/玩家名").GetComponent <TextMesh>().text = (Moudle_scene.getRankName(2));
                setBtnActive(false);
            }
            else
            {
                setBtnActive(true);
                go_Rank.transform.Find("scrollinglist/第三/玩家名").gameObject.SetActive(false);
            }
            break;
        }
    }
Beispiel #2
0
    void RankShow()
    {
        switch (Moudle_scene.GetRank())
        {
        case 1:
            go_Rank.transform.Find("scrollinglist/第一/排名").GetComponent <tk2dTextMesh>().text = (Moudle_scene.GetRank()).ToString();
            go_Rank.transform.Find("scrollinglist/第二/排名").GetComponent <tk2dTextMesh>().text = (Moudle_scene.GetRank() + 1).ToString();
            go_Rank.transform.Find("scrollinglist/第三/排名").GetComponent <tk2dTextMesh>().text = (Moudle_scene.GetRank() + 2).ToString();

            go_Rank.transform.Find("scrollinglist/第一/分数").GetComponent <tk2dTextMesh>().text = (Moudle_scene.getRankData(0)).ToString();
            go_Rank.transform.Find("scrollinglist/第二/分数").GetComponent <tk2dTextMesh>().text = (Moudle_scene.getRankData(1)).ToString();
            go_Rank.transform.Find("scrollinglist/第三/分数").GetComponent <tk2dTextMesh>().text = (Moudle_scene.getRankData(2)).ToString();

            go_Rank.transform.Find("scrollinglist/第二/玩家名").GetComponent <TextMesh>().text = (Moudle_scene.getRankName(1));
            go_Rank.transform.Find("scrollinglist/第三/玩家名").GetComponent <TextMesh>().text = (Moudle_scene.getRankName(2));
            Light.transform.localPosition = new Vector3(-26, -31, -103);

            if (Moudle_FileRead.FirstChangeName.Val == false)
            {
                setBtnActive(false);
                go_Rank.transform.Find("scrollinglist/第一/玩家名").gameObject.SetActive(true);
                go_Rank.transform.Find("scrollinglist/第一/玩家名").GetComponent <TextMesh>().text = (Moudle_scene.getRankName(0));
            }
            else
            {
                setBtnActive(true);
                go_Rank.transform.Find("scrollinglist/第一/玩家名").gameObject.SetActive(false);
            }
            break;

        case 2:
            go_Rank.transform.Find("scrollinglist/第一/排名").GetComponent <tk2dTextMesh>().text  = (Moudle_scene.GetRank() - 1).ToString();
            go_Rank.transform.Find("scrollinglist//第二/排名").GetComponent <tk2dTextMesh>().text = (Moudle_scene.GetRank()).ToString();
            go_Rank.transform.Find("scrollinglist/第三/排名").GetComponent <tk2dTextMesh>().text  = (Moudle_scene.GetRank() + 1).ToString();
            go_Rank.transform.Find("scrollinglist/第四/排名").GetComponent <tk2dTextMesh>().text  = (Moudle_scene.GetRank() + 2).ToString();

            go_Rank.transform.Find("scrollinglist/第一/分数").GetComponent <tk2dTextMesh>().text = (Moudle_scene.getRankData(0)).ToString();
            go_Rank.transform.Find("scrollinglist/第二/分数").GetComponent <tk2dTextMesh>().text = (Moudle_scene.getRankData(1)).ToString();
            go_Rank.transform.Find("scrollinglist/第三/分数").GetComponent <tk2dTextMesh>().text = (Moudle_scene.getRankData(2)).ToString();
            go_Rank.transform.Find("scrollinglist/第四/分数").GetComponent <tk2dTextMesh>().text = (Moudle_scene.getRankData(3)).ToString();

            go_Rank.transform.Find("scrollinglist/第一/玩家名").GetComponent <TextMesh>().text = (Moudle_scene.getRankName(0));
            go_Rank.transform.Find("scrollinglist/第三/玩家名").GetComponent <TextMesh>().text = (Moudle_scene.getRankName(2));
            go_Rank.transform.Find("scrollinglist/第四/玩家名").GetComponent <TextMesh>().text = (Moudle_scene.getRankName(3));
            Light.transform.localPosition = new Vector3(-26, -103, -103);
            if (Moudle_FileRead.FirstChangeName.Val == false)
            {
                setBtnActive(false);
                go_Rank.transform.Find("scrollinglist/第二/玩家名").gameObject.SetActive(true);
                go_Rank.transform.Find("scrollinglist/第二/玩家名").GetComponent <TextMesh>().text = (Moudle_scene.getRankName(1));
            }
            else
            {
                setBtnActive(true);
                go_Rank.transform.Find("scrollinglist/第二/玩家名").gameObject.SetActive(false);
            }
            break;

        default:
            go_Rank.transform.Find("scrollinglist/第一/排名").GetComponent <tk2dTextMesh>().text = (Moudle_scene.GetRank() - 2).ToString();
            go_Rank.transform.Find("scrollinglist/第二/排名").GetComponent <tk2dTextMesh>().text = (Moudle_scene.GetRank() - 1).ToString();
            go_Rank.transform.Find("scrollinglist/第三/排名").GetComponent <tk2dTextMesh>().text = (Moudle_scene.GetRank()).ToString();
            go_Rank.transform.Find("scrollinglist/第四/排名").GetComponent <tk2dTextMesh>().text = (Moudle_scene.GetRank() + 1).ToString();
            go_Rank.transform.Find("scrollinglist/第五/排名").GetComponent <tk2dTextMesh>().text = (Moudle_scene.GetRank() + 2).ToString();

            go_Rank.transform.Find("scrollinglist/第一/分数").GetComponent <tk2dTextMesh>().text = (Moudle_scene.getRankData(0)).ToString();
            go_Rank.transform.Find("scrollinglist/第二/分数").GetComponent <tk2dTextMesh>().text = (Moudle_scene.getRankData(1)).ToString();
            go_Rank.transform.Find("scrollinglist/第三/分数").GetComponent <tk2dTextMesh>().text = (Moudle_scene.getRankData(2)).ToString();
            go_Rank.transform.Find("scrollinglist/第四/分数").GetComponent <tk2dTextMesh>().text = (Moudle_scene.getRankData(3)).ToString();
            go_Rank.transform.Find("scrollinglist/第五/分数").GetComponent <tk2dTextMesh>().text = (Moudle_scene.getRankData(4)).ToString();

            go_Rank.transform.Find("scrollinglist/第一/玩家名").GetComponent <TextMesh>().text = (Moudle_scene.getRankName(0));
            go_Rank.transform.Find("scrollinglist/第二/玩家名").GetComponent <TextMesh>().text = (Moudle_scene.getRankName(1));
            go_Rank.transform.Find("scrollinglist/第四/玩家名").GetComponent <TextMesh>().text = (Moudle_scene.getRankName(3));
            go_Rank.transform.Find("scrollinglist/第五/玩家名").GetComponent <TextMesh>().text = (Moudle_scene.getRankName(4));
            Light.transform.localPosition = new Vector3(-26, -167, -103);
            if (Moudle_FileRead.FirstChangeName.Val == false)
            {
                go_Rank.transform.Find("scrollinglist/第三/玩家名").gameObject.SetActive(true);
                go_Rank.transform.Find("scrollinglist/第三/玩家名").GetComponent <TextMesh>().text = (Moudle_scene.getRankName(2));
                setBtnActive(false);
            }
            else
            {
                setBtnActive(true);
                go_Rank.transform.Find("scrollinglist/第三/玩家名").gameObject.SetActive(false);
            }
            break;
        }
    }