Beispiel #1
0
    public void OnHit(AttackType a, ExploreCat attacker)
    {
        playSound(a);
        attacker.Disable();
        if (attacker.owner.enemy)
        {
            ExploreCat user = exploreChoice.getCurrentUser();
            if (user != null && user.enabled)
            {
                user.Disable();
            }
        }
        else
        {
            ExploreCat e = exploreChoice.getCurrentEnemy();
            if (e != null)
            {
                e.Disable();
            }
        }

        Debug.Log("try to set active true");
        if (!Finished() && !exploreChoice.gameObject.activeSelf)
        {
            Debug.Log("set active true");
            StartCoroutine(enableChoice());
        }
    }