Exemplo n.º 1
0
Arquivo: Main.cs Projeto: n1ron/Unity2
        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;
        }
Exemplo n.º 2
0
Arquivo: Main.cs Projeto: n1ron/Unity2
        private void Awake()
        {
            Instance = this;

            Player = GameObject.FindGameObjectWithTag("Player").transform;

            PlayerController = new PlayerController(new UnitMotor(Player));
            _updates.Add(PlayerController);

            FlashLightController = new FlashLightController();
            _updates.Add(FlashLightController);

            InputController = new InputController();
            _updates.Add(InputController);

            SelectionController = new SelectionController();
            _updates.Add(SelectionController);
        }
Exemplo n.º 3
0
Arquivo: Main.cs Projeto: n1ron/Unity2
 private void Start()
 {
     FlashLightController.Init();
     SelectionController.Init();
     InputController.On();
 }