private void KillActor() { if (GetComponent <AI>() != null) { disease.CancelInvoke("Freeze"); CancelInvoke("GetVaccine"); Destroy(gameObject); } else if (GetComponent <Player>() != null) { GetComponent <Player>().MoveSpeed = 0f; //Time.timeScale = 0f; OnGameOver(); } }