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;
 }
Esempio n. 2
0
    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);
    }
Esempio n. 3
0
 public bool Execute(IAttackCard card, List <IAttackCard> cardsTarget, IBattelBase battel, ISFXFactory specificityFactory) =>
 Execute(cardsTarget);
Esempio n. 4
0
 public BattelCardFactory(ISFXFactory specificityFactory, IAbilityFactory abilityFactory, IBuffUIParametersFactory buffUIFactory) =>
 (this.abilityFactory, this.specificityFactory, this.buffUIFactory) = (abilityFactory, specificityFactory, buffUIFactory);
Esempio n. 5
0
 public AbilityFactory(ISFXFactory specificityFactory) =>
 this.specificityFactory = specificityFactory ?? throw new ArgumentNullException(nameof(specificityFactory));
Esempio n. 6
0
 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);
 }
Esempio n. 7
0
    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);
    }
Esempio n. 8
0
 public CardFactory(ISFXFactory specificityFactory) =>
 this.specificityFactory = specificityFactory;