Пример #1
0
        public Controllers()
        {
            IMotor motor = default;
            if (Application.platform == RuntimePlatform.PS4)
            {
                //
            }
            else
            {
                motor = new UnitMotor(
                    ServiceLocatorMonoBehaviour.GetService<CharacterController>());

            }
            
            ServiceLocator.SetService(new PlayerController(motor));
            ServiceLocator.SetService(new FlashLightController());
            ServiceLocator.SetService(new InputController());
            ServiceLocator.SetService(new HighlightController());
            _executeControllers = new IExecute[4]; 
            
            _executeControllers[0] = ServiceLocator.Resolve<PlayerController>();
            
            _executeControllers[1] = ServiceLocator.Resolve<FlashLightController>();

            _executeControllers[2] = ServiceLocator.Resolve<InputController>();

            _executeControllers[3] = ServiceLocator.Resolve<HighlightController>();

        }
Пример #2
0
        public Controllers()
        {
            IMotor motor = new UnitMotor(ServiceLocatorMonoBehaviour.GetService <CharacterController>());

            ServiceLocator.SetService(new PlayerController(motor));
            ServiceLocator.SetService(new FlashLightController());
            ServiceLocator.SetService(new InputController());
            ServiceLocator.SetService(new SelectionController());
            ServiceLocator.SetService(new WeaponController());
            ServiceLocator.SetService(new Inventory());
            ServiceLocator.SetService(new BotController());
            ServiceLocator.SetService(new TimeRemainingController());

            _executeControllers = new IExecute[6];

            _executeControllers[0] = ServiceLocator.Resolve <PlayerController>();

            _executeControllers[1] = ServiceLocator.Resolve <FlashLightController>();

            _executeControllers[2] = ServiceLocator.Resolve <InputController>();

            _executeControllers[3] = ServiceLocator.Resolve <SelectionController>();

            _executeControllers[4] = ServiceLocator.Resolve <BotController>();

            _executeControllers[5] = ServiceLocator.Resolve <TimeRemainingController>();
        }