Ejemplo n.º 1
0
    // Use this for initialization
    void Awake()
    {
        firePoint = transform.FindChild("FirePoint");

        weaponDirectionHandlerScript = (WeaponDirectionHandler) FindObjectOfType(typeof(WeaponDirectionHandler));
        direction = weaponDirectionHandlerScript.GetLastDirection();
    }
Ejemplo n.º 2
0
    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;
    }