Пример #1
0
 public DynamicDrawingVisual(IDrawStrategy strategy)
     : base(strategy)
 {
     if (strategy.Bounds is DynamicBounds)
     {
         (strategy.Bounds as DynamicBounds).PropertyChanged += boundsPropertyChange;
     }
 }
Пример #2
0
 public void Draw(string text, IDrawStrategy drawStrategy)
 {
     if (this.IsMonochrome)
     {
         drawStrategy.DrawMonochrome(text);
     }
     else
     {
         drawStrategy.DrawColorful(text);
     }
 }
Пример #3
0
 public void Draw(string text, IDrawStrategy drawStrategy)
 {
     if (this.IsMonochrome)
     {
         drawStrategy.DrawMonochrome(text);
     }
     else
     {
         drawStrategy.DrawColorful(text);
     }
 }
Пример #4
0
 public Creature(string name, Vector2 worldIndex, MovementType movementType, Stat hitPoints, Stat mana, ITurnStrategy turnStrategy, IDrawStrategy drawStrategy, IDeathStrategy deathStrategy, IAttackStrategy attackStrategy, World world, IRemains remains)
 {
     MovementType = movementType;
     WorldIndex = worldIndex;
     Name = name;
     Health = hitPoints;
     Mana = mana;
     TurnStrategy = turnStrategy;
     DrawStrategy = drawStrategy;
     DeathStrategy = deathStrategy;
     AttackStrategy = attackStrategy;
     _world = world;
     Inventory = new List<IItem>();
     Spells = new List<ISpell>();
     TemporaryEffects = new List<ITemporaryEffect>();
     ViewDistance = new Stat(15);
     Remains = remains;
 }
Пример #5
0
 public Creature(string name, Vector2 worldIndex, MovementType movementType, Stat hitPoints, Stat mana, ITurnStrategy turnStrategy, IDrawStrategy drawStrategy, IDeathStrategy deathStrategy, IAttackStrategy attackStrategy, World world, IRemains remains)
 {
     MovementType     = movementType;
     WorldIndex       = worldIndex;
     Name             = name;
     Health           = hitPoints;
     Mana             = mana;
     TurnStrategy     = turnStrategy;
     DrawStrategy     = drawStrategy;
     DeathStrategy    = deathStrategy;
     AttackStrategy   = attackStrategy;
     _world           = world;
     Inventory        = new List <IItem>();
     Spells           = new List <ISpell>();
     TemporaryEffects = new List <ITemporaryEffect>();
     ViewDistance     = new Stat(15);
     Remains          = remains;
 }
Пример #6
0
 public Motherboard(RamMemory ramMemory, VideoCard videoCard, IDrawStrategy drawStrategy)
 {
     this.RamMemory = ramMemory;
     this.VideoCard = videoCard;
     this.drawStrategy = drawStrategy;
 }
Пример #7
0
 public StaticDrawingVisual(IDrawStrategy str)
 {
     strategy  = str;
     Transform = new TranslateTransform(strategy.Bounds.Left, strategy.Bounds.Top);
 }
Пример #8
0
 public Motherboard(RamMemory ramMemory, VideoCard videoCard, IDrawStrategy drawStrategy)
 {
     this.RamMemory    = ramMemory;
     this.VideoCard    = videoCard;
     this.drawStrategy = drawStrategy;
 }
Пример #9
0
 public DrawManager(IDrawStrategy drawStrategy)
 {
     this.drawStrategy = drawStrategy;
 }