// Use this for initialization void Awake() { touchObject = this.transform.FindChild("SenseTouch").gameObject; woken = touchObject.GetComponent<Woken>(); nav = GetComponent<NavMeshAgent>(); startingPosition = transform.position; }
// initialize variables with awake function void Awake() { touchObject = this.transform.FindChild("SenseTouch").gameObject; suspicion = GetComponent<Suspicion>(); personSight = GetComponent<PersonSight>(); woken = touchObject.GetComponent<Woken>(); nav = GetComponent<NavMeshAgent>(); InitialiseSantaTransform(); gameController = GetComponent<GameController>(); }
// Use this for initialization void Awake() { suspicion = GetComponent<Suspicion>(); personSight = GetComponent<PersonSight>(); nav = GetComponent<NavMeshAgent>(); santa = GameObject.FindGameObjectWithTag("Player").transform; startingPosition = transform.position; touchObject = this.transform.FindChild("SenseTouch").gameObject; woken = touchObject.GetComponent<Woken>(); }
// Use this for initialization void Awake() { // Setting up the reference sittingScript = GetComponent<SittingScript>(); personSight = GetComponent<PersonSight>(); suspicion = GetComponent<Suspicion>(); nav = GetComponent<NavMeshAgent>(); santa = GameObject.FindGameObjectWithTag("Player").transform; originalFOV = personSight.fieldOfViewAngle; touchObject = this.transform.FindChild("SenseTouch").gameObject; woken = touchObject.GetComponent<Woken>(); }
// Use this for initialization void Awake() { // Setting up the reference sleepingScript = GetComponent<SleepingScript>(); personSight = GetComponent<PersonSight>(); suspicion = GetComponent<Suspicion>(); nav = GetComponent<NavMeshAgent>(); santa = GameObject.FindGameObjectWithTag("Player").transform; fovEyesScript = GetComponent<FOV2DEyes>(); fovConeScript = GetComponent<FOV2DVisionCone>(); touchObject = this.transform.FindChild("SenseTouch").gameObject; woken = touchObject.GetComponent<Woken>(); }
void Awake() { touchObject = this.transform.FindChild("SenseTouch").gameObject; woken = touchObject.GetComponent<Woken>(); santaTransform = GameObject.FindGameObjectWithTag("Player").transform; nav = GetComponent<NavMeshAgent>(); anim = GetComponent<Animator>(); // Must make sure rotation of person is by the animator and not by the nav mesh agent nav.updateRotation = false; animSetup = new AnimatorSetup(anim); // Convert deadZone variable from degrees to radians deadZone *= Mathf.Deg2Rad; }
void Awake() { InitialiseSantaTransform(); personSight = GetComponent<PersonSight>(); suspicion = GetComponent<Suspicion>(); nav = GetComponent<NavMeshAgent>(); anim = GetComponent<Animator>(); touchObject = this.transform.FindChild("SenseTouch").gameObject; woken = touchObject.GetComponent<Woken>(); // Must make sure rotation of person is by the animator and not by the nav mesh agent nav.updateRotation = false; animSetup = new AnimatorSetup(anim); // Convert deadZone variable from degrees to radians deadZone *= Mathf.Deg2Rad; }
void BgWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { Woken?.Invoke(this, new EventArgs()); }