示例#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();
 }