コード例 #1
0
        public override void Read()
        {
            var coastpart = new TransitionItemsCoast();
            var CoastTotal = new AreaTransitionItemCoast();
            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 == System.Windows.Media.Colors.Black)
                    {
                        coastpart.Color = ReadColorFromInt(s);
                        continue;
                    }
                    if(s.StartsWith("0x"))
                    {
                        coastpart.Texture = 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 == System.Windows.Media.Colors.Black)
                    {
                        CoastTotal.Coast = coastpart;
                    }
                    else
                    {
                        CoastTotal.Ground = coastpart;
                        CoastsAll.List.Add(CoastTotal);
                        CoastTotal = new AreaTransitionItemCoast();
                    }
                    coastpart = new TransitionItemsCoast();
                    continue;
                }

            }

        }
コード例 #2
0
ファイル: AreaColor.cs プロジェクト: svn2github/essence-udk
 public AreaColor()
 {
     Color = Colors.Black;
     TextureIndex = 0;
     Index = 0;
     Min = 0;
     Max = 0;
     Name = "";
     _list= new ObservableCollection<CircleMountain>();
     Type = TypeColor.None;
     _items = new AreaItems();
     _transitionTexture = new ObservableCollection<AreaTransitionTexture>();
     _transitionItems = new ObservableCollection<AreaTransitionItem>();
     _coast = new AreaTransitionItemCoast();
     _transitionCliff = new ObservableCollection<AreaTransitionCliffTexture>();
     _SmoothCoast = new ObservableCollection<CircleMountain>();
     _coastAltitude = 0;
     _cliffCoast = false;
 }