protected CreatureModifier2(Game game, Creature2 creature) { this.game = game; this.creature = creature; game.Queries += Handle; }
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); }
public IncreaseDefenseModifier2(Game game, Creature2 creature) : base(game, creature) { }
public DoubleAttackModifier2(Game game, Creature2 creature) : base(game, creature) { }