Exemple #1
0
        public void FixxMap()
        {
            #region Width/Height
            int w = 0, h = 0;
            foreach (TileLayer layer in Layers)
            {
                w = Math.Max(w, layer.Width);
                h = Math.Max(h, layer.Height);
            }

            Width  = w;
            Height = h;
            #endregion
            #region CollisionLayer LayoutMap
            if (CollisionLayer.LayoutMap == null || CollisionLayer.LayoutMap.Length == 0)
            {
                CollisionLayer = new TileCollisionLayer(Width, Height);
            }
            #endregion
            #region AnimationLayer LayoutMap
            if (AnimationLayer.LayoutMap == null || AnimationLayer.LayoutMap.Length == 0)
            {
                AnimationLayer = new TileAnimationLayer(Width, Height);
            }
            #endregion
        }
Exemple #2
0
        public void Resize(int w, int h)
        {
            Width  = w;
            Height = h;

            CollisionLayer = new TileCollisionLayer(CollisionLayer.LayoutMap, Width, Height);
            AnimationLayer = new TileAnimationLayer(AnimationLayer.LayoutMap, Width, Height);
        }
Exemple #3
0
 public TileMap(string name, int width, int height)
 {
     Width          = width;
     Height         = height;
     Name           = name;
     Layers         = new List <TileLayer>();
     CollisionLayer = new TileCollisionLayer(Width, Height);
     AnimationLayer = new TileAnimationLayer(Width, Height);
     FogDense       = 0.5f;
     FogIndex       = string.Empty;
     FogColor       = Color.White;
     VersionMajor   = VersionMajorNow;
     VersionMinor   = VersionMinorNow;
 }
Exemple #4
0
		public void FixxMap() {
			#region Width/Height
			int w = 0, h = 0;
			foreach (TileLayer layer in Layers) {
				w = Math.Max(w, layer.Width);
				h = Math.Max(h, layer.Height);
			}

			Width = w;
			Height = h;
			#endregion
			#region CollisionLayer LayoutMap
			if (CollisionLayer.LayoutMap == null || CollisionLayer.LayoutMap.Length == 0) {
				CollisionLayer = new TileCollisionLayer(Width, Height);
			}
			#endregion
			#region AnimationLayer LayoutMap
			if (AnimationLayer.LayoutMap == null || AnimationLayer.LayoutMap.Length == 0) {
				AnimationLayer = new TileAnimationLayer(Width, Height);
			}
			#endregion
		}
Exemple #5
0
		public void Resize(int w, int h) {
			Width = w;
			Height = h;

			CollisionLayer = new TileCollisionLayer(CollisionLayer.LayoutMap, Width, Height);
			AnimationLayer = new TileAnimationLayer(AnimationLayer.LayoutMap, Width, Height);
		}
Exemple #6
0
		public TileMap(string name, int width, int height) {
			Width = width;
			Height = height;
			Name = name;
			Layers = new List<TileLayer>();
			CollisionLayer = new TileCollisionLayer(Width, Height);
			AnimationLayer = new TileAnimationLayer(Width, Height);
			FogDense = 0.5f;
			FogIndex = string.Empty;
			FogColor = Color.White;
			VersionMajor = VersionMajorNow;
			VersionMinor = VersionMinorNow;
		}