private IEnumerator InititalizeStageCovers(Action onInitialized)
        {
            Transform stageCoversPlace = mTransform_StageCovers.Find("UIStageCovers");

            foreach (Transform child in mRouletteSelector.GetContainer().transform)
            {
                UnityEngine.Object.Destroy(child.gameObject);
            }
            mStageConfirm.Initialize(mMapModels[0]);
            MapModel[] array = mMapModels;
            foreach (MapModel model in array)
            {
                UIStageCover stageCover = Util.Instantiate(mPrefab_UIStateCover.gameObject, stageCoversPlace.gameObject).GetComponent <UIStageCover>();
                stageCover.Initialize(model);
            }
            yield return(new WaitForEndOfFrame());

            onInitialized?.Invoke();
        }
Пример #2
0
        public bool Init(List <DeckModel> models, int initIndex, DelDecideRebellionOrganizeFleetSelector decideDelegate)
        {
            DebugUtils.Log("UIRebellionFleetSelector", string.Empty);
            _listDeckModels = models;
            _nSelectedIndex = initIndex;
            _delDecideRebellionOrganizeFleetSelector = decideDelegate;
            SetFleetInfos(initIndex);
            foreach (Transform item in _clsRouletteSelector.GetContainer().transform)
            {
                UnityEngine.Object.Destroy(item.gameObject);
            }
            int num = 0;

            foreach (DeckModel model in models)
            {
                _listSelectorShips.Add(UIRebellionSelectorShip.Instantiate(((Component)_prefabSelectorShip).GetComponent <UIRebellionSelectorShip>(), _clsRouletteSelector.transform, Vector3.zero, model.GetFlagShip()));
                _listSelectorShips[num].transform.name = "SelectorShips" + num;
                num++;
            }
            _clsRouletteSelector.Init(this);
            _clsRouletteSelector.SetKeyController(StrategyTaskManager.GetStrategyRebellion().keycontrol);
            _clsRouletteSelector.ScaleForce(0.3f, 1f);
            return(true);
        }