示例#1
0
文件: Sky.cs 项目: 0x0ade/FmbLib
 public void UpdateFromCopy(Sky copy) {
     Name = copy.Name;
     Background = copy.Background;
     Clouds = new List<string>(copy.Clouds);
     Layers = new List<SkyLayer>(copy.Layers);
     for (int i = 0; i < Layers.Count; i++) {
         Layers[i] = Layers[i].ShallowCopy();
     }
     WindSpeed = copy.WindSpeed;
     Density = copy.Density;
     Shadows = copy.Shadows;
     Stars = copy.Stars;
     FogDensity = copy.FogDensity;
     VerticalTiling = copy.VerticalTiling;
     HorizontalScrolling = copy.HorizontalScrolling;
     InterLayerVerticalDistance = copy.InterLayerVerticalDistance;
     InterLayerHorizontalDistance = copy.InterLayerHorizontalDistance;
     HorizontalDistance = copy.HorizontalDistance;
     VerticalDistance = copy.VerticalDistance;
     LayerBaseHeight = copy.LayerBaseHeight;
     LayerBaseSpacing = copy.LayerBaseSpacing;
     WindParallax = copy.WindParallax;
     WindDistance = copy.WindDistance;
     CloudsParallax = copy.CloudsParallax;
     FoliageShadows = copy.FoliageShadows;
     ShadowOpacity = copy.ShadowOpacity;
     NoPerFaceLayerXOffset = copy.NoPerFaceLayerXOffset;
     LayerBaseXOffset = copy.LayerBaseXOffset;
 }
示例#2
0
文件: Sky.cs 项目: Zeludon/FEZ
 public void UpdateFromCopy(Sky copy)
 {
   this.Name = copy.Name;
   this.Background = copy.Background;
   this.Clouds = new List<string>((IEnumerable<string>) copy.Clouds);
   this.Layers = Enumerable.ToList<SkyLayer>(Enumerable.Select<SkyLayer, SkyLayer>((IEnumerable<SkyLayer>) copy.Layers, (Func<SkyLayer, SkyLayer>) (x => x.ShallowCopy())));
   this.WindSpeed = copy.WindSpeed;
   this.Density = copy.Density;
   this.Shadows = copy.Shadows;
   this.Stars = copy.Stars;
   this.FogDensity = copy.FogDensity;
   this.VerticalTiling = copy.VerticalTiling;
   this.HorizontalScrolling = copy.HorizontalScrolling;
   this.InterLayerVerticalDistance = copy.InterLayerVerticalDistance;
   this.InterLayerHorizontalDistance = copy.InterLayerHorizontalDistance;
   this.HorizontalDistance = copy.HorizontalDistance;
   this.VerticalDistance = copy.VerticalDistance;
   this.LayerBaseHeight = copy.LayerBaseHeight;
   this.LayerBaseSpacing = copy.LayerBaseSpacing;
   this.WindParallax = copy.WindParallax;
   this.WindDistance = copy.WindDistance;
   this.CloudsParallax = copy.CloudsParallax;
   this.FoliageShadows = copy.FoliageShadows;
   this.ShadowOpacity = copy.ShadowOpacity;
   this.NoPerFaceLayerXOffset = copy.NoPerFaceLayerXOffset;
   this.LayerBaseXOffset = copy.LayerBaseXOffset;
 }
示例#3
0
 public void ChangeSky(Sky sky)
 {
   this.levelData.Sky = sky;
   this.OnSkyChanged();
 }
示例#4
0
文件: Sky.cs 项目: 0x0ade/FmbLib
 public Sky ShallowCopy() {
     Sky sky = new Sky();
     sky.UpdateFromCopy(this);
     return sky;
 }