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; }
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); }
private void Start() { FlashLightController.Init(); SelectionController.Init(); InputController.On(); }