/// <summary> /// If cog hits enemy, /// Stop walking, /// Lower Enemy Remaining count, /// Play fix sount /// </summary> public void Fix() { broken = false; smokeEffect.Stop(); audioSource.Stop(); rigidbody2D.simulated = false; animator.SetTrigger("Fixed"); oppController.opponentHasDied(); audioSource.PlayOneShot(robotFix); }
private void Die() { if (isDead) { return; } isDead = true; opponentController.opponentHasDied(); gameObject.GetComponent <CapsuleCollider>().enabled = false; GetComponent <Animator>().SetTrigger("die"); // particle.Stop(); }