public void SwitchDisplay() { if (EquipmentDollUIInstance == null && (EquipmentDollUIContainer == null || EquipmentDollUIPrefab == null)) { return; } if (!_displayed) { if (EquipmentDollUIInstance != null) { } else { EquipmentDollUIInstance = (EquipmentDollUI)Instantiate(EquipmentDollUIPrefab, EquipmentDollUIContainer.transform); } EquipmentDollUIInstance.Construct(this); CurrentActive = this; _displayed = true; } else { EquipmentDollUIInstance.Hide(); //CurrentActive = null; _displayed = false; } }
public void TryToDisplay() { if (EquipmentDollUI == null) { return; } if (!_displayed) { EquipmentDollUI.Construct(this); CurrentActive = this; _displayed = true; } else { EquipmentDollUI.Hide(); //CurrentActive = null; _displayed = false; } }