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