Exemplo n.º 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);
        }
Exemplo n.º 2
0
        private void initialize()
        {
            /* start initialize */

            ClassEnum choice;
            int i;
            String name;
            Character[] characters = new Character[ Party.MAXPARTY ];

               // mView = new TextView();

            mDungeon = Dungeon.getInstance(this);
            mView = new DisplayView(viewWindow, mDungeon);

            //for (i = 0; i < Party.MAXPARTY; i++)
            for (i = 0; i < 1; i++)
            {/* start loop */

                choice = mView.getClassChoice();
                name = mView.getCharacterName();

                characters[ i ] = CharacterFactory.getInstance().getCharacter(choice, name);

            }/* end loop */

            mGoodGuys = new Party(characters);
            // mView.GoodGuys = mGoodGuys;
            mBattle = new Battle(this, mGoodGuys);

            mDungeon.SetView(mView);
            mDungeon.SetGame(this);
            //mView.Dungeon = mDungeon.Grid;
        }