예제 #1
0
        private void OnClickRename()
        {
            Debug.Log("OnClickRename");
            UIWindowEnterName name = UIWindowWrapper.GetWindowAddMask <UIWindowEnterName>();

            name.Open();
            name.SetStyle(OnNameVerify);
        }
예제 #2
0
    public override void Close()
    {
        base.Close();
        UIWindowHome       home       = UIWindowWrapper.GetWindow <UIWindowHome>();
        UIWindowPlayerInfo playerInfo = UIWindowWrapper.GetWindow <UIWindowPlayerInfo>();

        home.Open();
        playerInfo.Open();
        CloseUnitList();
    }
예제 #3
0
        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);
        }
예제 #4
0
 private void RenameCallBack(bool result)
 {
     UIWindowWrapper.GetWindowAddMask <UIWindowEnterName>().Close();
     m_campItem.SetUnitName();
 }
예제 #5
0
 private void CallBack(bool result)
 {
     m_troopsAnchor.GetComponentInChildren <UIWindowTroopsInfo>().Close();
     UIWindowWrapper.GetWindowAddMask <UIWindowUnitProduce>().InitProduce();
 }