// Use this for initialization void Start() { player = GameObject.FindGameObjectWithTag("Player"); script = player.GetComponentInChildren<ringOfSmell>(); }
void Start() { //Physics.gravity = new Vector3(0.0f, -grav, 0.0f); //boneCoolDown.GetComponent<Animator>().enabled = false; //bagCoolDown.GetComponent<Animator>().enabled = false; //bagCoolDown.enabled = false; boneSpawnTimer = defaultBoneSpawnTimer; m_GroundCheckDistance = 0.6f; rb = GetComponent<Rigidbody>(); catAnim = GetComponent<Animator>(); origMovementSpeed = movementSpeed; sprintSpeed = movementSpeed * sprintModifier; ring = GetComponentInChildren<ringOfSmell>(); boneSpawner = GameObject.FindGameObjectWithTag("BoneSpawner"); durationOfSpriteAnimationBone = spriteAnimationBone.length; durationOfSpriteAnimationBag = spriteAnimationBag.length; isEsc = !isEsc; //mainCam = Camera.main; //numberOfBones = GetComponent<Text>().text--; }
void Start() { checkInArea = GameObject.Find ("ring of Smell").GetComponent<ringOfSmell>(); }
void Start() { coneOfVisionScript = GetComponentInChildren<coneOfVision>(); dogRigidbody = GetComponent<Rigidbody>(); agent = GetComponent<NavMeshAgent> (); player = GameObject.FindGameObjectWithTag("Player"); ringOfSmellScript = player.GetComponentInChildren<ringOfSmell>(); raycastRange = GetComponentInChildren<coneOfVision>().startRange; //defaultRaycastRange; turnTimerAlert = defaultTurnTimerAlert; //respawnPosition = this.transform.position; setDirectionsForIdle(); setTargetWaypoints(); currentTarget = targets[0]; lastTarget = currentTarget; agent.speed = patrolSpeed; agent.SetDestination(currentTarget.position); stateManager((int)enumStatesFatDog.idle); //Setting Timers timer = defaultTimer; eatTimer = defaultEatTimer; idleTimer = defaultIdleTimer; barkTimer = defaultBarkTimer; escapeTimer = defaultEscapeTimer; turnTimer = defaultTurnTimer; x = transform.right.x * 1.0f; y = transform.right.z * 1.0f; startingAngle = Mathf.Atan2(x, y) * Mathf.Rad2Deg; startingVector = transform.forward * 2.0f; respawnPosition = transform.position; newSphere = (GameObject)Instantiate(sphere, this.transform.position, Quaternion.identity); newSphere.transform.parent = transform; newSphere.SetActive (false); }
//end of Misc variables void Start() { respawnPosition = this.transform.position; dodgeTimer = defaultDodgeTimer; visionRotator = GameObject.FindGameObjectWithTag("VisionRotator"); player = GameObject.FindGameObjectWithTag("Player"); ringOfSmellScript = player.GetComponentInChildren<ringOfSmell>(); coneOfVisionScript = GetComponentInChildren<coneOfVision>(); patrolAnim = gameObject.GetComponent<Animator>(); //Setting waypoints and Navigation Mesh agent setDirectionsForIdle(); setTargetWaypoints(); currentTarget = targets[0]; lastTarget = currentTarget; firstTarget = currentTarget; agent = GetComponent<NavMeshAgent>(); agent.speed = patrolSpeed; agent.SetDestination(currentTarget.position); //end of Setting waypoints and Navigation Mesh agent //Setting Timers chargeTimer = defaultChargeTimer; timer = defaultTimer; eatTimer = defaultEatTimer; barkTimer = defaultBarkTimer; alertTimer = defaultAlertTimer; escapeTimer = defaultEscapeTimer; turnTimer = defaultTurnTimer; turnTowardsSmellTimer = defaultTurnTowardsSmellTimer; agentNotMovingTimer = defaultAgentNotMovingTimer; newTargetTimer = defaultNewTargetTimer; //end of Setting Timers //Misc playerCollider = player.GetComponent<Collider>(); rb = GetComponent<Rigidbody> (); //end of Misc }
//private checkPoint cp; void Start() { isHiding = false; isPaused = false; isEntered = false; //cp = character.GetComponent<checkPoint>(); ros = character.FindChild ("Smell ring FBX").GetComponent<ringOfSmell>(); playerScript = character.GetComponent<TemporaryMovement>(); characterCamera = playerScript.mainCam.GetComponent<thirdPersonCamera> (); //cameraPosition.localRotation = Quaternion.Euler(0, transform.parent.eulerAngles.y, 0); //Debug.Log (cameraPosition.eulerAngles.y); showHiding.SetActive(false); }
// Use this for initialization void Start() { disguiseTimer = defaultDisguiseTimer; hiddenSmellTimer = defaultHiddenSmellTimer; ring = GetComponentInChildren<ringOfSmell>(); }