public bool Init(CommandPhaseModel model, Predicate <List <BattleCommand> > onDeideBattleStart)
 {
     this._nSelectIndex = 0;
     base.get_transform().set_localPosition(this._vCommandBoxPos);
     this._actDecideBattleStart = onDeideBattleStart;
     this.CreateSurface(model.GetPresetCommand());
     this._uiBattleStartBtn.Init(this._listCommandSurface.get_Count(), new Func <bool>(this.DecideStartBattle));
     this._uiBattleStartBtn.transform.set_localPosition(this._vBattleStartBtnPos);
     this._uiBattleStartBtn.transform.localScaleZero();
     this._listICommandSurface.Add(this._uiBattleStartBtn);
     this.panel.alpha = 1f;
     this.ChkAllSurfaceSet();
     this._clsBackgrounds.Init();
     return(true);
 }
示例#2
0
 private bool Init(CommandPhaseModel model)
 {
     this._clsState            = new StatementMachine();
     this._listInvalidCommands = this.GetInvalidCommands(model.GetSelectableCommands());
     this._clsCommandModel     = model;
     this._iCtrlModel          = CtrlBCCommandSelect.CtrlMode.Surface;
     this._isInputPossible     = false;
     this._uiCommandSurfaceList.Init(model.GetPresetCommand(), new Action <UICommandLabelButton>(this.OnSelectedSurface), new Predicate <List <BattleCommand> >(this.OnStartBattle));
     this._uiCommandSurfaceList.isColliderEnabled = false;
     this._uiCommandUnitSelect = UICommandUnitSelect.Instantiate(this._prefabUICommandUnitSelect.GetComponent <UICommandUnitSelect>(), base.get_transform(), model.GetSelectableCommands(), new Action <BattleCommand>(this.OnDecideUnitSelect), new Action(this.OnCancelUnitSelect));
     this.InitEnemyFleetInfos();
     this.panel.alpha            = 0f;
     this.panel.widgetsAreStatic = true;
     return(true);
 }
示例#3
0
 public bool Init(CommandPhaseModel model, Predicate <List <BattleCommand> > onDeideBattleStart)
 {
     _nSelectIndex = 0;
     base.transform.localPosition = _vCommandBoxPos;
     _actDecideBattleStart        = onDeideBattleStart;
     CreateSurface(model.GetPresetCommand());
     _uiBattleStartBtn.Init(_listCommandSurface.Count, DecideStartBattle);
     _uiBattleStartBtn.transform.localPosition = _vBattleStartBtnPos;
     _uiBattleStartBtn.transform.localScaleZero();
     _listICommandSurface.Add(_uiBattleStartBtn);
     panel.alpha = 1f;
     ChkAllSurfaceSet();
     _clsBackgrounds.Init();
     return(true);
 }
 private bool Init(CommandPhaseModel model)
 {
     _clsState            = new StatementMachine();
     _listInvalidCommands = GetInvalidCommands(model.GetSelectableCommands());
     _clsCommandModel     = model;
     _iCtrlModel          = CtrlMode.Surface;
     _isInputPossible     = false;
     _uiCommandSurfaceList.Init(model.GetPresetCommand(), OnSelectedSurface, OnStartBattle);
     _uiCommandSurfaceList.isColliderEnabled = false;
     _uiCommandUnitSelect = UICommandUnitSelect.Instantiate(((Component)_prefabUICommandUnitSelect).GetComponent <UICommandUnitSelect>(), base.transform, model.GetSelectableCommands(), OnDecideUnitSelect, OnCancelUnitSelect);
     InitEnemyFleetInfos();
     panel.alpha            = 0f;
     panel.widgetsAreStatic = true;
     return(true);
 }
        public bool IsValidPresetCommand()
        {
            CommandPhaseModel commandPhaseModel = this.GetCommandPhaseModel();

            return(commandPhaseModel != null && commandPhaseModel.IsValidCommand(commandPhaseModel.GetPresetCommand()));
        }
示例#6
0
        public bool IsValidPresetCommand()
        {
            CommandPhaseModel commandPhaseModel = GetCommandPhaseModel();

            return(commandPhaseModel?.IsValidCommand(commandPhaseModel.GetPresetCommand()) ?? false);
        }