Ejemplo n.º 1
0
		public void ReadFromStream (Stream stream)
		{
			layers = new ParallaxLayer[Util.ReadWord (stream)];

			for (int i = 0; i < layers.Length; i ++) {
				int numobjects = Util.ReadWord (stream);
				layers[i] = new ParallaxLayer (numobjects);
				Console.WriteLine ("Layer {0} has {1} objects", i, numobjects);
			}

			for (int i = 0; i < layers.Length; i ++) {
				Console.WriteLine ("Reading layer {0}", i);
				layers[i].ReadFromStream (stream);
			}
		}