private void Awake() { movement = GetComponent <ClientMovementDriver>(); shooting = GetComponent <ClientShooting>(); shotRayProvider = GetComponent <ShotRayProvider>(); fpsAnimator = GetComponent <FpsAnimator>(); currentGun = GetComponent <GunManager>(); controller = GetComponent <IControlProvider>(); }
private void Awake() { movement = GetComponent <ClientMovementDriver>(); shooting = GetComponent <ClientShooting>(); shotRayProvider = GetComponent <ShotRayProvider>(); fpsAnimator = GetComponent <FpsAnimator>(); currentGun = GetComponent <GunManager>(); CreateDirectionCache(); }
private void Start() { movementDriver = GetComponent <ClientMovementDriver>(); shooting = GetComponent <ClientShooting>(); coordinator = FindObjectOfType <SimulatedPlayerCoordinatorWorkerConnector>(); agent.updatePosition = false; agent.updateRotation = false; agent.updateUpAxis = false; agent.Warp(transform.position); anchorPoint = transform.position; worldBounds = coordinator.GetWorldBounds(); }
private void Awake() { movement = GetComponent <ClientMovementDriver>(); shooting = GetComponent <ClientShooting>(); shotRayProvider = GetComponent <ShotRayProvider>(); fpsAnimator = GetComponent <FpsAnimator>(); fpsAnimator.InitializeOwnAnimator(); currentGun = GetComponent <GunManager>(); controller = GetComponent <IControlProvider>(); var uiManager = GameObject.FindGameObjectWithTag("OnScreenUI")?.GetComponent <UIManager>(); if (uiManager == null) { throw new NullReferenceException("Was not able to find the OnScreenUI prefab in the scene."); } inGameManager = uiManager.InGameManager; if (inGameManager == null) { throw new NullReferenceException("Was not able to find the in-game manager in the scene."); } }