Exemple #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();
 }
Exemple #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();
        }
        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));
            }
        }
        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));
        }
 public TorchChunk(int chunkPos, int height)
     : base(chunkPos, height)
 {
     sColor = new SerializedColor(Color.Wheat);
 }
Exemple #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);
 }