Ejemplo n.º 1
0
        public RuleItem(RuleMenu Target, Rule Something)
        {
            target = Target;
            something = Something;
            id = something.RuleName;

            if (something.RuleName == null) id = "No Rule Name designated";
        }
Ejemplo n.º 2
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)));
        }
Ejemplo n.º 3
0
 public void AddRule(Rule newRule)
 {
     if(rulesList.ContainsKey(newRule.CallName)) rulesList.Remove(newRule.CallName);
      else rulesList.Add(newRule.CallName, newRule);
 }