private void Start() { cursorLockCheck = FindObjectOfType <CursorLockCheck>(); pauseBehaviour = FindObjectOfType <PauseBehaviour>(); cameraTarget = GameObject.FindGameObjectWithTag(TagList.Player); cameraOffset = cameraTarget.transform.position - transform.position; enableUpdate = true; }
public override Playable CreatePlayable(PlayableGraph graph, GameObject owner) { PauseBehaviour template = new PauseBehaviour(); template.clip = this; var playable = ScriptPlayable <PauseBehaviour> .Create(graph, template); PauseBehaviour behaviour = playable.GetBehaviour(); behaviour.director = owner.GetComponent <PlayableDirector>(); return(playable); }
private void Start() { rigid = GetComponent <Rigidbody>(); cursorLockCheck = FindObjectOfType <CursorLockCheck>(); pauseBehaviour = FindObjectOfType <PauseBehaviour>(); }