void Start() { raycastShooting = GameObject.FindGameObjectWithTag("Player").GetComponent <RaycastShooting>(); playerCam = GameObject.FindGameObjectWithTag("PlayerCamera").GetComponent <Camera>(); doorOpen = true; }
void Start() { GameObject armObject = GameObject.FindWithTag("Arm"); if (armObject != null) { raycastShooting = armObject.GetComponent <RaycastShooting>(); } else { Debug.Log("Cannot find 'ArmObject' script"); } GameObject gameControllerObject = GameObject.FindWithTag("GameController"); if (gameControllerObject != null) { scoreManager = gameControllerObject.GetComponent <ScoreManager>(); uiManager = gameControllerObject.GetComponent <UIManager>(); } else { Debug.Log("Cannot find 'GameController' script"); } GameObject playerControllerObject = GameObject.FindWithTag("Player"); if (playerControllerObject != null) { livesManager = playerControllerObject.GetComponent <LivesManager>(); } }
// Use this for initialization void Start() { raycastShooting = this.gameObject.GetComponent <RaycastShooting>(); pause = this.gameObject.GetComponent <Pause>(); Vector3 rot = transform.localRotation.eulerAngles; rotY = rot.y; rotX = rot.x; Cursor.visible = false; Cursor.lockState = CursorLockMode.Locked; GetComponent <Animator>().Play("Open Eyes"); }
void Start() { GameObject armObject = GameObject.FindWithTag("Arm"); if (armObject != null) { raycastShooting = armObject.GetComponent<RaycastShooting>(); } else { Debug.Log("Cannot find 'ArmObject' script"); } GameObject gameControllerObject = GameObject.FindWithTag("GameController"); if (gameControllerObject != null) { scoreManager = gameControllerObject.GetComponent<ScoreManager>(); uiManager = gameControllerObject.GetComponent<UIManager>(); } else { Debug.Log("Cannot find 'GameController' script"); } GameObject playerControllerObject = GameObject.FindWithTag("Player"); if(playerControllerObject != null) { livesManager = playerControllerObject.GetComponent<LivesManager>(); } }
public void Start() { playerController = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerController>(); raycastShooting = GameObject.FindGameObjectWithTag("Player").GetComponent <RaycastShooting>(); }
// Use this for initialization void Start() { raycastShooting = GameObject.FindGameObjectWithTag("Player").GetComponent <RaycastShooting>(); }