public void UnlinkInstruction(GameObject instruction) { //Iterates backwards through array to avoid counter invalidation. BoundInstructions.RemoveAll(element => element == instruction); if (BoundInstructions.Count == 0) { GetComponent <CardUIControl>().Enable(); } }
public void LinkInstruction(GameObject instruction) { BoundInstructions.Add(instruction); GetComponent <UIControl>().Disable(); StartCoroutine(WaitForUnlink()); }