예제 #1
0
        public GUIWindow()
        {
            InitializeComponent();
            imageX = 30;
            imageY = 30;
            game = new Game();
               // dungeon = new Dungeon();
            dungeon = Dungeon.getInstance();

            v = new DisplayView(this, dungeon);
            battle = new BattleSystem(v);
            dungeon.SetView(v);
            game = new Game(dungeon, v, battle);
            dungeon.SetGame(game);
        }
예제 #2
0
 public void SetGame(Game g)
 {
     mGame = g;
 }
예제 #3
0
        // Methods
        public static Dungeon getInstance(Game game)
        {
            if (mDungeon == null)
                mDungeon = new Dungeon(game);

            return mDungeon;
        }
예제 #4
0
        // reference needed to give items to party;
        // Constructors
        private Dungeon( Game game )
        {
            mGame = game;

            // This is going to be a set size for the grid.
               // mGrid = new Grid(5, 5);

            // Create static grid array.
            staticGrid = new DungeonEnum[5, 5] { {DungeonEnum.FREESPACE, DungeonEnum.WALL, DungeonEnum.ITEM, DungeonEnum.ITEM, DungeonEnum.ITEM},
                                                 {DungeonEnum.ITEM, DungeonEnum.FREESPACE, DungeonEnum.WALL, DungeonEnum.FREESPACE, DungeonEnum.WALL},
                                                 {DungeonEnum.FREESPACE, DungeonEnum.FREESPACE, DungeonEnum.ITEM, DungeonEnum.FREESPACE, DungeonEnum.ITEM},
                                                 {DungeonEnum.WALL, DungeonEnum.ITEM, DungeonEnum.WALL, DungeonEnum.FREESPACE, DungeonEnum.WALL},
                                                 {DungeonEnum.ITEM, DungeonEnum.FREESPACE, DungeonEnum.ITEM, DungeonEnum.ITEM, DungeonEnum.FREESPACE}};

            mGrid = new Grid(5, 5, staticGrid);

            // Keeps track of the location of players on 5 by 5 gird.
            //playerLocation = new int[5, 5];
            playerLocationRow = 0;
            playerLocationColumn = 0;

            // Player begin at top left corner of grid.
            //playerLocation[0, 0] = 1;

            // Set starting tile and dragon tile
            Tile[,] sTiles = mGrid.GetTiles();

            // Set the dragon image on last tile
            sTiles[4, 4].TileType = DungeonEnum.DRAGON;

            // Make sure that the first tile is a freespace
            sTiles[0, 0].TileType = DungeonEnum.FREESPACE;
        }
예제 #5
0
 // Constructors
 public BattleSystem(Game currentGame)
 {
     mGame = currentGame;
 }
예제 #6
0
 // Constructors
 public Battle(Game currentGame, Party goodGuyParty)
 {
     mGame = currentGame;
     mGoodGuys = goodGuyParty;
 }