Esempio n. 1
0
 public Chunk(int chunkPos)
 {
     if (Dungeon.getDeserializing()) return;
     this.chunkPos = chunkPos;
     this.color = Color.Orange;
     this.sColor = new SerializedColor(color);
     boundingBoxes = new BoundingBoxContainer();
 }
Esempio n. 2
0
        public Room(int height, int chunkPos, Dungeon dungeon)
        {
            if (Dungeon.getDeserializing()) return;
            baseHeight = height;
            random = new Random(this.GetHashCode());
            sColor = new SerializedColor(random.Next(256), random.Next(256), random.Next(256));
            color = sColor.getColor();
            chunks = new ChunkContainer();
            this.chunkPos = chunkPos;

            if (GetType().Equals(typeof(Room)))
                generateRoom();
        }
Esempio n. 3
0
        public StarterRoom()
        {
            sColor = new SerializedColor(Microsoft.Xna.Framework.Color.Red);

            color = sColor.getColor();
            chunks = new ChunkContainer();

            //chunks.Add(new SquareChunk(-2, 1000));
            for(byte i = 0; i < 5; i++)
            {
                chunks.Add(new TorchChunk(i, 100));
            }
        }
Esempio n. 4
0
        public TavernRoom(Vector2 vector)
        {
            sColor = new SerializedColor(Color.DarkGoldenrod);
            color = sColor.getColor();

            chunks = new ChunkContainer();
            int i = 0;
            chunks.Add(new PortalChunk(i++, 100, DungeonManager.getInstance().getCurrentDungeon(), vector));
            for (int j = 0; i < 5; i++ )
                chunks.Add(new SquareChunk(i, 100));

            chunks.Add(new StairChunk(i++, 100));
            int max = i + 5;
            for (int j = 0; i < max; i++)
                chunks.Add(new SquareChunk(i, 140));
        }
Esempio n. 5
0
 public TorchChunk(int chunkPos, int height)
     : base(chunkPos, height)
 {
     sColor = new SerializedColor(Color.Wheat);
 }
Esempio n. 6
0
 /// <summary>
 /// sets the color of the Chunk.
 /// </summary>
 /// <param name="col"></param>
 public void setColor(Color col)
 {
     color = col;
     sColor = new SerializedColor(col);
 }