private void OnClickRename() { Debug.Log("OnClickRename"); UIWindowEnterName name = UIWindowWrapper.GetWindowAddMask <UIWindowEnterName>(); name.Open(); name.SetStyle(OnNameVerify); }
public override void Close() { base.Close(); UIWindowHome home = UIWindowWrapper.GetWindow <UIWindowHome>(); UIWindowPlayerInfo playerInfo = UIWindowWrapper.GetWindow <UIWindowPlayerInfo>(); home.Open(); playerInfo.Open(); CloseUnitList(); }
public void OnClickCreateTroopsInfo() { m_campItem.SetSelect(true); UIWindowTroopsInfo info = UIWindowWrapper.GetWindowAddMask <UIWindowTroopsInfo>(); info.transform.SetParent(m_troopsAnchor, false); info.Open(m_camp); IUnitConfItem unitConfItem = AW.GetSingleton <IDataAdapter>().GetOwnedUnitConfItem(m_camp.ProduceItem); IBuildingConfItem buildingConfItem = AW.GetSingleton <IDataAdapter>().GetBuildingConfItem(m_building); m_count = buildingConfItem.GetTroopCostVolume() / unitConfItem.GetCapacityCost(); Building barrck = (Building)m_camp; if (barrck.GetState() == AWEnum.BuildingStateType.Produce) { info.replace.gameObject.SetActive(false); info.SetCompleteButtonStyle(OnClickComplete); info.SetCancelButtonStle(OnClickCancel); if (m_camp.GetProducedCount() < m_count) { info.SetSupplementButtonStyle(OnClickSupplement); } else { info.supplement.gameObject.SetActive(false); } } else { info.complete.gameObject.SetActive(false); info.cancel.gameObject.SetActive(false); if (m_camp.GetProducedCount() < m_count) { info.SetSupplementButtonStyle(OnClickSupplement); info.SetReplaceButtonStyle(OnClickReplace); } else { info.supplement.gameObject.SetActive(false); info.SetReplaceButtonStyle(OnClickReplace); } } info.SetRename(OnClickRename); }
private void RenameCallBack(bool result) { UIWindowWrapper.GetWindowAddMask <UIWindowEnterName>().Close(); m_campItem.SetUnitName(); }
private void CallBack(bool result) { m_troopsAnchor.GetComponentInChildren <UIWindowTroopsInfo>().Close(); UIWindowWrapper.GetWindowAddMask <UIWindowUnitProduce>().InitProduce(); }