Пример #1
0
        public static void Create()
        {
            var obj = new GameObject("ActorsUpdate");

            DontDestroyOnLoad(obj);
            Default = obj.AddComponent <ProcessorUpdate>();
        }
Пример #2
0
        public void Dispose()
        {
            ProcessorSignals.Remove(this);
            ProcessorUpdate.Remove(this);

            OnDispose();
        }
Пример #3
0
        void Awake()
        {
            if (ProcessorUpdate.Default == null)
            {
                ProcessorUpdate.Create();
            }

            ProcessorScene.Default.Setup(ScenesToKeep, SceneDependsOn, this);
        }
Пример #4
0
        public static void InitializeObject(object obj)
        {
            var awakeble = obj as IAwake;

            if (awakeble != null)
            {
                awakeble.OnAwake();
            }
            ProcessorUpdate.Add(obj);
        }
Пример #5
0
        void OnEnable()
        {
            if (Starter.initialized == false)
            {
                return;
            }
            HandleEnable();

            ProcessorSignals.Default.Add(this);
            ProcessorUpdate.Add(this);
        }
Пример #6
0
        void Awake()
        {
            if (ProcessorUpdate.Default == null)
            {
                ProcessorUpdate.Create();
            }


            for (var i = 0; i < pluggables.Count; i++)
            {
                pluggables[i].Plug();
            }
        }
Пример #7
0
        void Awake()
        {
            if (ProcessorUpdate.Default == null)
            {
                ProcessorUpdate.Create();
            }

            for (var i = 0; i < pluggables.Count; i++)
            {
                pluggables[i].Plug();
            }

            if (gameSession != null)
            {
                Toolbox.Add(gameSession);
            }
            if (gameSettings != null)
            {
                Toolbox.Add(gameSettings);
            }
        }
Пример #8
0
 void Awake()
 {
     Default = this;
 }
Пример #9
0
 void OnDisable()
 {
     HandleDisable();
     ProcessorUpdate.Remove(this);
     ProcessorSignals.Default.Remove(this);
 }