public LegendOfZelda() { graphics = new GraphicsDeviceManager(this) { PreferredBackBufferWidth = WINDOW_WIDTH, PreferredBackBufferHeight = ROOM_HEIGHT + HUD_HEIGHT }; Content.RootDirectory = "Content"; IsMouseVisible = true; spriteFactories = new List <ISpriteFactory> { PlayerSpriteFactory.Instance, EnemySpriteFactory.Instance, NPCSpriteFactory.Instance, ItemSpriteFactory.Instance, ProjectileSpriteFactory.Instance, MapAndHUDSpriteFactory.Instance }; sfxfactory = SFXFactory.Instance; }
public bool IsResult(IAttackCard card, IBattelBase battel, ISFXFactory specificityFactory) { var cards = GetTargetCards(card, battel); foreach (var item in postConditions) { cards = item.GetTargetCards(card, cards, battel); } bool result = false; foreach (var item in effectAbility) { if (item.Execute(card, cards, battel, specificityFactory)) { result = true; } } return(result); }
public bool Execute(IAttackCard card, List <IAttackCard> cardsTarget, IBattelBase battel, ISFXFactory specificityFactory) => Execute(cardsTarget);
public BattelCardFactory(ISFXFactory specificityFactory, IAbilityFactory abilityFactory, IBuffUIParametersFactory buffUIFactory) => (this.abilityFactory, this.specificityFactory, this.buffUIFactory) = (abilityFactory, specificityFactory, buffUIFactory);
public AbilityFactory(ISFXFactory specificityFactory) => this.specificityFactory = specificityFactory ?? throw new ArgumentNullException(nameof(specificityFactory));
public Card Initial(Action <Card> buffered, ISFXFactory SFXFactory) { this.SFXFactory = SFXFactory ?? throw new ArgumentNullException(nameof(SFXFactory)); this.buffered = buffered ?? throw new ArgumentNullException(nameof(buffered)); return(this); }
public bool Execute(IAttackCard card, List <IAttackCard> cardsTarget, IBattelBase battel, ISFXFactory specificityFactory) { bool result = false; foreach (var item in cardsTarget) { if (item.Tokens.AddToken(token, count)) { result = true; item.StartSFX(specificityTarget); } } return(result); }
public CardFactory(ISFXFactory specificityFactory) => this.specificityFactory = specificityFactory;