void Start() { mesh = GetComponent <MeshFilter>().mesh; meshRenderer = GetComponent <MeshRenderer>(); eyes = gameObject.GetComponent <FOV2DEyes>(); meshRenderer.material = materials[0]; }
void Start() { mesh = GetComponent<MeshFilter>().mesh; meshRenderer = GetComponent<MeshRenderer>(); eyes = gameObject.GetComponent<FOV2DEyes>(); meshRenderer.material = materials[0]; }
// Use this for initialization void Start() { anim = GetComponentInChildren<Animator> (); _rigidBody = GetComponent<Rigidbody> (); eyes = GetComponentInChildren<FOV2DEyes>(); visionCone = GetComponentInChildren<FOV2DVisionCone>(); InvokeRepeating ("CheckVision", 0, 0.3f); //GameManager.getInstance().setPlayerPos(this.transform.position); soundManager = SoundManager.getInstance(); GameManager.getInstance ().SetPlayer (this.gameObject); }
// 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 Start() { eyes = GetComponentInChildren<FOV2DEyes>(); visionCone = GetComponentInChildren<FOV2DVisionCone>(); }
void Start() { eyes = GetComponentInChildren <FOV2DEyes>(); visionCone = GetComponentInChildren <FOV2DVisionCone>(); }
void Start() { GameManager.getInstance ().addGuardListener (this); anim = GetComponent<Animator> (); agent = GetComponent<NavMeshAgent>(); eyes = GetComponentInChildren<FOV2DEyes>(); visionCone = GetComponentInChildren<FOV2DVisionCone>(); currentState = State.IDLE; // Disabling auto-braking allows for continuous movement // between points (ie, the agent doesn't slow down as it // approaches a destination point). agent.autoBraking = false; agent.Stop (); // Set the agent to go to the currently selected destination. agent.destination = point.position; InvokeRepeating ("CheckVision", 0, 0.3f); }