Ejemplo n.º 1
0
        private void Awake()
        {
            Instance = this;

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

            ObjectManager = new ObjectManager();
            ObjectManager.Start();

            PlayerController = new PlayerController(new UnitMotor(
                                                        GameObject.FindObjectOfType <CharacterController>().transform));
            PlayerController.On();
            FlashLightController = new FlashLightController();
            InputController      = new InputController();
            InputController.On();
            WeaponController = new WeaponController();
            Controllers      = new BaseController[4];
            Controllers[0]   = FlashLightController;
            Controllers[1]   = InputController;
            Controllers[2]   = PlayerController;
            Controllers[3]   = WeaponController;
        }
Ejemplo n.º 2
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>();
        }
Ejemplo n.º 3
0
 private void Start()
 {
     FlashLightController.Init();
     InputController.On();
 }
Ejemplo n.º 4
0
Archivo: Main.cs Proyecto: n1ron/Unity2
 private void Start()
 {
     PlayerController.On();
     InputController.On();
 }