Beispiel #1
0
 public BreadMage(clsMage aMage)
 {
     InitializeComponent();
     thisMage = aMage;
     LoadImage();
     SetBars();
 }
Beispiel #2
0
        public GameScreen(MainScreen scrMainScreen, int iLoadFlag)
        {
            InitializeComponent();
            scrMain           = scrMainScreen;
            this.FormClosing += Form1_FormClosing;

            //LoadFlag 0  = new game
            //LoadFlag 1  = load game
            //LoadFlag -1 = fresh boot, don't create a mage object yet

            gRandom = new Random();
            BreadDB BreadNet = new BreadDB();

            switch (iLoadFlag)
            {
            case 0:
                clsMage gMage = new clsMage();
                // Clear any mage info from the panel first
                if (pMageZone.Controls != null)
                {
                    pMageZone.Controls.Clear();
                }
                bMage = new BreadMage(gMage);
                pMageZone.Controls.Add(bMage);
                bMage.Show();
                // clear the Log
                //lbLog.Items.Clear();
                gLog = new engGLog(lbLog);
                gLog.Add("Welcome to Bread Mage 2!!!");

                //load various data from DB
                gMonsterList   = BreadNet.LoadMonsterList();
                gConsumableLib = BreadNet.LoadConsumablesLib();
                gCombatLib     = BreadNet.LoadCombatLib();


                if (pExtraInfo != null)
                {
                    pExtraInfo.Controls.Clear();
                }
                this.gMage = gMage;
                bExtra     = new ExtraBoard(this);
                pExtraInfo.Controls.Add(bExtra);
                bExtra.Show();
                break;

            case 1:
                break;

            case -1:
                break;
            }


            //for implementinvg SaveIDs
            int iSaveID = 1;

            gPlayerInv = BreadNet.LoadPlayerInv(iSaveID);
        }