Ejemplo n.º 1
0
 public override void Add(ICanConsume character, int stackNumber)
 {
     if (stackNumber == 1)
     {
         character.Stats.AttackRange.AddModifier(InitialStatModifier);
     }
     else
     {
         character.Stats.AttackRange.AddModifier(AdditionalStatModifier);
     }
 }
Ejemplo n.º 2
0
 public override bool Remove(ICanConsume character, int stackNumber)
 {
     if (stackNumber == 0)
     {
         return(character.Stats.AttackRange.RemoveModifer(InitialStatModifier));
     }
     else
     {
         return(character.Stats.AttackRange.RemoveModifer(AdditionalStatModifier));
     }
 }
Ejemplo n.º 3
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (mask == (mask | (1 << other.gameObject.layer)))
     {
         ICanConsume canConsume = other.GetComponent <ICanConsume>();
         if (canConsume != null)
         {
             target = canConsume;
         }
     }
 }
Ejemplo n.º 4
0
 public override void Add(ICanConsume character, int stackNumber)
 {
     if (stackNumber == 1)
     {
         character.onDefend += OnDefend;
         character.Stats.Defense.AddModifier(InitialStatModifier);
     }
     else
     {
         character.Stats.Defense.AddModifier(AdditionalStatModifier);
     }
 }
Ejemplo n.º 5
0
        public override bool Remove(ICanConsume character, int stackNumber)
        {
            if (stackNumber == 0)
            {
                character.onAttack -= OnDefend;
                character.Stats.Defense.RemoveModifer(InitialStatModifier);
            }
            else
            {
                character.Stats.Defense.RemoveModifer(AdditionalStatModifier);
            }

            return(true);
        }
Ejemplo n.º 6
0
        void Awake()
        {
            character = GetComponent <ICanConsume>();
            Items     = new Dictionary <ItemName, int>();

            float difficultyMultiplier = isEnemy ? Director.Instance.GetDifficultyMultiplier() : 1;

            Health               = (int)(startingStats.StartingHealth * difficultyMultiplier);
            MaxHealth            = (int)(startingStats.StartingHealth * difficultyMultiplier);
            Defense              = new Stat(startingStats.Defense * difficultyMultiplier);
            Speed                = new Stat(startingStats.Speed);
            AirSpeed             = new Stat(startingStats.AirSpeed);
            JumpForce            = new Stat(startingStats.JumpForce);
            AttackRate           = new Stat(startingStats.AttackRate);
            AttackRange          = new Stat(startingStats.AttackRange);
            BaseDamage           = new Stat(startingStats.BaseDamage * difficultyMultiplier);
            DamageRange          = new Stat(startingStats.DamageRange);
            CritChance           = new Stat(startingStats.CritChance);
            CritDamageMultiplier = new Stat(startingStats.CritDamageMultiplier);
            SensingRadius        = new Stat(startingStats.SensingRadius);
        }
Ejemplo n.º 7
0
 public override bool Remove(ICanConsume character, int stackNumber)
 {
     character.onAttack -= AdditionalAttack;
     return(true);
 }
Ejemplo n.º 8
0
 public override void Add(ICanConsume character, int stackNumber)
 {
     character.onAttack += AdditionalAttack;
 }
Ejemplo n.º 9
0
 public abstract bool Remove(ICanConsume character, int stackNumber);
Ejemplo n.º 10
0
 public abstract void Add(ICanConsume character, int stackNumber);
Ejemplo n.º 11
0
 public bool RemoveEffect(ICanConsume character, int stackNumber)
 {
     return(Remove(character, stackNumber));
 }
Ejemplo n.º 12
0
 public void AddEffect(ICanConsume character, int stackNumber)
 {
     ItemManager.Instance.ItemText.SetItemText(NameText, Description);
     Add(character, stackNumber);
 }