Esempio n. 1
0
    static StatechartEngine GetInstance()
    {
        if (dead)
        {
            return(null);
        }

        if (instance == null)
        {
            GameObject obj = new GameObject();
            DontDestroyOnLoad(obj);
            instance = obj.AddComponent <StatechartEngine>();
        }
        return(instance);
    }
Esempio n. 2
0
 void OnDisable()
 {
     StatechartEngine.RemoveInstance(this);
 }
Esempio n. 3
0
 void OnEnable()
 {
     StatechartEngine.AddInstance(this);
 }