public void Respawn(Vector3 position) { gameObject.SetActive(false); if (projector != null) { projector.Enable(); } collider.enabled = true; rigidbody.isKinematic = false; gameObject.GetComponent <SpriteRenderer>().enabled = true; rigidbody.velocity = Vector3.zero; transform.position = position; gameObject.GetComponent <ParticleSystem>().Clear(); gameObject.SetActive(true); }