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); }
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); }