/*
     * private void OnCollisionEnter(Collision collision)
     * {
     *  // On collision, inflict damage on the enemy target, only if colliding with the enemy target.
     *  if (currentState == State.Attack && enemyTarget != null && collision.gameObject.name == enemyTarget.name)
     *  {
     *      if (enemyTarget.tag != "Follower")
     *      {
     *          // Damage the target on collision. Damage = Base damage + killCount.
     *          Attack(collision.gameObject.GetComponent<HitPointsManager>(), attackDamage + killCount);
     *          attackCurrentTime = attackTimer;
     *          Debug.Log(this.name + " attacks " + enemyTarget + ", " + enemyTarget.name);
     *      }
     *  }
     * }
     */

    public void Attack(HitPointsManager enemy, int damage)
    {
        //attackSound.PlayRandomClip();
        enemy.RegisterHit(damage);
        //Debug.Log(name + " attacks " + enemy.gameObject.name);

        // After destroying the target, gain charisma. Follower and leader gain Violence.
        if (enemyTarget.GetComponent <HitPointsManager>().currentHitPoints <= 0)
        {
            ResolveKill();
        }
    }
 public void Attack(HitPointsManager enemy, int damage)
 {
     //attackSound.PlayRandomClip();
     enemy.RegisterHit(damage);
     //Debug.Log(name + " attacks " + enemy.gameObject.name);
 }