protected override bool Init()
        {
            _isNightCombat = BattleTaskManager.GetBattleManager().HasNightBattle();
            if (!_isNightCombat)
            {
                EndPhase(BattlePhase.Result);
                return(true);
            }
            _clsState = new StatementMachine();
            float num = 72f;

            _dicSplitCameraPos = new Dictionary <FleetType, Vector3>();
            _dicSplitCameraPos.Add(FleetType.Friend, new Vector3(0f, 4f, num));
            _dicSplitCameraPos.Add(FleetType.Enemy, new Vector3(0f, 4f, 0f - num));
            _dicSplitCameraRot = new Dictionary <FleetType, Quaternion>();
            _dicSplitCameraRot.Add(FleetType.Friend, Quaternion.Euler(Vector3.zero));
            _dicSplitCameraRot.Add(FleetType.Enemy, Quaternion.Euler(Vector3.up * 180f));
            _prodWithdrawalDecisionSelection = ProdWithdrawalDecisionSelection.Instantiate(((Component)BattleTaskManager.GetPrefabFile().prefabProdWithdrawalDecisionSelection).GetComponent <ProdWithdrawalDecisionSelection>(), BattleTaskManager.GetBattleCameras().cutInCamera.transform);
            _clsState.AddState(InitWithdrawalSelection, UpdateWithdrawalSelection);
            return(true);
        }
Пример #2
0
        protected override bool Init()
        {
            this._isNightCombat = BattleTaskManager.GetBattleManager().HasNightBattle();
            if (!this._isNightCombat)
            {
                this.EndPhase(BattlePhase.Result);
                return(true);
            }
            this._clsState = new StatementMachine();
            float num = 72f;

            this._dicSplitCameraPos = new Dictionary <FleetType, Vector3>();
            this._dicSplitCameraPos.Add(FleetType.Friend, new Vector3(0f, 4f, num));
            this._dicSplitCameraPos.Add(FleetType.Enemy, new Vector3(0f, 4f, -num));
            this._dicSplitCameraRot = new Dictionary <FleetType, Quaternion>();
            this._dicSplitCameraRot.Add(FleetType.Friend, Quaternion.Euler(Vector3.get_zero()));
            this._dicSplitCameraRot.Add(FleetType.Enemy, Quaternion.Euler(Vector3.get_up() * 180f));
            this._prodWithdrawalDecisionSelection = ProdWithdrawalDecisionSelection.Instantiate(BattleTaskManager.GetPrefabFile().prefabProdWithdrawalDecisionSelection.GetComponent <ProdWithdrawalDecisionSelection>(), BattleTaskManager.GetBattleCameras().cutInCamera.get_transform());
            this._clsState.AddState(new StatementMachine.StatementMachineInitialize(this.InitWithdrawalSelection), new StatementMachine.StatementMachineUpdate(this.UpdateWithdrawalSelection));
            return(true);
        }