private void Start() { peopleController = GetComponent <PeopleController>(); animator = GetComponent <Animator>(); nav = GetComponent <NavMeshAgent>(); player = GameObject.FindGameObjectWithTag("Player"); lastPlayerSighting = GameObject.FindGameObjectWithTag("GameManager").GetComponent <LastPlayerSighted>(); gameManagerScript = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManagerScript>(); peopleState = "Patrolling"; missing = true; sprRad = GetComponent <SphereCollider>().radius; }
// Use this for initialization void Start() { isCrouching = false; NearbyItem = null; isPause = false; animator = this.GetComponent <Animator>(); controller = this.GetComponent <CharacterController>(); characterStat = this.GetComponent <CharacterStatus>(); lastPlayerSighted = GameObject.FindGameObjectWithTag("GameManager").GetComponent <LastPlayerSighted>(); gameManagerScript = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManagerScript>(); pauseCanvas = GameObject.FindGameObjectWithTag("PauseCanvas"); pauseCanvas.SetActive(false); }
// Use this for initialization void Start() { isCrouching = false; NearbyItem = null; player = GameObject.FindGameObjectWithTag("Player"); animator = GetComponent <Animator>(); characterStat = this.GetComponent <CharacterStatus>(); nav = GetComponent <NavMeshAgent>(); spCol = GetComponent <SphereCollider>(); lastPlayerSighting = GameObject.FindGameObjectWithTag("GameManager").GetComponent <LastPlayerSighted>(); gameManagerScript = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManagerScript>(); personalLastSighting = lastPlayerSighting.resetPosition; previousSighting = lastPlayerSighting.resetPosition; }