TopDown Engine  v3.6
MoreMountains.TopDownEngine.MultiplayerLevelManager Class Reference

A generic level manager meant to handle multiplayer scenes (specifically spawn and camera modes It's recommended to extend it to implement your own specific gameplay rules More...

Inheritance diagram for MoreMountains.TopDownEngine.MultiplayerLevelManager:
MoreMountains.TopDownEngine.LevelManager MoreMountains.Tools.MMSingleton< LevelManager > MoreMountains.Tools.MMEventListener< TopDownEngineEvent > MoreMountains.TopDownEngine.ExplodudesMultiplayerLevelManager MoreMountains.TopDownEngine.GrasslandsMultiplayerLevelManager

Public Types

enum  CameraModes { CameraModes.Split, CameraModes.Group }
 the types of cameras to choose from More...
 

Public Member Functions

override void PlayerDead (Character playerCharacter)
 Kills the specified player More...
 
- Public Member Functions inherited from MoreMountains.TopDownEngine.LevelManager
virtual void GotoLevel (string levelName)
 Gets the player to the specified level More...
 
virtual void TriggerEndLevelEvents ()
 Triggers end of level events More...
 
virtual void ToggleCharacterPause ()
 Toggles Character Pause More...
 
virtual void FreezeCharacters ()
 Freezes the character(s) More...
 
virtual void UnFreezeCharacters ()
 Unfreezes the character(s) More...
 
virtual void SetCurrentCheckpoint (CheckPoint newCheckPoint)
 Sets the current checkpoint with the one set in parameter. This checkpoint will be saved and used should the player die. More...
 
virtual void OnMMEvent (TopDownEngineEvent engineEvent)
 Catches TopDownEngineEvents and acts on them, playing the corresponding sounds More...
 
- Public Member Functions inherited from MoreMountains.Tools.MMEventListener< TopDownEngineEvent >
void OnMMEvent (T eventType)
 

Public Attributes

List< CheckPointSpawnPoints
 the list of checkpoints (in order) to use to spawn characters More...
 
CameraModes CameraMode = CameraModes.Split
 the selected camera mode (either group, all targets in one screen, or split screen) More...
 
GameObject GroupCameraRig
 the group camera rig More...
 
GameObject SplitCameraRig
 the split camera rig More...
 
MultiplayerGUIManager MPGUIManager
 the multiplayer GUI Manager More...
 
- Public Attributes inherited from MoreMountains.TopDownEngine.LevelManager
bool AutoAttributePlayerIDs = true
 the prefab you want for your player More...
 
Character[] PlayerPrefabs
 the list of player prefabs to instantiate More...
 
List< CharacterSceneCharacters
 a list of Characters already present in the scene before runtime. If this list is filled, PlayerPrefabs will be ignored More...
 
CheckPoint InitialSpawnPoint
 the checkpoint to use as initial spawn point if no point of entry is specified More...
 
CheckPoint CurrentCheckpoint
 the currently active checkpoint (the last checkpoint passed by the player) More...
 
Transform[] PointsOfEntry
 A list of this level's points of entry, which can be used from other levels as initial targets. More...
 
float IntroFadeDuration =1f
 duration of the initial fade in (in seconds) More...
 
float SpawnDelay = 0f
 
float OutroFadeDuration =1f
 duration of the fade to black at the end of the level (in seconds) More...
 
int FaderID = 0
 the ID to use when triggering the event (should match the ID on the fader you want to use) More...
 
MMTweenType FadeCurve = new MMTweenType(MMTween.MMTweenCurve.EaseInOutCubic)
 the curve to use for in and out fades More...
 
float RespawnDelay = 2f
 duration between a death of the main character and its respawn More...
 
float DelayBeforeDeathScreen = 1f
 the delay, in seconds, before displaying the death screen once the player is dead More...
 
bool UseLevelBounds = true
 if this is true, this level will use the level bounds defined on this LevelManager. Set it to false when using the Rooms system. More...
 
MMLoadScene.LoadingSceneModes LoadingSceneMode = MMLoadScene.LoadingSceneModes.MMSceneLoadingManager
 the method to use to load the destination level More...
 
string LoadingSceneName = "LoadingScreen"
 the name of the MMSceneLoadingManager scene you want to use More...
 
MMAdditiveSceneLoadingManagerSettings AdditiveLoadingSettings
 the settings to use when loading the scene in additive mode More...
 
bool SetPlayerAsFeedbackRangeCenter = false
 if this is true, an event will be triggered on player instantiation to set the range target of all feedbacks to it More...
 

Protected Member Functions

override void Awake ()
 On awake we handle our different camera modes More...
 
virtual void HandleCameraModes ()
 Sets up the scene to match the selected camera mode More...
 
override void SpawnMultipleCharacters ()
 Spawns all characters at the specified spawn points More...
 
virtual void OnPlayerDeath (Character playerCharacter)
 Override this to specify what happens when a player dies More...
 
- Protected Member Functions inherited from MoreMountains.TopDownEngine.LevelManager
virtual void Start ()
 On Start we grab our dependencies and initialize spawn More...
 
virtual IEnumerator InitializationCoroutine ()
 
virtual void InstantiatePlayableCharacters ()
 Instantiate playable characters based on the ones specified in the PlayerPrefabs list in the LevelManager's inspector. More...
 
virtual void CheckpointAssignment ()
 Assigns all respawnable objects in the scene to their checkpoint More...
 
virtual void Initialization ()
 Gets current camera, points number, start time, etc. More...
 
virtual void SpawnSingleCharacter ()
 Spawns a playable character into the scene More...
 
virtual IEnumerator GotoLevelCo (string levelName)
 Waits for a short time and then loads the specified level More...
 
virtual IEnumerator PlayerDeadCo ()
 Triggers the death screen display after a short delay More...
 
virtual void Respawn ()
 Initiates the respawn More...
 
virtual IEnumerator SoloModeRestart ()
 Coroutine that kills the player, stops the camera, resets the points. More...
 
virtual void OnEnable ()
 OnDisable, we start listening to events. More...
 
virtual void OnDisable ()
 OnDisable, we stop listening to events. More...
 
- Protected Member Functions inherited from MoreMountains.Tools.MMSingleton< LevelManager >
virtual void InitializeSingleton ()
 Initializes the singleton. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from MoreMountains.Tools.MMSingleton< LevelManager >
static T TryGetInstance ()
 
- Static Public Attributes inherited from MoreMountains.Tools.MMSingleton< LevelManager >
static bool HasInstance
 
static T Current
 
- Static Protected Member Functions inherited from MoreMountains.TopDownEngine.LevelManager
static void InitializeStatics ()
 Statics initialization to support enter play modes More...
 
- Protected Attributes inherited from MoreMountains.TopDownEngine.LevelManager
DateTime _started
 
int _savedPoints
 
Collider _collider
 
Vector3 _initialSpawnPointPosition
 
- Static Protected Attributes inherited from MoreMountains.Tools.MMSingleton< LevelManager >
static T _instance
 
- Properties inherited from MoreMountains.TopDownEngine.LevelManager
virtual Bounds? LevelBounds [get]
 the level limits, camera and player won't go beyond this point. More...
 
virtual Collider BoundsCollider [get, protected set]
 
virtual TimeSpan RunningTime [get]
 the elapsed time since the start of the level More...
 
virtual List< CheckPointCheckpoints [get, protected set]
 
virtual List< CharacterPlayers [get, protected set]
 
- Properties inherited from MoreMountains.Tools.MMSingleton< LevelManager >
static T Instance [get]
 Singleton design pattern More...
 

Detailed Description

A generic level manager meant to handle multiplayer scenes (specifically spawn and camera modes It's recommended to extend it to implement your own specific gameplay rules

Member Enumeration Documentation

◆ CameraModes

the types of cameras to choose from

Enumerator
Split 
Group 

Member Function Documentation

◆ Awake()

override void MoreMountains.TopDownEngine.MultiplayerLevelManager.Awake ( )
protectedvirtual

On awake we handle our different camera modes

Reimplemented from MoreMountains.TopDownEngine.LevelManager.

◆ HandleCameraModes()

virtual void MoreMountains.TopDownEngine.MultiplayerLevelManager.HandleCameraModes ( )
protectedvirtual

Sets up the scene to match the selected camera mode

◆ OnPlayerDeath()

virtual void MoreMountains.TopDownEngine.MultiplayerLevelManager.OnPlayerDeath ( Character  playerCharacter)
protectedvirtual

Override this to specify what happens when a player dies

Parameters
playerCharacter

Reimplemented in MoreMountains.TopDownEngine.GrasslandsMultiplayerLevelManager, and MoreMountains.TopDownEngine.ExplodudesMultiplayerLevelManager.

◆ PlayerDead()

override void MoreMountains.TopDownEngine.MultiplayerLevelManager.PlayerDead ( Character  playerCharacter)
virtual

Kills the specified player

Reimplemented from MoreMountains.TopDownEngine.LevelManager.

◆ SpawnMultipleCharacters()

override void MoreMountains.TopDownEngine.MultiplayerLevelManager.SpawnMultipleCharacters ( )
protectedvirtual

Spawns all characters at the specified spawn points

Reimplemented from MoreMountains.TopDownEngine.LevelManager.

Member Data Documentation

◆ CameraMode

CameraModes MoreMountains.TopDownEngine.MultiplayerLevelManager.CameraMode = CameraModes.Split

the selected camera mode (either group, all targets in one screen, or split screen)

◆ GroupCameraRig

GameObject MoreMountains.TopDownEngine.MultiplayerLevelManager.GroupCameraRig

the group camera rig

◆ MPGUIManager

MultiplayerGUIManager MoreMountains.TopDownEngine.MultiplayerLevelManager.MPGUIManager

the multiplayer GUI Manager

◆ SpawnPoints

List<CheckPoint> MoreMountains.TopDownEngine.MultiplayerLevelManager.SpawnPoints

the list of checkpoints (in order) to use to spawn characters

◆ SplitCameraRig

GameObject MoreMountains.TopDownEngine.MultiplayerLevelManager.SplitCameraRig

the split camera rig


The documentation for this class was generated from the following file: