// Use this for initialization void Awake() { firePoint = transform.FindChild("FirePoint"); weaponDirectionHandlerScript = (WeaponDirectionHandler) FindObjectOfType(typeof(WeaponDirectionHandler)); direction = weaponDirectionHandlerScript.GetLastDirection(); }
private void Start() { base.Start(); if (hasAuthority) { camera = Camera.main; FindObjectOfType <CinemachineVirtualCamera>().Follow = transform; FindObjectOfType <CinemachineVirtualCamera>().LookAt = transform; } weaponDirectionHandler = GetComponentInChildren <WeaponDirectionHandler>(); playerCombat = GetComponent <PlayerCombat>(); isInitialized = true; }