Infinite Runner Engine v1.9
Public Attributes | Protected Member Functions | Static Protected Attributes | Properties | List of all members
MoreMountains.Tools.MMPersistentHumbleSingleton< T > Class Template Reference

Persistent humble singleton, basically a classic singleton but will destroy any other older components of the same type it finds on awake More...

Inheritance diagram for MoreMountains.Tools.MMPersistentHumbleSingleton< T >:

Public Attributes

float InitializationTime
 the timestamp at which this singleton got initialized More...
 

Protected Member Functions

virtual void Awake ()
 On awake, we check if there's already a copy of the object in the scene. If there's one, we destroy it. More...
 

Static Protected Attributes

static T _instance
 

Properties

static bool HasInstance [get]
 whether or not this singleton already has an instance More...
 
static T Current [get]
 
static T Instance [get]
 Singleton design pattern More...
 

Detailed Description

Persistent humble singleton, basically a classic singleton but will destroy any other older components of the same type it finds on awake

Type Constraints
T :Component 

Member Function Documentation

◆ Awake()

virtual void MoreMountains.Tools.MMPersistentHumbleSingleton< T >.Awake ( )
protectedvirtual

On awake, we check if there's already a copy of the object in the scene. If there's one, we destroy it.

Member Data Documentation

◆ _instance

T MoreMountains.Tools.MMPersistentHumbleSingleton< T >._instance
staticprotected

◆ InitializationTime

float MoreMountains.Tools.MMPersistentHumbleSingleton< T >.InitializationTime

the timestamp at which this singleton got initialized

Property Documentation

◆ Current

◆ HasInstance

bool MoreMountains.Tools.MMPersistentHumbleSingleton< T >.HasInstance
staticget

whether or not this singleton already has an instance

◆ Instance

Singleton design pattern

The instance.


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