/// <summary> /// Function to be called when this interactable is interacted with /// </summary> public override void InteractWith() { base.InteractWith(); //call base interact with if (!m_isCorrect) //if button is incorrect, subtract time remaining and stop going through code { Debug.Log("Incorrect button!"); m_parent.SubtractTime(m_incorrectTimeSubtraction); return; } if (m_interactableType == PressInteractableType.RESTART_BUTTON) //if this is the restart button, start held sequence { m_isPressed = true; } m_isCorrect = false; //reset correct state Debug.Log("Correct button!"); m_parent.SetNewInteractable(PressInteractableType.RESTART_BUTTON); //set restart button to new correct button }