Example #1
0
 public Menu(MenuManager Parent)
 {
     parent = Parent;
     font = parent.Font;
     image = parent.Image;
     current_index = 0;
     x_position = 200;
     y_position = 200;
     y_spacing = 20;
     x_spacing = 0;
     title = "";
 }
Example #2
0
 public Menu(MenuManager Parent, Player Player)
 {
     parent = Parent;
     player = Player;
     font = parent.Font;
     image = parent.Image;
     current_index = 0;
     x_position = 400;
     y_position = 400;
     y_spacing = 20;
     x_spacing = 0;
     title = "";
 }
Example #3
0
 public MainMenu(MenuManager Parent)
 {
     parent = Parent;
     font = parent.Font;
     image = parent.Image;
     current_index = 0;
     x_position = 312;
     y_position = 300;
     y_spacing = 20;
     x_spacing = 0;
     title = "PiXL SPORT";
     addMenuItem(new NewGameItem(parent.Manager));
 }
Example #4
0
        public TeamMenu(Team Team, MenuManager Parent)
        {
            team = Team;
            //foreach (Player p in Parent.Players) if (p.CurrentCharacter.Team == team) Players.Add(p);
            foreach (TeamMember TM in team.Members) addMenuItem(new TMemberItem(TM));

            parent = Parent;
            current_index = 0;
            x_position = 20;
            y_position = 110;
            y_spacing = 20;
            x_spacing = 0;
        }
Example #5
0
        public RuleMenu(MenuManager M, Team team)
        {
            parent = M;

            owners = team.Players;
            font = parent.Font;
            image = parent.Image;
            current_index = 0;
            x_position = 62;
            y_position = 250;
            y_spacing = 20;
            x_spacing = 0;

            teamColor = team.Color;

            ruleTarget = new OutOfBounds(parent.Manager);
            judgementTarget = new ScoreChange(parent.Manager, -3);

            title = team.TeamName + "'s Rule Selection";

            addMenuItem(new RuleImplementerItem(parent.Manager, this));
            addMenuItem(new RuleItem(this, new HotPotato(parent.Manager)));
            addMenuItem(new RuleItem(this, new OutOfBounds(parent.Manager)));
            addMenuItem(new RuleItem(this, new NoFighting(parent.Manager)));
            addMenuItem(new RuleItem(this, new NoKicking(parent.Manager)));
            addMenuItem(new RuleItem(this, new NoPassing(parent.Manager)));
            addMenuItem(new RuleItem(this, new TimeBall(parent.Manager)));
            addMenuItem(new RuleItem(this, new TimeBall(parent.Manager, 15)));
            addMenuItem(new RuleItem(this, new TimeBall(parent.Manager, 10)));
            addMenuItem(new RuleItem(this, new RunInGoal(parent.Manager)));

            judgementItems.Add(new RuleImplementerItem(parent.Manager, this));
            judgementItems.Add(new JudgementItem(this, new BigExplosion()));
            judgementItems.Add(new JudgementItem(this, new Explosion()));
            judgementItems.Add(new JudgementItem(this, new KickOff()));
            judgementItems.Add(new JudgementItem(this, new LightOnFire(Judgement.JudgementType.Team)));
            judgementItems.Add(new JudgementItem(this, new LightOnFire(Judgement.JudgementType.TeamMember)));
            judgementItems.Add(new JudgementItem(this, new LightOnFire(Judgement.JudgementType.Global)));
            judgementItems.Add(new JudgementItem(this, new ScoreChange(parent.Manager, 5)));
        }
Example #6
0
        public CloseMenuButton(MenuManager Manager)
        {
            manager = Manager;

            id = "Close Menu";
        }
Example #7
0
        public void Initialize()
        {
            PlaySpace = new Field();
            Scoreboard = new Scoreboard();

            Vector2 windowSize = new Vector2(pixlGame.GraphicsDevice.Viewport.Width,
                                                 pixlGame.GraphicsDevice.Viewport.Height);
            Vector2 psp;
            psp.X = (windowSize.X - PlaySpace.RenderSize.X) / 2f;
            psp.Y = windowSize.Y - PlaySpace.RenderSize.Y - 50f;

            PlaySpace.Position = psp;

            Team1 = new Team("Broadway Bisons", this);
            Team2 = new Team("New Jersey Devils", this);
            Ball = new Ball();

            Team1.Initialize();
            Team2.Initialize();

            /*

            KeyboardResult = Guide.BeginShowKeyboardInput(PlayerIndex.One, "TeamName entry", "Enter the team's name here", "Boradway Bisons", null, null);
            Team1.TeamName = Guide.EndShowKeyboardInput(KeyboardResult);

            */

            Team1.Color = Color.Cyan;
            Team2.Color = new Color(167, 167, 167);

            AudioM = new AudioManager();
            AudioM.Initialize();

            time = QUARTERTIME;

            AddRule(new OutOfBounds(this, new LightOnFire(Judgement.JudgementType.TeamMember)));
            AddRule(new OutOfBounds(this, new Rebound(this)));
            AddRule(new RunInGoal(this, new ScoreExchange(this)));
            AddRule(new ThroughThePostsGoal(this, new ScoreChange(this, 7)));
            AddRule(new OutTheBackGoal(this, new Rebound(this)));
            AddRule(new PassInGoal(this, new ScoreChange(this, 5)));

            AddPlayer(Team1, InputController.InputMode.Player1);
            AddPlayer(Team2, InputController.InputMode.Player2);

            MenuM = new MenuManager(this);
            MenuM.Initialize();
        }