private IEnumerator StartSinking() { yield return(new WaitForSeconds(sinkDelay)); GetComponent <NavMeshAgent>().enabled = false; GetComponent <Rigidbody>().isKinematic = true; _isSinking = true; ScoreCounting.AccountScore(scoreValue); StartCoroutine(Remove(gameObject, 2)); }
private void Start() { enemiesList = transform.GetChild(4); counter = score.GetComponent <ScoreCounting>(); }