コード例 #1
0
ファイル: Chunk.cs プロジェクト: TheCreatorJames/AetherQuest
 public Chunk(int chunkPos)
 {
     if (Dungeon.getDeserializing()) return;
     this.chunkPos = chunkPos;
     this.color = Color.Orange;
     this.sColor = new SerializedColor(color);
     boundingBoxes = new BoundingBoxContainer();
 }
コード例 #2
0
ファイル: Room.cs プロジェクト: TheCreatorJames/AetherQuest
        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();
        }
コード例 #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));
            }
        }
コード例 #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));
        }
コード例 #5
0
 public TorchChunk(int chunkPos, int height)
     : base(chunkPos, height)
 {
     sColor = new SerializedColor(Color.Wheat);
 }
コード例 #6
0
ファイル: Chunk.cs プロジェクト: TheCreatorJames/AetherQuest
 /// <summary>
 /// sets the color of the Chunk.
 /// </summary>
 /// <param name="col"></param>
 public void setColor(Color col)
 {
     color = col;
     sColor = new SerializedColor(col);
 }