Пример #1
0
        public override void Execute(Team T)
        {
            foreach (TeamMember TM in T.Members)
            {
                TM.Ignite();
                TM.CantCatch = true;

                if (TM.HasBall) TM.Drop();
            }
        }
Пример #2
0
 public TeamMember(Team team)
 {
     this.team = team;
     ai = new PlayerAI(this);
     passStrength = 5;
     passAccuracy = 5;
     TimeWithBall = 0f;
     numPositionAvgFrames = 0;
     tackleTimer = 501f;
     name = "Default Name";
     number = 1;
 }
Пример #3
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;
        }
Пример #4
0
        public virtual void Enforce(Team T, TeamMember TM)
        {
            if (T == null || TM == null)
             {
                 return;
             }

             switch (assignedJudgement.Judged)
             {
                 case Judgement.JudgementType.Team:
                     assignedJudgement.Execute(T);
                     break;
                 case Judgement.JudgementType.TeamMember:
                     assignedJudgement.Execute(TM);
                     break;
                 case Judgement.JudgementType.Global:
                     assignedJudgement.Execute(manager);
                     break;

             }
        }
Пример #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)));
        }
Пример #6
0
 public override void Execute(Team T)
 {
     throw new NotImplementedException();
 }
Пример #7
0
 public Player(Team team, InputController.InputMode Input)
 {
     input = new InputController(Input);
     this.team = team;
     CurrentCharacter = team.Members.ElementAt(0);
 }
Пример #8
0
 public abstract void Execute(Team T);
Пример #9
0
 public void Pause(Team team)
 {
     if (team == Manager.Team1) OpenMenu(pauseMenu1);
     else OpenMenu(pauseMenu2);
 }
Пример #10
0
 public override void Execute(Team T)
 {
     if( T != null) T.Score += scoreDelta;
     manager.SetupKickoff();
 }
Пример #11
0
 public void AddPlayer(Team team, InputController.InputMode spot)
 {
     Player temp = new Player(team, spot);
     Players.Add(temp);
     team.Players.Add(temp);
 }
Пример #12
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();
        }