コード例 #1
0
ファイル: Game.cs プロジェクト: TeamVlissides/SourceRepo
 public Game(Dungeon dungeon, View view, BattleSystem battle)
 {
     /* start constructor */
     mDungeon = dungeon;
     mView = view;
     mBattle = battle;
     initialize();
 }
コード例 #2
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);
        }
コード例 #3
0
        // public View()
        // Load the images from the Resource here to put into the tiles.
        // Constructors
        // public View()
        // {
        // }
        //public View(Graphics g, GUIWindow form)
        public DisplayView(GUIWindow form, Dungeon dungeon)
        {
            //g.DrawLine(new Pen(Brushes.Black, 5), 0, 0, 200, 200);
               // graphics = g;
               // partyImage = Image.FromFile( Directory.GetCurrentDirectory() + @"\images\party2.png");
            partyImage = Properties.Resources.party2;

            // Load all images for the tiles here.
            // Directory.GetCurrentDirectory() + @"\images\treasure00.png"
            treasureItemImage = Properties.Resources.treasure00;
            dragonImage = Properties.Resources.dragon;
            wall = Properties.Resources.wall;
            wall2 = Properties.Resources.wall2;

               // SetupView(d);

            imageX = 30;
            imageY = 30;
            viewWindow = form;
            //d = new Dungeon();
            d = dungeon;
        }
コード例 #4
0
ファイル: Dungeon.cs プロジェクト: TeamVlissides/SourceRepo
        public static Dungeon getInstance()
        {
            if (mDungeon == null)
                mDungeon = new Dungeon();

            return mDungeon;
        }
コード例 #5
0
ファイル: Dungeon.cs プロジェクト: TeamVlissides/SourceRepo
        // Methods
        public static Dungeon getInstance(Game game)
        {
            if (mDungeon == null)
                mDungeon = new Dungeon(game);

            return mDungeon;
        }
コード例 #6
0
ファイル: Game.cs プロジェクト: TeamVlissides/SourceRepo
        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;
        }