void Start() { Time.timeScale = 1; startYRot = this.transform.eulerAngles.y; pause = GetComponent<pauseScript>(); if (!talking && !talkingIntro) { artifactTags = GameObject.FindGameObjectWithTag("Tags"); tags = artifactTags.GetComponent<ArtifactTags>(); } else if (talking) { transform.localEulerAngles = new Vector3(transform.localEulerAngles.x, 180, transform.localEulerAngles.z); currentX = this.transform.localEulerAngles.y; } else { transform.localEulerAngles = new Vector3(transform.localEulerAngles.x, 0, transform.localEulerAngles.z); currentX = this.transform.localEulerAngles.y; } //assigning public variables to components characterController = GetComponent<CharacterController>(); bob = cam.GetComponent<Animator>(); stepSource = this.GetComponent<AudioSource>(); //locking cursor into the center of the screen and making it invisible Cursor.visible = false; Cursor.lockState = CursorLockMode.Locked; stepI = stepInterval; }
public void Setup() { //SceneManager.LoadScene("Single Player"); //yield return null; testObject = GameObject.Instantiate(new GameObject()); pauseMono = testObject.AddComponent <pauseScript>(); //gameScene.Find }
float timeCountpower = 0; //count of time void Start() { pause = gameObject.GetComponent <pauseScript>(); }