/** * @brief Updates the CU once every frame. */ private void Update() { PC.SetActive(!currentlyProcessing); MAR.SetActive(!currentlyProcessing); MDR.SetActive(!currentlyProcessing); IR.SetActive(!currentlyProcessing); GPA.SetActive(!currentlyProcessing); GPB.SetActive(!currentlyProcessing); ALU.SetActive(!currentlyProcessing); assemble.interactable = !currentlyProcessing; loadToMemory.interactable = !currentlyProcessing; fetch.interactable = !currentlyProcessing; decode.interactable = !currentlyProcessing; execute.interactable = !currentlyProcessing; reset.interactable = !currentlyProcessing; if (memory.IsActive() && currentlyProcessing) { memory.SetActive(false); } else if (!memory.IsActive() && !currentlyProcessing) { memory.SetActive(true); } }