|
TopDown Engine v4.5
|
Spawns the player, handles checkpoints and respawn. More...
Public Member Functions | |
| virtual void | GotoLevel (string levelName) |
| Gets the player to the specified level. | |
| virtual void | TriggerEndLevelEvents () |
| Triggers end of level events. | |
| virtual void | PlayerDead (Character playerCharacter) |
| Kills the player. | |
| virtual void | ToggleCharacterPause () |
| Toggles Character Pause. | |
| virtual void | FreezeCharacters () |
| Freezes the character(s) | |
| virtual void | UnFreezeCharacters () |
| Unfreezes the character(s) | |
| 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. | |
| virtual void | OnMMEvent (TopDownEngineEvent engineEvent) |
| Catches TopDownEngineEvents and acts on them, playing the corresponding sounds. | |
| Public Member Functions inherited from MoreMountains.Tools.MMEventListener< T > | |
| void | OnMMEvent (T eventType) |
Public Attributes | |
| bool | AutoAttributePlayerIDs = true |
| the prefab you want for your player | |
| Character[] | PlayerPrefabs |
| the list of player prefabs to instantiate | |
| List< Character > | SceneCharacters |
| a list of Characters already present in the scene before runtime. If this list is filled, PlayerPrefabs will be ignored | |
| CheckPoint | InitialSpawnPoint |
| the checkpoint to use as initial spawn point if no point of entry is specified | |
| CheckPoint | CurrentCheckpoint |
| the currently active checkpoint (the last checkpoint passed by the player) | |
| Transform[] | PointsOfEntry |
| A list of this level's points of entry, which can be used from other levels as initial targets. | |
| float | IntroFadeDuration =1f |
| duration of the initial fade in (in seconds) | |
| float | SpawnDelay = 0f |
| float | OutroFadeDuration =1f |
| duration of the fade to black at the end of the level (in seconds) | |
| int | FaderID = 0 |
| the ID to use when triggering the event (should match the ID on the fader you want to use) | |
| MMTweenType | FadeCurve = new MMTweenType(MMTween.MMTweenCurve.EaseInOutCubic) |
| the curve to use for in and out fades | |
| float | RespawnDelay = 2f |
| duration between a death of the main character and its respawn | |
| float | DelayBeforeDeathScreen = 1f |
| the delay, in seconds, before displaying the death screen once the player is dead | |
| 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. | |
| MMLoadScene.LoadingSceneModes | LoadingSceneMode = MMLoadScene.LoadingSceneModes.MMSceneLoadingManager |
| the method to use to load the destination level | |
| string | LoadingSceneName = "LoadingScreen" |
| the name of the MMSceneLoadingManager scene you want to use | |
| MMAdditiveSceneLoadingManagerSettings | AdditiveLoadingSettings |
| the settings to use when loading the scene in additive mode | |
| 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 | |
Protected Member Functions | |
| override void | Awake () |
| On awake, instantiates the player. | |
| virtual void | Start () |
| On Start we grab our dependencies and initialize spawn. | |
| virtual IEnumerator | InitializationCoroutine () |
| virtual void | SpawnMultipleCharacters () |
| A method meant to be overridden by each multiplayer level manager to describe how to spawn characters. | |
| virtual void | InstantiatePlayableCharacters () |
| Instantiate playable characters based on the ones specified in the PlayerPrefabs list in the LevelManager's inspector. | |
| virtual void | CheckpointAssignment () |
| Assigns all respawnable objects in the scene to their checkpoint. | |
| virtual void | Initialization () |
| Gets current camera, points number, start time, etc. | |
| virtual void | SpawnSingleCharacter () |
| Spawns a playable character into the scene. | |
| virtual IEnumerator | GotoLevelCo (string levelName) |
| Waits for a short time and then loads the specified level. | |
| virtual IEnumerator | PlayerDeadCo () |
| Triggers the death screen display after a short delay. | |
| virtual void | Respawn () |
| Initiates the respawn. | |
| virtual IEnumerator | SoloModeRestart () |
| Coroutine that kills the player, stops the camera, resets the points. | |
| virtual void | OnEnable () |
| OnDisable, we start listening to events. | |
| virtual void | OnDisable () |
| OnDisable, we stop listening to events. | |
| Protected Member Functions inherited from MoreMountains.Tools.MMSingleton< T > | |
| virtual void | InitializeSingleton () |
| Initializes the singleton. | |
Static Protected Member Functions | |
| static void | InitializeStatics () |
| Statics initialization to support enter play modes. | |
Protected Attributes | |
| DateTime | _started |
| int | _savedPoints |
| Collider | _collider |
| Collider2D | _collider2D |
| Vector3 | _initialSpawnPointPosition |
Properties | |
| virtual Bounds | LevelBounds [get] |
| the level limits, camera and player won't go beyond this point. | |
| virtual Collider | BoundsCollider [get, protected set] |
| virtual Collider2D | BoundsCollider2D [get, protected set] |
| virtual TimeSpan | RunningTime [get] |
| the elapsed time since the start of the level | |
| virtual List< CheckPoint > | Checkpoints [get, protected set] |
| virtual List< Character > | Players [get, protected set] |
| Properties inherited from MoreMountains.Tools.MMSingleton< T > | |
| static bool | HasInstance [get] |
| static T | Current [get] |
| static T | Instance [get] |
| Singleton design pattern. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from MoreMountains.Tools.MMSingleton< T > | |
| static T | TryGetInstance () |
| Static Protected Attributes inherited from MoreMountains.Tools.MMSingleton< T > | |
| static T | _instance |
Spawns the player, handles checkpoints and respawn.
|
protectedvirtual |
On awake, instantiates the player.
Reimplemented from MoreMountains.Tools.MMSingleton< T >.
Reimplemented in MoreMountains.TopDownEngine.MultiplayerLevelManager.
|
protectedvirtual |
Assigns all respawnable objects in the scene to their checkpoint.
|
virtual |
Freezes the character(s)
|
virtual |
Gets the player to the specified level.
| levelName | Level name. |
|
protectedvirtual |
Waits for a short time and then loads the specified level.
| levelName | Level name. |
|
protectedvirtual |
Gets current camera, points number, start time, etc.
Reimplemented in MoreMountains.TopDownEngine.ExplodudesMultiplayerLevelManager, and MoreMountains.TopDownEngine.GrasslandsMultiplayerLevelManager.
|
protectedvirtual |
|
staticprotected |
Statics initialization to support enter play modes.
|
protectedvirtual |
Instantiate playable characters based on the ones specified in the PlayerPrefabs list in the LevelManager's inspector.
|
protectedvirtual |
OnDisable, we stop listening to events.
Reimplemented in MoreMountains.TopDownEngine.ExplodudesMultiplayerLevelManager, and MoreMountains.TopDownEngine.GrasslandsMultiplayerLevelManager.
|
protectedvirtual |
OnDisable, we start listening to events.
Reimplemented in MoreMountains.TopDownEngine.ExplodudesMultiplayerLevelManager, and MoreMountains.TopDownEngine.GrasslandsMultiplayerLevelManager.
|
virtual |
Catches TopDownEngineEvents and acts on them, playing the corresponding sounds.
| engineEvent | TopDownEngineEvent event. |
|
virtual |
Kills the player.
Reimplemented in MoreMountains.TopDownEngine.MultiplayerLevelManager.
|
protectedvirtual |
Triggers the death screen display after a short delay.
|
protectedvirtual |
Initiates the respawn.
|
virtual |
Sets the current checkpoint with the one set in parameter. This checkpoint will be saved and used should the player die.
| newCheckPoint |
|
protectedvirtual |
Coroutine that kills the player, stops the camera, resets the points.
|
protectedvirtual |
A method meant to be overridden by each multiplayer level manager to describe how to spawn characters.
Reimplemented in MoreMountains.TopDownEngine.MultiplayerLevelManager.
|
protectedvirtual |
Spawns a playable character into the scene.
|
protectedvirtual |
On Start we grab our dependencies and initialize spawn.
|
virtual |
Toggles Character Pause.
|
virtual |
Triggers end of level events.
|
virtual |
Unfreezes the character(s)
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| MMAdditiveSceneLoadingManagerSettings MoreMountains.TopDownEngine.LevelManager.AdditiveLoadingSettings |
the settings to use when loading the scene in additive mode
| bool MoreMountains.TopDownEngine.LevelManager.AutoAttributePlayerIDs = true |
the prefab you want for your player
should the player IDs be auto attributed (usually yes)
| CheckPoint MoreMountains.TopDownEngine.LevelManager.CurrentCheckpoint |
the currently active checkpoint (the last checkpoint passed by the player)
| float MoreMountains.TopDownEngine.LevelManager.DelayBeforeDeathScreen = 1f |
the delay, in seconds, before displaying the death screen once the player is dead
| MMTweenType MoreMountains.TopDownEngine.LevelManager.FadeCurve = new MMTweenType(MMTween.MMTweenCurve.EaseInOutCubic) |
the curve to use for in and out fades
| int MoreMountains.TopDownEngine.LevelManager.FaderID = 0 |
the ID to use when triggering the event (should match the ID on the fader you want to use)
| CheckPoint MoreMountains.TopDownEngine.LevelManager.InitialSpawnPoint |
the checkpoint to use as initial spawn point if no point of entry is specified
| float MoreMountains.TopDownEngine.LevelManager.IntroFadeDuration =1f |
duration of the initial fade in (in seconds)
| MMLoadScene.LoadingSceneModes MoreMountains.TopDownEngine.LevelManager.LoadingSceneMode = MMLoadScene.LoadingSceneModes.MMSceneLoadingManager |
the method to use to load the destination level
| string MoreMountains.TopDownEngine.LevelManager.LoadingSceneName = "LoadingScreen" |
the name of the MMSceneLoadingManager scene you want to use
| float MoreMountains.TopDownEngine.LevelManager.OutroFadeDuration =1f |
duration of the fade to black at the end of the level (in seconds)
| Character [] MoreMountains.TopDownEngine.LevelManager.PlayerPrefabs |
the list of player prefabs to instantiate
| Transform [] MoreMountains.TopDownEngine.LevelManager.PointsOfEntry |
A list of this level's points of entry, which can be used from other levels as initial targets.
| float MoreMountains.TopDownEngine.LevelManager.RespawnDelay = 2f |
duration between a death of the main character and its respawn
| List<Character> MoreMountains.TopDownEngine.LevelManager.SceneCharacters |
a list of Characters already present in the scene before runtime. If this list is filled, PlayerPrefabs will be ignored
| bool MoreMountains.TopDownEngine.LevelManager.SetPlayerAsFeedbackRangeCenter = false |
if this is true, an event will be triggered on player instantiation to set the range target of all feedbacks to it
| float MoreMountains.TopDownEngine.LevelManager.SpawnDelay = 0f |
| bool MoreMountains.TopDownEngine.LevelManager.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.
|
getprotected set |
|
getprotected set |
|
getprotected set |
|
get |
the level limits, camera and player won't go beyond this point.
|
getprotected set |
|
get |
the elapsed time since the start of the level