Exemplo n.º 1
0
        public MainMenu()
        {
            MainWindow.BackgroundImage = Content.Graphics.Instance.Images.background.bg_titleMenu;

            lbl_title = new Label("Main menu");
            lbl_title.center(350);
            lbl_title.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.TITLE;

            lnk_newGame = new Link("New Game");
            lnk_newGame.center(405);
            lnk_newGame.selected = newGame;

            lnk_loadGame = new Link("Load Game");
            lnk_loadGame.center(440);
            lnk_loadGame.selected = loadGame;

            lnk_option = new Link("Option");
            lnk_option.center(475);
            lnk_option.selected = options;

            lnk_exit = new Link("Exit");
            lnk_exit.center(510);
            lnk_exit.selected = exit;

            MainWindow.add(lbl_title);
            MainWindow.add(lnk_newGame);
            MainWindow.add(lnk_loadGame);
            MainWindow.add(lnk_option);
            MainWindow.add(lnk_exit);
        }
Exemplo n.º 2
0
        public GameOver()
        {
            MainWindow.BackgroundImage = Content.Graphics.Instance.Images.background.bg_menuless;

            Label lbl_gameOver = new Label("Game Over");
            lbl_gameOver.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.CONTROL;
            lbl_gameOver.center(100);
            MainWindow.add(lbl_gameOver);

            Link lnk_c = new Link("Contrinue to main screen");
            lnk_c.center(300);
            lnk_c.selected = toMainmenu;
            MainWindow.add(lnk_c);

            Link lnk_q = new Link("Quit Game");
            lnk_q.center(330);
            lnk_q.selected = exitGame;
            MainWindow.add(lnk_q);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Battle Constructor, created once a unit engages an enemy in battle
        /// </summary>
        /// <param name="m">The player's unit</param>
        /// <param name="e">The enemy's unit</param>
        /// <param name="fregion">The region where the battle was engaged</param>
        /// <param name="fgoal">The region's condition for victory</param>
        public Battle(Unit m, Unit e, Region fregion, Objective fgoal)
        {
            MainWindow.BackgroundImage = Content.Graphics.Instance.Images.background.bg_smallMenu;

            orgls = new List<String>();

            region = fregion;
            goal = fgoal;
            ally = m;
            enemy = e;
            tm=new Tilemap("battle");

            cmap = new CharMap(tm);
            cmap.ShowMisc = true;

            map = new Map(tm);
            map.ArrowEnabled = true;
            map.SelectionEnabled = false;
            map.changeCurp = changeCurp;
            map.curSelection = sel;
            map.focus(5, 6);
            MainWindow.add(map);

            lbl_actions = new Label("Actions");
            lbl_actions.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.BOLD;
            lbl_actions.Position = new Vector2(280, 390);
            lbl_actions.Visible = false;
            MainWindow.add(lbl_actions);

            menu_actions = new Menu(5);
            menu_actions.Position = new Vector2(280, 390);
            menu_actions.Visible = false;
            MainWindow.add(menu_actions);
            menu_actions.Enabled = false;
            menu_actions.ArrowEnabled = false;

            lbl_moved = new Label("MOVED");
            lbl_moved.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.SPECIAL;
            lbl_moved.Position = new Vector2(520, 414);
            lbl_moved.Visible = false;
            MainWindow.add(lbl_moved);

            lbl_enemyTurn = new Label("DAMAGE");
            lbl_enemyTurn.Color = Color.Red;
            lbl_enemyTurn.Position = new Vector2(50, 50/*420*/);
            lbl_enemyTurn.Visible = false;
            MainWindow.add(lbl_enemyTurn);

            lbl_name = new Label("Name");
            lbl_name.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.BOLD;
            lbl_name.Position = new Vector2(50, 390);
            MainWindow.add(lbl_name);

            lbl_charName = new Label("Derp");
            lbl_charName.Position = new Vector2(110, 390);
            MainWindow.add(lbl_charName);

            lbl_lvl = new Label("Level");
            lbl_lvl.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.BOLD;
            lbl_lvl.Position = new Vector2(50, 420);
            MainWindow.add(lbl_lvl);

            lbl_charLvl = new Label("20");
            lbl_charLvl.Position = new Vector2(110, 420);
            MainWindow.add(lbl_charLvl);

            lbl_exp = new Label("Exp");
            lbl_exp.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.BOLD;
            lbl_exp.Position = new Vector2(150, 420);
            MainWindow.add(lbl_exp);

            lbl_charExp = new Label("42");
            lbl_charExp.Position = new Vector2(200, 420);
            MainWindow.add(lbl_charExp);

            lbl_hp = new Label("HP");
            lbl_hp.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.BOLD;
            lbl_hp.Position = new Vector2(50, 450);
            MainWindow.add(lbl_hp);

            lbl_curHp = new Label("100");
            lbl_curHp.Position = new Vector2(90, 450);
            MainWindow.add(lbl_curHp);

            lbl_hpSlash = new Label("/");
            lbl_hpSlash.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.BOLD;
            lbl_hpSlash.Position = new Vector2(140, 450);
            MainWindow.add(lbl_hpSlash);

            lbl_maxHp = new Label("100");
            lbl_maxHp.Position = new Vector2(160, 450);
            MainWindow.add(lbl_maxHp);

            lbl_mp = new Label("MP");
            lbl_mp.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.BOLD;
            lbl_mp.Position = new Vector2(50, 480);
            MainWindow.add(lbl_mp);

            lbl_curMp = new Label("50");
            lbl_curMp.Position = new Vector2(90, 480);
            MainWindow.add(lbl_curMp);

            lbl_mpSlash = new Label("/");
            lbl_mpSlash.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.BOLD;
            lbl_mpSlash.Position = new Vector2(140, 480);
            MainWindow.add(lbl_mpSlash);

            lbl_maxMp = new Label("50");
            lbl_maxMp.Position = new Vector2(160, 480);
            MainWindow.add(lbl_maxMp);

            lbl_moveLeft = new Label("Move Left");
            lbl_moveLeft.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.BOLD;
            lbl_moveLeft.Position = new Vector2(50, 510);
            MainWindow.add(lbl_moveLeft);

            lbl_move = new Label("");
            lbl_move.Position = new Vector2(150, 510);
            MainWindow.add(lbl_move);

            lbl_enter = new Label("ENTER");
            lbl_enter.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.CONTROL;
            lbl_enter.Position = new Vector2(520, 462);
            MainWindow.add(lbl_enter);

            lbl_enterAction = new Label("Select Unit");
            lbl_enterAction.Position = new Vector2(600, 462);
            MainWindow.add(lbl_enterAction);

            lbl_v = new Label("V");
            lbl_v.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.CONTROL;
            lbl_v.Position = new Vector2(520, 438);
            MainWindow.add(lbl_v);

            lbl_vAction = new Label("View Character");
            lbl_vAction.Position = new Vector2(550, 438);
            MainWindow.add(lbl_vAction);

            lbl_esc = new Label("ESC");
            lbl_esc.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.CONTROL;
            lbl_esc.Position = new Vector2(520, 486);
            lbl_esc.Visible = false;
            MainWindow.add(lbl_esc);

            lbl_escAction = new Label("Cancel Movement");
            lbl_escAction.Position = new Vector2(570, 486);
            lbl_escAction.Visible = false;
            MainWindow.add(lbl_escAction);

            lbl_e = new Label("E");
            lbl_e.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.CONTROL;
            lbl_e.Position = new Vector2(520, 510);
            MainWindow.add(lbl_e);

            lbl_eAction = new Label("End Turn");
            lbl_eAction.Position = new Vector2(550, 510);
            MainWindow.add(lbl_eAction);

            lbl_turnCount = new Label("Turn: " + turnCount + " / 10");
            lbl_turnCount.LabelFun = ColorTheme.LabelColorTheme.LabelFunction.BOLD;
            lbl_turnCount.Position = new Vector2(520, 390);
            MainWindow.add(lbl_turnCount);

            lbl_dmg = new Label("");
            lbl_dmg.Color = Color.Red;
            lbl_dmg.Position = new Vector2(0, 0);
            lbl_dmg.Visible = false;
            MainWindow.add(lbl_dmg);

            lbl_actionTaken = new Label("");
            lbl_actionTaken.Color = Color.Black;
            lbl_actionTaken.Position = new Vector2(250, 30);
            lbl_actionTaken.Font = Content.Graphics.Instance.ActionFont;
            lbl_actionTaken.Visible = false;
            MainWindow.add(lbl_actionTaken);

            lbl_armyTurn = new Label("TO BATTLE, COMRADES!");
            lbl_armyTurn.Font = Content.Graphics.Instance.TurnFont;
            lbl_armyTurn.center(50);
            lbl_armyTurn.doneShowing = armyTurnDone;
            lbl_armyTurn.visibleTemp(2000);
            MainWindow.add(lbl_armyTurn);

            lbl_battleOutcome = new Label("VICTORY!");
            lbl_battleOutcome.Font = Content.Graphics.Instance.TurnFont;
            lbl_battleOutcome.center(50);
            lbl_battleOutcome.doneShowing = endOfBattle;
            lbl_battleOutcome.Visible = false;
            MainWindow.add(lbl_battleOutcome);

            deploy(m, true);
            deploy(e, false);

            cmap.update(map);

            freemode = true;
            actionMode = false;
            targetMode = false;
            spellMode = false;
            itemMode = false;

            changeCurp(null, new EventArgObject(new Point(5, 6)));
            scp = new Point(5, 6);
            endTurnP = new Point(5, 6);

            setAllNotMoved();

            ai = new AI();
            ai.set(map, tm, cmap);
            ai.done = ai_done;

            MainWindow.InputEnabled = false;
        }