private void Awake() { Instance = this; MainCamera = Camera.main.transform; Player = GameObject.FindGameObjectWithTag("Player").transform; BotController = new BotController(); PlayerController = new PlayerController(new UnitMovingWASD(Player)); //PlayerController = new PlayerController(new UnitMoving(Player)); InputController = new InputController(); InputController.On(); BotController = new BotController { CountBot = CountBot }; _controllers = new BaseController[3] { InputController, PlayerController, BotController }; }
private void Start() { InputController.On(); BotController.On(); BotController.Init(); }