// Use this for initialization void Start() { refScript = Camera.main.GetComponent <cameraMove> (); obsArray = new GameObject[5]; obsArray = Resources.LoadAll <GameObject> ("Prefabs") as GameObject[]; obsLength = obsArray.Length; }
// Use this for initialization void Start() { refScript = Camera.main.GetComponent<cameraMove> (); obsArray= new GameObject[5]; obsArray = Resources.LoadAll<GameObject> ("Prefabs") as GameObject[]; obsLength = obsArray.Length; }
// Use this for initialization void Start() { isCutScene = false; txt = GetComponentInChildren <Text>(); cam = GetComponent <cameraMove>(); info = GetComponent <dontDestroyInfo>(); }
// Use this for initialization void Start() { // skipCut = false; DontDestroyOnLoad(gameObject); camMove = GetComponent <cameraMove>(); fade = GetComponent <fadeIn>(); cutScene = GetComponent <cutSceneManager>(); }
public void closeuiInfo() { GameObject infoGroup = GameObject.Find("Info"); cameraMove camera = GameObject.Find("Main Camera").GetComponent <cameraMove>(); camera.CallquarterView(); infoGroup.SetActive(false); }
// Use this for initialization void Start() { maincameraScript = ((cameraMove)Camera.main.gameObject.GetComponent<cameraMove>()); warningText = (GameObject)Instantiate(Resources.Load("mark"), new Vector3(this.transform.position.x-0.3f, transform.position.y-14.49f, this.transform.position.z+0.5f),Quaternion.identity * Quaternion.AngleAxis(90, new Vector3(1,0,0))); playerMove = SceneData.GetInstance().goPlayer.GetComponent<PlayerMove>(); }
// Use this for initialization void Start() { cam = Camera.main; cM = cam.GetComponent <cameraMove>(); muzzle = cam.transform.position; bullet4 = new Vector4(muzzle.x, muzzle.y, muzzle.z, 0.0f); v = new Vector3(0.0f, 0.0f, 1.0f); bmag = 0.5f; }
// Start is called before the first frame update void Start() { cam = Camera.main; cM = cam.GetComponent <cameraMove>(); xCam4 = cM.playrposworldframe4; x4 = cM.Lplayerinverse * new Vector4(transform.position.x, transform.position.y, transform.position.z, -(cam.transform.position - transform.position).magnitude); xx4 = x4; //make a list of position vector j = 0; }
// Use this for initialization void Start() { Bola = GameObject.Find("Bola").GetComponent <bola>(); obstacles = GameObject.Find("ObstacleController").GetComponent <obstacleController>(); cameraMain = GameObject.Find("MainCamera").GetComponent <cameraMove>(); back = GameObject.Find("BackgroundController").GetComponent <background>(); deadCanvas.SetActive(false); pressSpaceT.SetActive(true); final = false; running = false; }
#pragma warning restore 414 void Awake( ) { #if !(UNITY_FLASH) useGUILayout = false; #endif ExposedVariables.Awake( ); ExposedVariables.SetParent(this.gameObject); if ("1.PLE" != uScript_MasterComponent.Version) { uScriptDebug.Log("The generated code is not compatible with your current uScript Runtime " + uScript_MasterComponent.Version, uScriptDebug.Type.Error); ExposedVariables = null; UnityEngine.Debug.Break(); } }
// Use this for initialization void Start() { maincamera = ((cameraMove)Camera.main.gameObject.GetComponent("cameraMove")); maincamera.isRunning = false; SceneData sc = SceneData.GetInstance(); this.gameObject.GetComponent<GUIText>().text += "\n" + sc.roundScore; tryAgainPos = new Rect(Screen.width/2-(1024/2/2f),Screen.height/2+200, 1024/2,128/1.3f); progressPos = new Rect(Screen.width/2-(1024/2/2f),tryAgainPos.y-100, 1024/2,128/1.3f); homeUiPos = new Rect(Screen.width-80,0,80,80); //Data Storage if(PlayerPrefs.GetInt("totalExp") == 0){ PlayerPrefs.SetInt("totalExp", sc.roundScore); }else{ int oldExp = PlayerPrefs.GetInt("totalExp"); newExp = sc.roundScore; calcExp = oldExp + newExp; level = (int)(0.01f * Mathf.Sqrt(calcExp)); while((int)(0.01f * Mathf.Sqrt(calcExp + missingExp)) <= level) { missingExp++; } while((int)(0.01f * Mathf.Sqrt(calcExp - gainedExp)) >= level) { gainedExp++; } while((int)(0.01f * Mathf.Sqrt(oldExp - gainedOldExp)) >= level) { gainedOldExp++; } totalLevelExp = (gainedExp + missingExp); //old Exp progressMultiplieroldExp = ((float)gainedOldExp)/((float)totalLevelExp); progressMultiplier = ((float)gainedExp)/((float)totalLevelExp); this.gameObject.GetComponent<GUIText>().text += "\nYour EXP: " + calcExp + "\nLevel: " + level; PlayerPrefs.SetInt("totalExp", calcExp); } }
void Start() { cam = Cam.GetComponent <cameraMove>(); if (direction == "right") { dir = Vector3.right; } else if (direction == "left") { dir = Vector3.left; } else if (direction == "up") { dir = Vector3.up; } else if (direction == "down") { dir = Vector3.down; } }
// Use this for initialization void Start() { maincameraScript = ((cameraMove)Camera.main.gameObject.GetComponent<cameraMove>()); playerMove = SceneData.GetInstance().goPlayer.GetComponent<PlayerMove>(); int number = Random.Range(1,4); if(number == 1) { powerupType = new BonusPoints(); } else if(number == 2) { powerupType = new PowerupInvincible(); } else if(number == 3) { powerupType = new PowerupSprint(); } }
public void collectData() { if (Input.GetMouseButtonDown(0)) { Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); RaycastHit hit; Physics.Raycast(ray, out hit, 100); if (data == StagePurpose[stage]) { data = 0; limitTime = 60; stage++; showProjectName(); } else if (hit.transform.tag == "Coworker") { data += 1; hit.rigidbody.velocity = new Vector3(UnityEngine.Random.Range(-4, 4), 3, UnityEngine.Random.Range(-4, 4)); EmployeeControl victim = hit.transform.GetComponent <EmployeeControl>(); victim.playWhipSound(); Debug.Log("click coworker"); } else if (hit.transform.tag == "Player") { cameraMove camera = GameObject.Find("Main Camera").GetComponent <cameraMove>(); camera.CallfocusPlayer(); PlayerControl player = GameObject.Find("Player").GetComponent <PlayerControl>(); player.showuiInfo(); } else { Debug.Log("click nothing"); } } }
// Use this for initialization void Start() { refScript = Camera.main.GetComponent<cameraMove> (); }
void Awake() { cam = Camera.main; scriptRef = cam.GetComponent <cameraMove> (); }
private void Awake() { barraDeVida_ref = GameObject.Find("Game").GetComponent <BarraDeVida>(); cameraMove_ref = GameObject.Find("MainCamera").GetComponent <cameraMove>(); }
// Use this for initialization void Start() { cameramove = GameObject.FindObjectOfType <cameraMove> (); statemanager = GameObject.FindObjectOfType <StateManager> (); }
// Use this for initialization void Start() { refScript = Camera.main.GetComponent <cameraMove> (); }
void Start() { cam = Cam.GetComponent <cameraMove>(); }
void Start() { maincameraScript = ((cameraMove)Camera.main.gameObject.GetComponent<cameraMove>()); }
void Awake() { cam = Camera.main; scriptRef = cam.GetComponent<cameraMove> (); }