private void ShowMaps(MapModel[] MapModels)
        {
            MapModel mapModel = MapModels.LastOrDefault((MapModel x) => x.Map_Possible);
            int      current  = (mapModel != null) ? (mapModel.No - 1) : 0;

            mRouletteSelector.Init(this);
            mRouletteSelector.SetCurrent(current);
            mRouletteSelector.Reposition();
            mRouletteSelector.SetKeyController(mKeyController);
            mRouletteSelector.ScaleForce(0.3f, 1f);
            mRouletteSelector.controllable = true;
        }
Esempio n. 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);
        }