示例#1
0
 void OnTriggerEnter(Collider other)
 {
     if (other.CompareTag("Left Hand") || other.CompareTag("Right Hand"))
     {
         moneySound.Play();
         swordUI.IncreaseScore(500);
         gm.CheckForWinStart(this.gameObject);
     }
 }
示例#2
0
    IEnumerator AllSlashedChecker()
    {
        yield return(new WaitForSeconds(slashWaitTime));

        foreach (GameObject hitMarker in hitMarkers)
        {
            if (!hitMarker.GetComponent <FireHitMarker>().GetHitStatus())
            {
                foreach (GameObject hm in hitMarkers)
                {
                    hm.GetComponent <FireHitMarker>().SetHitStatus(false);
                }
                yield break;
            }
        }
        //TODO: if the function reaches this point, all hitMarkers have been disabled
        //and the enemy is dead.
        swordUI.IncreaseScore(150);
        signalExecuted = false;
        if (this.gameObject.activeSelf)
        {
            StartCoroutine(TriggerDeath());
        }
    }