public override void AttackHit(Monster monster, GameObjectGrid field)
 {
     fieldGrid = field;
     if (!MonsterHit.Contains(monster) && monster.Attributes.HP > 0 && MonsterHit.Count == 0)
     {
         monster.TakeDamage(DamageAA);
         MonsterAdd(monster, Owner.Mirror);
     }
 }
    /// <summary>
    /// Method that defines what happens when a monster gets hit
    /// </summary>
    /// <param name="monster">The affected monster</param>
    /// <param name="field">The tileField of the level</param>
    public virtual void AttackHit(Monster monster, GameObjectGrid field)
    {
        fieldGrid = field;

        //Only affects the monster if it has not been affected by the ability already
        if (!MonsterHit.Contains(monster) && monster.Attributes.HP > 0)
        {
            monster.TakeDamage(DamageAA);
            MonsterAdd(monster, Owner.Mirror);
        }
    }
Esempio n. 3
0
    // Update is called once per frame

    void Start()
    {
        respawnMonsterHit = respawnMonster.GetComponent <MonsterHit>();
    }