private void Awake() { input = PlayerActions.CreateWithDefaultBindings(); raycaster = GetComponent <Raycaster>(); audioManager = FindObjectOfType <AudioManager>(); dudeAnimation = GetComponentInChildren <DudeAnimation>(); UpdateGravity(); velocity = Vector3.zero; respawnPoint = Vector3.zero; }
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; } }