예제 #1
0
파일: Main.cs 프로젝트: 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;
        }
예제 #2
0
파일: Main.cs 프로젝트: 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);
        }
예제 #3
0
파일: Main.cs 프로젝트: n1ron/Unity2
 private void Start()
 {
     FlashLightController.Init();
     SelectionController.Init();
     InputController.On();
 }