void Die()
    {
        arenaManager.gainedNotoriety -= civStats.worthNotoriety;

        if (arenaManager.civilians.Contains(gameObject))
        {
            arenaManager.civilians.Remove(gameObject);
            if (arenaManager.civilians.Count == 0)
            {
                Debug.Log("All civilians killed");
                arenaManager.ActivityFailed();
            }
        }
        Destroy(gameObject);
    }
Exemple #2
0
    void OnTriggerEnter(Collider other)
    {
        if (other.tag == "EnemyAttack")
        {
            /*if (isColliding == true) {
             *      Debug.Log("Hero isColliding already true");
             *      return;
             * }
             * else {
             *      Debug.Log("Hero isColliding is now true");
             *      isColliding = true;*/
            StatsPlayer.DamageFatigue(other.GetComponentInParent <StatsEnemy>().damage);
            HPParent.UpdateFatigueBar();

            if (StatsPlayer.currentFatigue >= StatsPlayer.maxFatigue)
            {
                Debug.Log("You have become physically exhausted and cannot fight");
                arenaManager.ActivityFailed();
            }
            //}
        }
    }