Exemplo n.º 1
0
        public AdventureScreen(Game game, int dest, int destroomX, int destroomY, int x, int y, bool beaten)
        {
            this.game = game;
            this.master = game.master;
            this.player = new AdventurePlayer(this, game);

            this.adventure = Master.currentFile.adventures[dest].Clone();
            this.tileset = adventure.tileset;
            this.key = adventure.key;
            this.beaten = beaten;
            label = adventure.name;
            LoadRoom(destroomX, destroomY);

            this.first_pos = new Vector2(x * 32 + 16, y * 32 + 16);
            player.location = new Vector2(x * 32 + 16, y * 32 + 16);
        }
Exemplo n.º 2
0
        public Adventure Clone()
        {
            Adventure newAdv = new Adventure();
            newAdv.tileset = tileset;
            newAdv.music = music;
            newAdv.name = name.ToUpper();
            newAdv.key = new int[key.Length];
            key.CopyTo(newAdv.key, 0);

            for (int i = 0; i < 16; i++)
                for (int j = 0; j < 16; j++)
                {
                    if (rooms[i, j] != null)
                    {
                        newAdv.rooms[i, j] = rooms[i, j].Clone();
                        if (!newAdv.hasDarkRooms && rooms[i, j].dark)
                            newAdv.hasDarkRooms = true;
                    }
                }

            return newAdv;
        }