void Awake() { parent.position = new Vector3(parent.position.x, 22.0f, parent.position.z); mainCamera = GameObject.Find("Main Camera"); oculusCamera = GameObject.Find("OVRCameraController"); psScript = GameObject.Find("PlayerSettings").GetComponent<PlayerSettingsScript>(); }
// Use this for initialization void Start() { sFX = 0.0f; persisVol = GameObject.Find ("PlayerSettings"); playerSettings = persisVol.GetComponent("PlayerSettingsScript") as PlayerSettingsScript; DontDestroyOnLoad (transform.gameObject); Debug.Log (playerSettings.effectsVolume); }
// Use this for initialization void Start() { character = GetComponent <CharacterBuildScript>(); movement = GetComponent<CharacterMoveScript>(); GameObject game = GameObject.FindGameObjectWithTag("GameController"); cameraController = game.GetComponent<CameraControllerScript>(); settings = game.GetComponent<PlayerSettingsScript>(); ability1IsHeld = false; ability2IsHeld = false; }
public void Start() { Instance = this; mScript = GameObject.Find("Main Camera").GetComponent<MenuController>(); psScript = GameObject.Find("PlayerSettings").GetComponent<PlayerSettingsScript>(); screenWidth = Screen.width; screenHeight = Screen.height; groupWidth = 420f; groupHeight = 330f; setWidth = (screenWidth - groupWidth); setHeight = (screenHeight - groupHeight); }
// Use this for initialization void Awake() { Instance = this; mainCamera = GameObject.Find("Main Camera"); ovrCamera = GameObject.Find("OVRCameraController"); psScript = GameObject.Find("PlayerSettings").GetComponent<PlayerSettingsScript>(); volNum = psScript.masterVolume; sfxNum = psScript.effectsVolume; UpdateSliders(); Screen.showCursor = false; lastX = Input.mousePosition.x; lastY = Input.mousePosition.y; }
void Awake() { if( instance != null && instance != this ) { Destroy( this.gameObject ); return; } else { instance = this; } DontDestroyOnLoad( this.gameObject ); }
void Awake() { Instance = this; psScript = GameObject.Find("PlayerSettings").GetComponent<PlayerSettingsScript>(); turret = GameObject.FindGameObjectWithTag("Turret"); ovrCamera = GameObject.Find("OVRCameraController"); if(psScript.oculusOn) { ovrCamera.SetActive(true); turret.SetActive(false); } else { turret.SetActive(true); ovrCamera.SetActive(false); } }
// Use this for initialization void Awake() { //Debug.Log(PlayerSettings); if (PlayerSettings == null) { DontDestroyOnLoad(gameObject); PlayerSettings = this; //pull from internal using persistence LoadSettings(); LoadSettings(); } else if (PlayerSettings != this) { //Debug.Log(SelChoice); Destroy(gameObject); } }
// Use this for initialization void Awake() { GameObject game = GameObject.FindGameObjectWithTag("GameController"); camController = game.GetComponent<CameraControllerScript>(); settings = game.GetComponent<PlayerSettingsScript>(); }
// Use this for initialization void Awake() { mainCamera = GameObject.Find("Main Camera"); oculusCamera = GameObject.Find("OVRCameraComtroller"); psScript = GameObject.Find("PlayerSettings").GetComponent<PlayerSettingsScript>(); }
// Use this for initialization void Awake() { playerSettingObjects = GameObject.Find("PlayerSettings"); psScript = playerSettingObjects.GetComponent<PlayerSettingsScript>(); }
void Start() { settings = GetComponent<PlayerSettingsScript>(); }
void Start() { _HUDScript = GameObject.Find( "HUD" ).GetComponent< HUDScript >(); // Get the player script to check the health of player _PlayerSettingsScript = GameObject.Find( "PlayerSettings" ).GetComponent< PlayerSettingsScript >(); spawnEnemies = true; xMin = 25; xMax = Screen.width; GetEnemiesToSpawn(); StartCoroutine( "SpawnEnemies" ); }
void Awake() { parentObject = transform.parent.gameObject; modelMaterial = parentObject.transform.Find("CharacterModel").renderer.material; GameObject game = GameObject.FindGameObjectWithTag("GameController"); camController = game.GetComponent<CameraControllerScript>(); settings = game.GetComponent<PlayerSettingsScript>(); currLookDist = goalLookDist = 10f; //calculate the lower and upper limits based on the currect proportion in characterCamLocProportion lookBoundsUpper = Mathf.Abs( Mathf.Atan(GameSettings.characterCamLocProportion.z / GameSettings.characterCamLocProportion.y) ) * Mathf.Rad2Deg; lookBoundsLower = lookBoundsUpper - 180; //apply an offset, so the camera won't look over the top, or under the bottom lookBoundsUpper -= GameSettings.characterCamVerticalOffset; lookBoundsLower += GameSettings.characterCamVerticalOffset; }