Beispiel #1
0
        public void AddController(Type controller, string methodName, object[] parameters)
        {
            GameObject createdController = _controllerFactory.CreateController(controller);

            _registryManager.ControllerRegistry.Add(createdController.name, createdController);
            _basicTypeInvoker.CallMethod(createdController.GetComponent(controller), methodName, parameters);
        }
Beispiel #2
0
        public GameObject Resolve(Type controller)
        {
            if (!_controllerRegistry.ContainsKey(controller.ToString()))
            {
                _controllerRegistry.Add(controller.ToString(), _controllerFactory.CreateController(controller));
            }

            return(_controllerRegistry[controller.ToString()]);
        }