/// @param localDirector /// The local director owner of the Controller /// @param view /// The view of the scene /// @param cameraController /// The camera controller /// public LevelEditorController(LocalDirector localDirector, LevelEditorView view) : base(localDirector, view) { m_view = view; m_popupService = GlobalDirector.Service <PopupService>(); m_levelService = GlobalDirector.Service <LevelService>(); m_levelLoader = GlobalDirector.Service <MetadataService>().GetLoader <LevelData>() as LevelDataLoader; m_fsm.RegisterStateCallback(k_stateInit, EnterStateInit, null, null); m_fsm.RegisterStateCallback(k_stateLoad, EnterStateLoad, null, null); m_fsm.RegisterStateCallback(k_stateIdle, EnterStateIdle, null, ExitStateIdle); m_fsm.ExecuteAction(k_actionNext); }
/// @param localDirector /// The local director owner of the Controller /// @param view /// The view of the scene /// @param cameraController /// The camera controller /// public MapNodeController(LocalDirector localDirector, MapNodeView view) : base(localDirector, view) { m_audioService = GlobalDirector.Service <AudioService>(); m_popupService = GlobalDirector.Service <PopupService>(); m_levelService = GlobalDirector.Service <LevelService>(); MapNodeView = view; LevelModel = m_levelService.GetLevelModel(MapNodeView.LevelIndex); MapNodeView.SetName(MapNodeView.LevelIndex.ToString()); m_fsm.RegisterStateCallback(k_stateInit, EnterStateInit, null, null); m_fsm.RegisterStateCallback(k_stateIdle, EnterStateIdle, null, ExitStateIdle); m_fsm.RegisterStateCallback(k_stateLocked, EnterStateLocked, null, ExitStateLocked); m_fsm.RegisterStateCallback(k_stateUnlock, null, null, ExitStateUnlock); m_fsm.RegisterStateCallback(k_stateDone, EnterStateDone, null, ExitStateDone); m_fsm.ExecuteAction(k_actionNext); }
/// @param localDirector /// The local director owner of the Controller /// @param view /// The view of the scene /// @param cameraController /// The camera controller /// public LevelController(LocalDirector localDirector, LevelView view) : base(localDirector, view, SceneIdentifiers.k_map) { m_view = view; m_tileFactory = localDirector.GetFactory <TileFactory>(); m_levelService = GlobalDirector.Service <LevelService>(); m_popupService = GlobalDirector.Service <PopupService>(); m_objectiveService = localDirector.GetService <ObjectiveService>(); m_audioService.PlayMusicFadeCross(AudioIdentifiers.k_musicLevel); m_fsm.RegisterStateCallback(k_stateInit, EnterStateInit, null, null); m_fsm.RegisterStateCallback(k_stateLoad, EnterStateLoad, null, null); m_fsm.RegisterStateCallback(k_stateIdle, EnterStateIdle, null, ExitStateIdle); m_fsm.RegisterStateCallback(k_stateShuffle, EnterStateShuffle, null, null); m_fsm.RegisterStateCallback(k_stateResolve, EnterStateResolve, null, ExitStateResolve); m_fsm.RegisterStateCallback(k_stateWin, EnterStateWin, null, null); m_fsm.RegisterStateCallback(k_stateLose, EnterStateLose, null, null); m_fsm.ExecuteAction(k_actionNext); }