void OnDestroy()
 {
     foreach (var controller in ControllersBox.Controllers)
     {
         ControllersInitializer.Reset(controller);
     }
 }
예제 #2
0
        public static T Get <T>() where T : class
        {
            var type       = typeof(T);
            var controller = Controllers[type];

            ControllersInitializer.Init(type, controller);
            return(controller as T);
        }
        void Awake()
        {
            foreach (var controller in ControllersBox.Controllers)
            {
                ControllersInitializer.Init(controller);
            }

            Instance = this;
        }