Esempio n. 1
0
        protected CreatureModifier2(Game game, Creature2 creature)
        {
            this.game     = game;
            this.creature = creature;

            game.Queries += Handle;
        }
Esempio n. 2
0
        private static void EventBrokeApproach_ChainOfResponsabilityPattern()
        {
            var game   = new Game();
            var goblin = new Creature2(game, "Strong Goblin", 3, 3);

            WriteLine(goblin);

            using (new DoubleAttackModifier2(game, goblin))
            {
                WriteLine(goblin);
                using (new IncreaseDefenseModifier2(game, goblin))
                {
                    WriteLine(goblin);
                }
            }

            WriteLine(goblin);
        }
Esempio n. 3
0
 public IncreaseDefenseModifier2(Game game, Creature2 creature)
     : base(game, creature)
 {
 }
Esempio n. 4
0
 public DoubleAttackModifier2(Game game, Creature2 creature)
     : base(game, creature)
 {
 }