private void OnTriggerStay2D(Collider2D collision) { if (collision.tag == "Interactable") { if (Input.GetKeyDown(KeyCode.E)) { Interactable1 interactable = collision.GetComponent <Interactable1>(); if (interactable == null) { Debug.Log("null"); } interactable.dualConfirm++; } } }
virtual protected void Start() { interactableParent = GetComponentInParent <Interactable1>(); myAnim = GetComponent <AnimatedMovePosition>(); }