// Start is called before the first frame update void Start() { if (trigger == null || !trigger.isTrigger) { trigger = gameObject.GetComponent <Collider>(); } interactable = interactableObject.GetComponent <SwitchInteractable>(); renderer = gameObject.GetComponent <MeshRenderer>(); renderer.material = turnedOffMaterial; }
// Start is called before the first frame update void Start() { switchPunched = false; if (collider == null) { collider = gameObject.GetComponent <Collider>(); } interactable = interactableObject.GetComponent <SwitchInteractable>(); renderer = collider.gameObject.GetComponent <MeshRenderer>(); }
// Start is called before the first frame update private void Start() { animator = GetComponent <Animator>(); interactable = GetComponent <SwitchInteractable>(); }