Exemple #1
0
        private void Awake()
        {
            Instance = this;

            MainCamera = Camera.main.transform;
            Player     = GameObject.FindGameObjectWithTag("Player").transform;

            Inventory = new Inventory();

            PlayerController = new PlayerController(new UnitMotor(
                                                        GameObject.FindObjectOfType <CharacterController>().transform));
            FlashLightController = new FlashLightController();
            InputController      = new InputController();
            WeaponController     = new WeaponController();
            SelectionController  = new SelectionController();
            BotController        = new BotController();

            _controllers    = new IOnUpdate[6];
            _controllers[0] = FlashLightController;
            _controllers[1] = InputController;
            _controllers[2] = PlayerController;
            _controllers[3] = WeaponController;
            _controllers[4] = SelectionController;
            _controllers[5] = BotController;
        }
Exemple #2
0
 private void Start()
 {
     Inventory.OnStart();
     FlashLightController.OnStart();
     PlayerController.On();
     InputController.On();
     BotController.CountBot = _botCount;
     BotController.Spawner  = _spawnPoint;
     BotController.OnStart();
     BotController.On();
 }
Exemple #3
0
        void Start()
        {
            Instance = this;



            _controllersGameObject = new GameObject {
                name = "Controllers"
            };



            _inputController = _controllersGameObject.AddComponent <InputController>();

            _flashlightController = _controllersGameObject.AddComponent <FlashlightController>();

            _markController = _controllersGameObject.AddComponent <MarkController>();

            _weaponsController = _controllersGameObject.AddComponent <WeaponController>();

            _botController = _controllersGameObject.AddComponent <BotController>();

            _objectManager = GetComponent <ObjectManager>();
        }