Exemplo n.º 1
0
        public FullLevelMenu(LevelManager Parent, Level Target, InputController Input, ContentManager CM, Dictionary<String, Player> Players, int x, int y, int xprime, int yprime)
        {
            parent = Parent;
            font = parent.font;
            current_index = 0;
            x_position = x;
            y_position = y;
            y_spacing = yprime;
            x_spacing = xprime;
            image = CM.Load<Texture2D>("Main Menu");
            cursor_image = CM.Load<Texture2D>("laser");
            addMenuItem(new Level_Button(parent, Target));
            wallType = new ToggleWallsButton(Target);
            wallType.addOption("Full Reflective", Level.WallType.FullReflect);
            wallType.addOption("Full Absorb", Level.WallType.FullAbsorb);
            wallType.addOption("H", Level.WallType.SideReflect);
            wallType.addOption("I", Level.WallType.UpDownReflect);
            wallType.addOption("X", Level.WallType.DiagonalReflectingOctagon);
            wallType.execute();
            addMenuItem(wallType);
            reflectiveAllowance = new ToggleLimitsButton(Target, Surface.SurfaceType.Reflective);
            addMenuItem(reflectiveAllowance);

            absorbantAllowance = new ToggleLimitsButton(Target, Surface.SurfaceType.Absorbant);
            addMenuItem(absorbantAllowance);

            refractiveAllowance = new ToggleLimitsButton(Target, Surface.SurfaceType.Refractive);
            addMenuItem(refractiveAllowance);

            player1Start = new FlashText(font, "Player 1 Press Start", 500f, 100, 660, Color.Red);

            player2Start = new FlashText(font, "Player 2 Press Start", 500f, 750, 660, Color.Blue);

            players = Players;
        }
Exemplo n.º 2
0
 protected override void Initialize()
 {
     levelManager = new LevelManager(graphics.PreferredBackBufferWidth, graphics.PreferredBackBufferHeight);
     levelManager.loadContent(Content);
     levelManager.nextLevel();
     base.Initialize();
 }
Exemplo n.º 3
0
 public Menu(LevelManager Parent)
 {
     parent = Parent;
     font = parent.font;
     current_index = 0;
     x_position = 400;
     y_position = 400;
     y_spacing = 20;
     x_spacing = 0;
 }
Exemplo n.º 4
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here

            gamemanager = new LevelManager(this.Content);
            gamemanager.addPuzzleLevel(new PuzzleLevel(this.Content, gamemanager, "Puzzle Level 1"));
            gamemanager.addPuzzleLevel(new PuzzleLevel(this.Content, gamemanager, "Puzzle Level 2"));
               // gamemanager.addLevel(new PrismBattleLevel(this.Content, gamemanager, "Default Prism Battle Level"));
            //gamemanager.addLevel(new HordeLevel(this.Content, gamemanager, "Default Horde Level"));
            gamemanager.addMenu(gamemanager.mainmenu());

            base.Initialize();
        }
Exemplo n.º 5
0
 public FullMenu(LevelManager Parent, InputController Input,ContentManager CM,  String assetName)
 {
     parent = Parent;
     //input = Input;
     font = parent.font;
     current_index = 0;
     x_position = 600;
     y_position = 200;
     y_spacing = 20;
     x_spacing = 0;
     image = CM.Load<Texture2D>(assetName);
     cursor_image = CM.Load<Texture2D>("laser");
 }
Exemplo n.º 6
0
        public Level(ContentManager contentMangager, LevelManager Manager)
        {
            width = 1024;
            height = 768;

            id = "Default ID";
            m_content = contentMangager;
            font = contentMangager.Load<SpriteFont>("Text");
            score_bar = contentMangager.Load<Texture2D>("surface_corner");

            manager = Manager;

            start = new SplashImage(m_content, "FightSplash", 1000f);
        }
Exemplo n.º 7
0
        public Level(ContentManager contentMangager, LevelManager Manager, String ID)
        {
            width = 1024;
            height = 768;

            id = ID;
            m_content = contentMangager;
            font = contentMangager.Load<SpriteFont>("Text");
            score_bar = contentMangager.Load<Texture2D>("surface_corner");

            manager = Manager;

            start = new SplashImage(m_content, "FightSplash", 1000f);
            victory = new SplashImage(m_content, "VictorySplash", 500f);
        }
Exemplo n.º 8
0
        public Laser_Turret(Level parent, InputController.InputMode playerMode, LevelManager Manager, int a, int b, int c)
        {
            energy = 748;
            health = 748;
            m_parent = parent;
            input = new InputController(playerMode);
            id = input.getMode();
            manager = Manager;

               reflect_limit=b;
               absorb_limit=a;
               refract_limit=c;
               absorb_amount=0;
               reflect_amount=0;
               refract_amount=0;
               m_rotation = 0;

            switch (id)
            {
                case "Player1":
                    health_bar_pos = 0;
                    energy_bar_pos = 8;
                    position = new Vector2(30, m_parent.height / 2);
                    laserStart = new Vector2(51, m_parent.height / 2);
                    orientation = 0f;
                    id = "Player 1";
                    color = Color.Red;
                    cursor = new Cursor(this, input, m_parent);
                    break;

                case "Player2":

                    health_bar_pos = m_parent.width - 5;
                    energy_bar_pos = m_parent.width - 13;
                    position = new Vector2(m_parent.width - 33, m_parent.height / 2);
                    laserStart = new Vector2(m_parent.width - 54, m_parent.height / 2);
                    orientation = (float)Math.PI;
                    id = "Player 2";
                    color = Color.Blue;

                    cursor = new Cursor(this, input, m_parent);
                    break;

                default:
                    throw new NotImplementedException("Received unexpected input mode");
            }
            bounds = new BoundingBox(new Vector3(position.X - 20, position.Y - 20, -1), new Vector3(position.X + 20, position.Y + 20, 1));
        }
Exemplo n.º 9
0
 public PrismBattleLevel(ContentManager contentMangager, LevelManager Manager, String ID)
 {
     width = 1024;
     height = 768;
     reflect_limit = 5;
     refract_limit = 5;
     absorb_limit = 0;
     id = ID;
     m_content = contentMangager;
     font = contentMangager.Load<SpriteFont>("Text");
     score_bar = contentMangager.Load<Texture2D>("surface_corner");
     score = 500;
     manager = Manager;
     start = new SplashImage(m_content, "FightSplash", 1000f);
     wallSetting = WallType.UpDownReflect;
 }
Exemplo n.º 10
0
        public FullMenu(LevelManager Parent, Dictionary<String, Player> Players, ContentManager CM, String assetName, int x, int y, int xprime, int yprime)
        {
            parent = Parent;
            font = parent.font;
            current_index = 0;
            x_position = x;
            y_position = y;
            y_spacing = yprime;
            x_spacing = xprime;
            image = CM.Load<Texture2D>(assetName);
            player1Start = new FlashText(font, "Player 1 Press Start", 500f, 100, 660, Color.Red);

            player2Start = new FlashText(font, "Player 2 Press Start", 500f, 750, 660, Color.Blue);

            cursor_image = CM.Load<Texture2D>("laser");
            players = Players;
        }
Exemplo n.º 11
0
 public Level_Button(LevelManager Parent, Level Target)
 {
     parent = Parent;
     target = Target;
     id = target.id;
 }
Exemplo n.º 12
0
 public Level_Button(LevelManager Parent, String Id)
 {
     parent = Parent;
     id = Id;
 }
Exemplo n.º 13
0
 public Level_Button(LevelManager Parent )
 {
     parent = Parent;
 }
Exemplo n.º 14
0
 public OpenLevelItem()
 {
     target = null;
     parent = null;
 }
Exemplo n.º 15
0
 public AddMenuItem(LevelManager Manager, Menu Target, String ID)
 {
     manager = Manager;
     target = Target;
     id = ID;
 }
Exemplo n.º 16
0
 public AddMenuItem(LevelManager Manager, Menu Target)
 {
     manager = Manager;
     target = Target;
     id = "Default menu ID";
 }