public override void Read()
        {
            var coastpart = new ItemsCoast();
            var CoastTotal = new ItemsCoasts();
            var counterLengt4 = 0;

            foreach (string s in Strings.Where(s => !string.IsNullOrEmpty(s)).Where(s => !s.StartsWith("//")&& s!="1"))
            {

                if(s.Contains("="))
                {
                    CoastTotal.Name = s;
                    continue;
                }
                var str = s.Split(separator, StringSplitOptions.RemoveEmptyEntries);

                if(str.Length==1)
                {
                    if(s.StartsWith("0x") && coastpart.Color == Color.Black)
                    {
                        coastpart.Color = ReadColorFromInt(s);
                        continue;
                    }
                    if(s.StartsWith("0x"))
                    {
                        coastpart.Texture.Value = Convert.ToInt32(s, 16);
                        continue;
                    }
                }

                if(str.Length==4)
                {
                    TransitionCheck(coastpart, str.ToList(), counterLengt4);
                    counterLengt4++;
                    counterLengt4 = counterLengt4%3;
                }

                if(counterLengt4 == 0)
                {
                    if(CoastTotal.Coast.Color == Color.Black)
                    {
                        CoastTotal.Coast = coastpart;
                    }
                    else
                    {
                        CoastTotal.Ground = coastpart;
                        CoastsAll.List.Add(CoastTotal);
                        CoastTotal = new ItemsCoasts();
                    }
                    coastpart = new ItemsCoast();
                    continue;
                }

            }
        }
 public ItemsCoasts()
 {
     Coast = new ItemsCoast();
     Ground = new ItemsCoast();
     Name = "";
 }
Exemple #3
0
 public ItemsCoasts()
 {
     Coast  = new ItemsCoast();
     Ground = new ItemsCoast();
     Name   = "";
 }