Esempio n. 1
0
    public void Set(FriendInfo fi)
    {
        CurFI = fi;

        Name.text = CurFI.Name;

        int        RoleID = Math.Max(fi.RoleID, 1);
        RoleConfig rc     = null;

        if (CsvConfigTables.Instance.RoleCsvDic.TryGetValue(RoleID, out rc))
        {
            HeadPortrait.spriteName = rc.Portrait;
        }

        StageConfig sc = null;

        CsvConfigTables.Instance.StageCsvDic.TryGetValue(CurFI.StageProgress, out sc);
        if (sc != null)
        {
            ChapterConfig cc = null;
            CsvConfigTables.Instance.ChapterCsvDic.TryGetValue(sc.ChapterID, out cc);

            GroupConfig gc = null;
            CsvConfigTables.Instance.GroupCsvDic.TryGetValue(sc.GroupID, out gc);
            if (cc != null && gc != null)
            {
                Stage.text = StringBuilderTool.ToInfoString(cc.Name, "-", gc.Name, "-", sc.Name);
            }
        }
    }
Esempio n. 2
0
    /// <summary> 获取解锁条件文字描述 </summary>
    public string GetUnLockConditionDes()
    {
        switch (UnLockType)
        {
        default:
        case 0:
            return("");

        case 1:
            string[] TempSplit = UnLockCondition.Split('_');
            if (TempSplit.Length == 3)
            {
                ChapterConfig cc = null;
                if (CsvConfigTables.Instance.ChapterCsvDic.TryGetValue(int.Parse(TempSplit[0]), out cc))
                {
                    GroupConfig gc = null;
                    if (CsvConfigTables.Instance.GroupCsvDic.TryGetValue(int.Parse(TempSplit[1]), out gc))
                    {
                        StageConfig sc = null;
                        if (CsvConfigTables.Instance.StageCsvDic.TryGetValue(int.Parse(TempSplit[2]), out sc))
                        {
                            return(StringBuilderTool.ToInfoString("通关 " + cc.Name, "-", gc.Name, "-" + sc.Name));
                        }
                    }
                }
            }
            return("解锁条件数据格式错误!");

        case 2:
            return("充值" + float.Parse(UnLockCondition) + "元");
        }
    }
Esempio n. 3
0
    public bool AddFirstSection()
    {
        ChapterConfig data = GameSystem.Instance.CareerConfigData.GetChapterData(id);

        if (data != null)
        {
            AddSection(data.first_section_id);
            return(true);
        }
        return(false);
    }
Esempio n. 4
0
    private void RefreshStageData4JustShowIntro()
    {
        UISprite[] AllSprs = GroupsLabs[0].transform.parent.parent.GetComponentsInChildren <UISprite>(true);
        for (int i = 0; i < AllSprs.Length; i++)
        {
            if (AllSprs[i].name == "SelBg")
            {
                AllSprs[i].gameObject.SetActive(false);
            }
        }
        GroupsLabs[0].transform.parent.Find("SelBg").gameObject.SetActive(true);

        ChapterConfig cc = null;

        if (CsvConfigTables.Instance.ChapterCsvDic.TryGetValue(CurChapterID, out cc))
        {
            ChapterLab.text = cc.Name;

            for (int i = 0; i < GroupsLabs.Length; i++)
            {
                GroupsLabs[i].transform.parent.gameObject.SetActive(false);
            }

            int k = 0;
            foreach (KeyValuePair <int, GroupConfig> pair in CsvConfigTables.Instance.GroupCsvDic)
            {
                if (k < GroupsLabs.Length && pair.Value.GroupID / 100 == CurChapterID)
                {
                    GroupsLabs[k].transform.parent.gameObject.SetActive(true);
                    GroupsLabs[k].text        = pair.Value.Name;
                    GroupsIcons[k].spriteName = pair.Value.Icon;

                    if (k == 0)
                    {
                        if (JustShowIntro != null)
                        {
                            //StageGroups[k].gameObject.GetComponent<UIPanel>().alpha = GroupsLabs[k].transform.parent.Find("SelBg").gameObject.activeSelf ? 1 : 0;

                            JustShowIntro.SetStageInfo(CurChapterID, pair.Value.GroupID);
                            //JustShowIntro.UpdateStageState();
                        }

                        //GameApp.Instance.LoadingDlg.SetLoadingPicName(pair.Value.LoadingPic);
                    }
                    k++;
                }
            }
        }
    }
Esempio n. 5
0
    private void RefreshStageData()
    {
        ChapterConfig cc = null;

        if (CsvConfigTables.Instance.ChapterCsvDic.TryGetValue(CurChapterID, out cc))
        {
            ChapterLab.text = cc.Name;

            for (int i = 0; i < GroupsLabs.Length; i++)
            {
                GroupsLabs[i].transform.parent.gameObject.SetActive(false);
            }

            int k = 0;
            foreach (KeyValuePair <int, GroupConfig> pair in CsvConfigTables.Instance.GroupCsvDic)
            {
                if (k < GroupsLabs.Length && pair.Value.GroupID / 100 == CurChapterID)
                {
                    GroupsLabs[k].transform.parent.gameObject.SetActive(true);
                    GroupsLabs[k].text        = pair.Value.Name;
                    GroupsIcons[k].spriteName = pair.Value.Icon;

                    if (k < StageGroups.Length)
                    {
                        if (StageGroups[k] != null)
                        {
                            StageGroups[k].gameObject.GetComponent <UIPanel>().alpha = GroupsLabs[k].transform.parent.Find("SelBg").gameObject.activeSelf ? 1 : 0;

                            StageGroups[k].SetStageInfo(CurChapterID, pair.Value.GroupID);
                            StageGroups[k].UpdateStageState();
                        }

                        GameApp.Instance.LoadingDlg.SetLoadingPicName(pair.Value.LoadingPic);
                    }
                    k++;
                }
            }
        }
    }
Esempio n. 6
0
    private void RefreshThemes()
    {
        ChapterConfig cc = null;

        if (CsvConfigTables.Instance.ChapterCsvDic.TryGetValue(CurChapterID, out cc))
        {
            for (int i = 0; i < ThemeLst.Length; i++)
            {
                ThemeLst[i].gameObject.SetActive(false);
            }

            int k = 0;
            foreach (KeyValuePair <int, GroupConfig> pair in CsvConfigTables.Instance.GroupCsvDic)
            {
                if (k < ThemeLst.Length && pair.Value.GroupID / 100 == CurChapterID)
                {
                    ThemeLst[k].gameObject.SetActive(true);
                    ThemeLst[k].Set(pair.Value);
                    k++;
                }
            }
        }
    }
    public override void SetInfo(object data)
    {
        _chapterID = (int)data;

        ChapterConfig cfg = ChapterConfigLoader.GetConfig(_chapterID);

        _txtTitle.text = cfg.ChapterName;

        _goEffect.gameObject.SetActive(false);

        if (PVEManager.Instance.IsChapterEnable(_chapterID, PVEManager.Instance.ChapterType))
        {
            _imgUnlock.gameObject.SetActive(false);
            _txtUnlock.gameObject.SetActive(false);
            _imgMask.gameObject.SetActive(false);

            _btnAward.gameObject.SetActive(true);
            _txtStar.gameObject.SetActive(true);

            _txtStar.text = string.Format("{0}/{1}", PVEManager.Instance.GetChapterStar(_chapterID, PVEManager.Instance.ChapterType), PVEManager.Instance.GetFullChapterStar(_chapterID, PVEManager.Instance.ChapterType));

            if (ShowEffect())
            {
                _goEffect.gameObject.SetActive(true);
            }
        }
        else
        {
            _imgUnlock.gameObject.SetActive(true);
            _txtUnlock.gameObject.SetActive(true);
            _imgMask.gameObject.SetActive(true);

            _btnAward.gameObject.SetActive(false);
            _txtStar.gameObject.SetActive(false);
        }
    }
Esempio n. 8
0
    public void ParseChapterConfig()
    {
        string text = ResourceLoadManager.Instance.GetConfigText(name1);

        if (text == null)
        {
            Debug.LogError("LoadConfig failed: " + name1);
            return;
        }
        chapterConfig.Clear();

        //读取以及处理XML文本的类
        XmlDocument xmlDoc = CommonFunction.LoadXmlConfig(GlobalConst.DIR_XML_CHAPTER, text);
        //解析xml的过程
        XmlNodeList nodeList = xmlDoc.SelectSingleNode("Data").ChildNodes;

        foreach (XmlElement land in nodeList)
        {
            XmlNode comment = land.SelectSingleNode(GlobalConst.CONFIG_SWITCH_COLUMN);
            if (comment != null && comment.InnerText == GlobalConst.CONFIG_SWITCH)
            {
                continue;
            }
            ChapterConfig config = new ChapterConfig();
            foreach (XmlElement xel in land)
            {
                uint value;
                if (xel.Name == "id")
                {
                    uint.TryParse(xel.InnerText, out value);
                    config.id = value;
                }
                else if (xel.Name == "name")
                {
                    config.name = xel.InnerText;
                }
                else if (xel.Name == "next_chapter_id")
                {
                    uint.TryParse(xel.InnerText, out value);
                    config.next_chapter_id = value;
                }
                else if (xel.Name == "first_section_id")
                {
                    uint.TryParse(xel.InnerText, out value);
                    config.first_section_id = value;
                }
                else if (xel.Name == "area")
                {
                    config.area = xel.InnerText;
                }
                else if (xel.Name == "unlock_level")
                {
                    uint.TryParse(xel.InnerText, out value);
                    config.unlock_level = value;
                }
                else if (xel.Name == "bronze_value")
                {
                    uint.TryParse(xel.InnerText, out value);
                    config.bronze_value = value;
                }
                else if (xel.Name == "bronze_award")
                {
                    uint.TryParse(xel.InnerText, out value);
                    config.bronze_award = value;
                }
                else if (xel.Name == "silver_value")
                {
                    uint.TryParse(xel.InnerText, out value);
                    config.silver_value = value;
                }
                else if (xel.Name == "silver_award")
                {
                    uint.TryParse(xel.InnerText, out value);
                    config.silver_award = value;
                }
                else if (xel.Name == "gold_value")
                {
                    uint.TryParse(xel.InnerText, out value);
                    config.gold_value = value;
                }
                else if (xel.Name == "gold_award")
                {
                    uint.TryParse(xel.InnerText, out value);
                    config.gold_award = value;
                }
            }
            chapterConfig[config.id] = config;
        }
    }
Esempio n. 9
0
    public void UnconditionalShow(int CardID)
    {
        if (CsvConfigTables.Instance.MagicCardCsvDic.TryGetValue(CardID, out MCCfg))
        {
            gameObject.SetActive(true);

            Name.text = MCCfg.Name;

            if (MagicVal != null)
            {
                MagicVal.text = MCCfg.MagicVal.ToString();
            }

            if (Des != null)
            {
                Des.text = StringBuilderTool.ToInfoString("  ", MCCfg.Describe.Replace("\\n", "\n"));
                BoxCollider bc = Des.gameObject.GetComponent <BoxCollider>();
                if (bc != null)
                {
                    bc.center = new Vector3(Des.width / 2, -Des.height / 2, 0);
                    bc.size   = new Vector3(Des.width, Des.height, 0);
                }
                UITable tab = Des.transform.parent.GetComponent <UITable>();
                if (tab != null)
                {
                    tab.Reposition();
                    UIScrollView sv = tab.transform.parent.GetComponent <UIScrollView>();
                    if (sv != null)
                    {
                        sv.ResetPosition();
                    }
                }
            }

            if (Count != null)
            {
                Count.text = SerPlayerData.GetItemCount(MCCfg.CardID).ToString();
            }

            Icon.mainTexture = Resources.Load(StringBuilderTool.ToInfoString("MagicCard/", MCCfg.ColouredIcon)) as Texture;

            for (int i = 0; i < Star.Length; i++)
            {
                Star[i].spriteName = "c_t_star01";
                Star[i].gameObject.SetActive(i < MCCfg.StarLv);
            }


            if (MCCfg.ThemeID == 101)//恐龙世界
            {
                if (Title != null)
                {
                    Title.gameObject.SetActive(true);
                }
                if (LatinName != null)
                {
                    LatinName.gameObject.SetActive(true);
                }
                if (Epoch != null)
                {
                    Epoch.gameObject.SetActive(true);
                }
                if (Family != null)
                {
                    Family.gameObject.SetActive(true);
                }
                if (Weight != null)
                {
                    Weight.gameObject.SetActive(false);
                }
                if (Height != null)
                {
                    Height.gameObject.SetActive(true);
                }
                if (Habitat != null)
                {
                    Habitat.gameObject.SetActive(true);
                }
                if (Food != null)
                {
                    Food.gameObject.SetActive(true);
                }
                if (Satellite != null)
                {
                    Satellite.gameObject.SetActive(false);
                }
                if (Distance != null)
                {
                    Distance.gameObject.SetActive(false);
                }
                if (Temperature != null)
                {
                    Temperature.gameObject.SetActive(false);
                }
                if (Diameter != null)
                {
                    Diameter.gameObject.SetActive(false);
                }
                if (Day != null)
                {
                    Day.gameObject.SetActive(false);
                }
                if (Year != null)
                {
                    Year.gameObject.SetActive(false);
                }
                if (Time != null)
                {
                    Time.gameObject.SetActive(false);
                }
                if (Ruler != null)
                {
                    Ruler.gameObject.SetActive(false);
                }
            }
            else if (MCCfg.ThemeID == 102)//动物园
            {
                if (Title != null)
                {
                    Title.gameObject.SetActive(true);
                }
                if (LatinName != null)
                {
                    LatinName.gameObject.SetActive(true);
                }
                if (Epoch != null)
                {
                    Epoch.gameObject.SetActive(false);
                }
                if (Family != null)
                {
                    Family.gameObject.SetActive(false);
                }
                if (Weight != null)
                {
                    Weight.gameObject.SetActive(true);
                }
                if (Height != null)
                {
                    Height.gameObject.SetActive(true);
                }
                if (Habitat != null)
                {
                    Habitat.gameObject.SetActive(true);
                }
                if (Food != null)
                {
                    Food.gameObject.SetActive(true);
                }
                if (Satellite != null)
                {
                    Satellite.gameObject.SetActive(false);
                }
                if (Distance != null)
                {
                    Distance.gameObject.SetActive(false);
                }
                if (Temperature != null)
                {
                    Temperature.gameObject.SetActive(false);
                }
                if (Diameter != null)
                {
                    Diameter.gameObject.SetActive(false);
                }
                if (Day != null)
                {
                    Day.gameObject.SetActive(false);
                }
                if (Year != null)
                {
                    Year.gameObject.SetActive(false);
                }
                if (Time != null)
                {
                    Time.gameObject.SetActive(false);
                }
                if (Ruler != null)
                {
                    Ruler.gameObject.SetActive(false);
                }
            }
            else if (MCCfg.ThemeID == 103)//海洋世界
            {
                if (Title != null)
                {
                    Title.gameObject.SetActive(true);
                }
                if (LatinName != null)
                {
                    LatinName.gameObject.SetActive(true);
                }
                if (Epoch != null)
                {
                    Epoch.gameObject.SetActive(false);
                }
                if (Family != null)
                {
                    Family.gameObject.SetActive(false);
                }
                if (Weight != null)
                {
                    Weight.gameObject.SetActive(true);
                }
                if (Height != null)
                {
                    Height.gameObject.SetActive(true);
                }
                if (Habitat != null)
                {
                    Habitat.gameObject.SetActive(true);
                }
                if (Food != null)
                {
                    Food.gameObject.SetActive(true);
                }
                if (Satellite != null)
                {
                    Satellite.gameObject.SetActive(false);
                }
                if (Distance != null)
                {
                    Distance.gameObject.SetActive(false);
                }
                if (Temperature != null)
                {
                    Temperature.gameObject.SetActive(false);
                }
                if (Diameter != null)
                {
                    Diameter.gameObject.SetActive(false);
                }
                if (Day != null)
                {
                    Day.gameObject.SetActive(false);
                }
                if (Year != null)
                {
                    Year.gameObject.SetActive(false);
                }
                if (Time != null)
                {
                    Time.gameObject.SetActive(false);
                }
                if (Ruler != null)
                {
                    Ruler.gameObject.SetActive(false);
                }
            }
            else if (MCCfg.ThemeID == 201)//太阳系
            {
                if (Title != null)
                {
                    Title.gameObject.SetActive(true);
                }
                if (LatinName != null)
                {
                    LatinName.gameObject.SetActive(true);
                }
                if (Epoch != null)
                {
                    Epoch.gameObject.SetActive(false);
                }
                if (Family != null)
                {
                    Family.gameObject.SetActive(false);
                }
                if (Weight != null)
                {
                    Weight.gameObject.SetActive(false);
                }
                if (Height != null)
                {
                    Height.gameObject.SetActive(false);
                }
                if (Habitat != null)
                {
                    Habitat.gameObject.SetActive(false);
                }
                if (Food != null)
                {
                    Food.gameObject.SetActive(false);
                }
                if (Satellite != null)
                {
                    Satellite.gameObject.SetActive(true);
                }
                if (Distance != null)
                {
                    Distance.gameObject.SetActive(true);
                }
                if (Temperature != null)
                {
                    Temperature.gameObject.SetActive(true);
                }
                if (Diameter != null)
                {
                    Diameter.gameObject.SetActive(true);
                }
                if (Day != null)
                {
                    Day.gameObject.SetActive(true);
                }
                if (Year != null)
                {
                    Year.gameObject.SetActive(true);
                }
                if (Time != null)
                {
                    Time.gameObject.SetActive(false);
                }
                if (Ruler != null)
                {
                    Ruler.gameObject.SetActive(false);
                }
            }
            else if (MCCfg.ThemeID == 601)//春节
            {
                if (Title != null)
                {
                    Title.gameObject.SetActive(false);
                }
                if (LatinName != null)
                {
                    LatinName.gameObject.SetActive(false);
                }
                if (Epoch != null)
                {
                    Epoch.gameObject.SetActive(false);
                }
                if (Family != null)
                {
                    Family.gameObject.SetActive(false);
                }
                if (Weight != null)
                {
                    Weight.gameObject.SetActive(false);
                }
                if (Height != null)
                {
                    Height.gameObject.SetActive(false);
                }
                if (Habitat != null)
                {
                    Habitat.gameObject.SetActive(false);
                }
                if (Food != null)
                {
                    Food.gameObject.SetActive(false);
                }
                if (Satellite != null)
                {
                    Satellite.gameObject.SetActive(false);
                }
                if (Distance != null)
                {
                    Distance.gameObject.SetActive(false);
                }
                if (Temperature != null)
                {
                    Temperature.gameObject.SetActive(false);
                }
                if (Diameter != null)
                {
                    Diameter.gameObject.SetActive(false);
                }
                if (Day != null)
                {
                    Day.gameObject.SetActive(false);
                }
                if (Year != null)
                {
                    Year.gameObject.SetActive(false);
                }
                if (Time != null)
                {
                    Time.gameObject.SetActive(true);
                }
                if (Ruler != null)
                {
                    Ruler.gameObject.SetActive(false);
                }
            }
            else if (MCCfg.ThemeID == 603)//星座
            {
                if (Title != null)
                {
                    Title.gameObject.SetActive(false);
                }
                if (LatinName != null)
                {
                    LatinName.gameObject.SetActive(true);
                }
                if (Epoch != null)
                {
                    Epoch.gameObject.SetActive(false);
                }
                if (Family != null)
                {
                    Family.gameObject.SetActive(false);
                }
                if (Weight != null)
                {
                    Weight.gameObject.SetActive(false);
                }
                if (Height != null)
                {
                    Height.gameObject.SetActive(false);
                }
                if (Habitat != null)
                {
                    Habitat.gameObject.SetActive(false);
                }
                if (Food != null)
                {
                    Food.gameObject.SetActive(false);
                }
                if (Satellite != null)
                {
                    Satellite.gameObject.SetActive(false);
                }
                if (Distance != null)
                {
                    Distance.gameObject.SetActive(false);
                }
                if (Temperature != null)
                {
                    Temperature.gameObject.SetActive(false);
                }
                if (Diameter != null)
                {
                    Diameter.gameObject.SetActive(false);
                }
                if (Day != null)
                {
                    Day.gameObject.SetActive(false);
                }
                if (Year != null)
                {
                    Year.gameObject.SetActive(false);
                }
                if (Time != null)
                {
                    Time.gameObject.SetActive(true);
                }
                if (Ruler != null)
                {
                    Ruler.gameObject.SetActive(true);
                }
            }

            if (Bg != null)
            {
                switch (MCCfg.Quality)
                {
                case 1:
                    Bg.spriteName = "lvbian";
                    break;

                case 2:
                    Bg.spriteName = "lanbian";
                    break;

                case 3:
                    Bg.spriteName = "zibian";
                    break;
                }
            }

            if (QualitySign != null)
            {
                switch (MCCfg.Quality)
                {
                case 1:
                    QualitySign.spriteName = "lvbiao";
                    break;

                case 2:
                    QualitySign.spriteName = "lanbiao";
                    break;

                case 3:
                    QualitySign.spriteName = "zibiao";
                    break;
                }
                QualitySign.MakePixelPerfect();
            }

            if (System != null)
            {
                ChapterConfig cc = null;
                if (CsvConfigTables.Instance.ChapterCsvDic.TryGetValue(MCCfg.SystemID, out cc))
                {
                    System.text = cc.Name;
                }
            }

            if (Theme != null)
            {
                GroupConfig gc = null;
                if (CsvConfigTables.Instance.GroupCsvDic.TryGetValue(MCCfg.ThemeID, out gc))
                {
                    Theme.text = gc.Name;
                }
            }

            if (Quality != null)
            {
                Quality.text = StringBuilderTool.ToInfoString(ArabicToChinese(MCCfg.Quality), "阶卡");
            }

            if (Epoch != null)
            {
                Epoch.text = MCCfg.Epoch;
            }

            if (Family != null)
            {
                Family.text = MCCfg.Family;
            }

            if (LatinName != null)
            {
                LatinName.text = MCCfg.LatinName;
            }

            if (Height != null)
            {
                Height.text = MCCfg.Height;
            }

            if (Habitat != null)
            {
                Habitat.text = MCCfg.Habitat;
            }

            if (Food != null)
            {
                Food.text = MCCfg.Food;
            }

            if (Weight != null)
            {
                if (MCCfg.Weight.Length == 0)
                {
                    Weight.gameObject.SetActive(false);
                }
                Weight.text = MCCfg.Weight;
            }

            if (Satellite != null)
            {
                if (MCCfg.Satellite.Length == 0)
                {
                    Satellite.gameObject.SetActive(false);
                }
                Satellite.text = MCCfg.Satellite;
            }

            if (Temperature != null)
            {
                if (MCCfg.Temperature.Length == 0)
                {
                    Temperature.gameObject.SetActive(false);
                }
                Temperature.text = MCCfg.Temperature;
            }

            if (Distance != null)
            {
                if (MCCfg.Distance.Length == 0)
                {
                    Distance.gameObject.SetActive(false);
                }
                Distance.text = MCCfg.Distance;
            }

            if (Diameter != null)
            {
                if (MCCfg.Diameter.Length == 0)
                {
                    Diameter.gameObject.SetActive(false);
                }
                Diameter.text = MCCfg.Diameter;
            }

            if (Day != null)
            {
                if (MCCfg.Day.Length == 0)
                {
                    Day.gameObject.SetActive(false);
                }
                Day.text = MCCfg.Day;
            }

            if (Year != null)
            {
                if (MCCfg.Year.Length == 0)
                {
                    Year.gameObject.SetActive(false);
                }
                Year.text = MCCfg.Year;
            }

            if (Time != null)
            {
                if (MCCfg.Time.Length == 0)
                {
                    Time.gameObject.SetActive(false);
                }
                Time.text = MCCfg.Time;
            }

            if (Title != null)
            {
                if (MCCfg.Title.Length == 0)
                {
                    Title.gameObject.SetActive(false);
                }
                Title.text = MCCfg.Title;
            }

            if (GetWayFromStage != null)
            {
                bool showShortcut = (MCCfg.Shortcut != 0);
                GetWayFromStage.gameObject.SetActive(showShortcut);
                if (showShortcut)
                {
                    StageConfig sc = null;
                    if (CsvConfigTables.Instance.StageCsvDic.TryGetValue(MCCfg.Shortcut, out sc))
                    {
                        GetWayFromStage.text = sc.Name;
                    }
                }
            }

            if (EnableCompound != null)
            {
                EnableCompound.SetActive(false);
            }

            if (NewSign != null)
            {
                NewSign.alpha = 0;
            }

            switch (MCCfg.StarLv)
            {
            case 1:
                Star[0].transform.localPosition = Vector3.zero;
                break;

            case 2:
                Star[0].transform.localPosition = new Vector3(-12, 0, 0);
                Star[1].transform.localPosition = new Vector3(12, 0, 0);
                break;

            case 3:
                Star[0].transform.localPosition = new Vector3(-24, 0, 0);
                Star[1].transform.localPosition = Vector3.zero;
                Star[2].transform.localPosition = new Vector3(24, 0, 0);
                break;

            case 4:
                Star[0].transform.localPosition = new Vector3(-36, 0, 0);
                Star[1].transform.localPosition = new Vector3(-12, 0, 0);
                Star[2].transform.localPosition = new Vector3(12, 0, 0);
                Star[3].transform.localPosition = new Vector3(36, 0, 0);
                break;

            case 5:
                break;
            }
        }
        else
        {
            gameObject.SetActive(false);
        }
    }