public void AddModifier(ShipModifier shipModifier) { if (NextModifier != null) { NextModifier.AddModifier(shipModifier); } else { NextModifier = shipModifier; } }
public ModifierManager(IShip ship) { _rootShipModifier = new ShipModifier(ship); _rootShipModifier.AddModifier(new HalfHealthReducer(ship)); _rootShipModifier.AddModifier(new HalfSpeedReducer(ship)); }