Exemplo n.º 1
0
    private void Awake()
    {
        input = PlayerActions.CreateWithDefaultBindings();

        raycaster     = GetComponent <Raycaster>();
        audioManager  = FindObjectOfType <AudioManager>();
        dudeAnimation = GetComponentInChildren <DudeAnimation>();

        UpdateGravity();
        velocity     = Vector3.zero;
        respawnPoint = Vector3.zero;
    }
Exemplo n.º 2
0
    private void Awake()
    {
        raycaster     = GetComponent <Raycaster>();
        dudeAnimation = GetComponentInChildren <DudeAnimation>();

        UpdateGravity();
        velocity     = Vector3.zero;
        respawnPoint = Vector3.zero;

        if (mask != null)
        {
            GameObject maskInstance = (GameObject)Instantiate(mask, transform.position, Quaternion.identity);
            MaskFollow maskFollow   = maskInstance.GetComponent <MaskFollow>();
            maskFollow.target = gameObject;
        }
    }