public void StartBattle() { _nowUIState = BattleUIState.Switch; _battleState = BattleState.First; _playerParam.SetChar(BattleController_mono.Instance.battle._player); var enemys = BattleController_mono.Instance.battle._enemys; for (int i = 0; i < enemys.Count; i++) { _enemyParams[i].SetChar(enemys[i]); } }
private void OnDisable() { _nextUIState = BattleUIState.None; _nowUIState = BattleUIState.None; _battleState = BattleState.None; }
void EndUIState(BattleUIState state) { _nextUIState = state; _nowUIState = BattleUIState.StateEnd; }
void EndEndUIState() { _nowUIState = BattleUIState.Switch; _nextUIState = BattleUIState.None; }
void ChengeUIState(BattleUIState state) { _nextUIState = state; _nowUIState = BattleUIState.StateStart; }
void EndChengeUIState() { _nowUIState = _nextUIState; _nextUIState = BattleUIState.None; }
private void Cleanup(BattleUIState state) { switch (state) { case BattleUIState.SelectingUnit: break; case BattleUIState.SelectingAction: HoverTileEnableSignal.Dispatch(); UnitDeselectedSignal.Dispatch(); break; case BattleUIState.SelectingFightAction: break; case BattleUIState.SelectingAttackTarget: ClearHighlightSignal.Dispatch(HighlightLevel.PlayerAttack); break; case BattleUIState.SelectingInteractTarget: ClearHighlightSignal.Dispatch(HighlightLevel.PlayerInteract); break; case BattleUIState.SelectingMoveLocation: ClearHighlightSignal.Dispatch(HighlightLevel.PlayerAttack); ClearHighlightSignal.Dispatch(HighlightLevel.PlayerMove); PathUnavailableSignal.Dispatch(); break; case BattleUIState.Fighting: HoverTileEnableSignal.Dispatch(); break; case BattleUIState.CombatantMoving: break; case BattleUIState.ForecastingCombat: FightForecastDisableSignal.Dispatch(); break; case BattleUIState.Uninitialized: break; case BattleUIState.PhaseChanging: HoverTileEnableSignal.Dispatch(); CameraUnlockSignal.Dispatch(); break; case BattleUIState.EnemyTurn: HoverTileEnableSignal.Dispatch(); CameraUnlockSignal.Dispatch(); break; case BattleUIState.ContextMenu: break; case BattleUIState.Preparations: break; case BattleUIState.Surveying: break; case BattleUIState.EventPlaying: break; default: throw new ArgumentOutOfRangeException("state", state, null); } }
private void Setup(BattleUIState state) { switch (state) { case BattleUIState.CombatantMoving: break; case BattleUIState.SelectingUnit: HoverTileEnableSignal.Dispatch(); break; case BattleUIState.SelectingAction: HoverTileDisableSignal.Dispatch(); break; case BattleUIState.ForecastingCombat: break; case BattleUIState.SelectingFightAction: break; case BattleUIState.SelectingAttackTarget: SetupAttackTargetState(); break; case BattleUIState.SelectingInteractTarget: SetupInteractTargetState(); break; case BattleUIState.SelectingMoveLocation: SetupMoveLocationState(); break; case BattleUIState.Fighting: HoverTileDisableSignal.Dispatch(); AnimateActionSignal.Dispatch(Model.PendingAction); break; case BattleUIState.Uninitialized: break; case BattleUIState.PhaseChanging: HoverTileDisableSignal.Dispatch(); CameraLockSignal.Dispatch(); break; case BattleUIState.EnemyTurn: CameraLockSignal.Dispatch(); HoverTileDisableSignal.Dispatch(); EnemyTurnStartSignal.Dispatch(); break; case BattleUIState.ContextMenu: HoverTileDisableSignal.Dispatch(); break; case BattleUIState.Preparations: CameraLockSignal.Dispatch(); break; case BattleUIState.Surveying: CameraUnlockSignal.Dispatch(); break; case BattleUIState.EventPlaying: break; default: throw new ArgumentOutOfRangeException("state", state, null); } }
public StateTransition(BattleUIState previous, BattleUIState next) { Previous = previous; Next = next; }
public void SetUpCharData() { _nowUIState = BattleUIState.NoUI; _charParamDisplyer.SetData(BattleController_mono.Instance.battle._charcterField); }
void EndEndUIState() { _nowUIState = BattleUIState.NoUI; _nextUIState = BattleUIState.None; }