private void Awake() { instance = this; if (!menu.newGame) { PlayerState.Load(); transform.position = new Vector3(PlayerState.x, PlayerState.y + 1, PlayerState.z); } }
//private List<T> neededList; // Start is called before the first frame update void Start() { // GameObject.Find("startDetector").GetComponent<mainScript>().setAnswer(typed); //theAnswers.allUserResponsesList; UnityEngine.Debug.Log("This shouldn't run yet"); neededFunctions = GameObject.Find("startDetector").GetComponent <mainScript>(); // neededList = GameObject.Find("startDetector").GetComponent<mainScript>().theAnswers.allUsersResponseList; for (int i = 0; i < neededFunctions.theAnswers.allUserResponsesList.Count; i++) // for (int i = 0; i < GameObject.Find("startDetector").GetComponent<mainScript>().theAnswers.allUserResponsesList.Count; i++) { int b = i + 1; string bill = "result" + b.ToString(); UnityEngine.Debug.Log(bill); //GameObject.Find(bill).GetComponent<Image>.sprite = GameObject.Find("startDetector").GetComponent<mainScript>().buttonOptions[neededList[i].getImage()]; GameObject.Find(bill).GetComponent <Image>().sprite = neededFunctions.buttonOptions[neededFunctions.theAnswers.allUserResponsesList[i].getImage()]; //GameObject.Find(bill).GetComponent<Image>.sprite = GameObject.Find("startDetector").GetComponent<mainScript>().buttonOptions[GameObject.Find("startDetector").GetComponent<mainScript>().theAnswers.allUsersResponseList[i].getImage()]; } }
//function to set the initial values of the gem object void setGem() { g = gem.GetComponent <mainScript>(); g.isKey = false; g.notSet = true; g.placed = false; g.pos = pedestals[activePed2].transform.position; g.pos.y = -1.8f; if (!lol) { g.pos.z = g.pos.z - 2.2f; } else { g.pos.z = g.pos.z + 2.2f; } g.scaleMul = 1; g.q = new mainScript.Quat(1, new Vector3(0, 0, 0)); emptyHand = cam.GetComponentInChildren <mainScript>(); }
// Use this for initialization void Start() { ms = Camera.main.GetComponent<mainScript>(); }
// Use this for initialization void Start() { a = MainCamera.GetComponent <mainScript>(); maxStrecke = 0; }
// Start is called before the first frame update void Start() { mS = GameObject.Find("truck").GetComponent <mainScript>(); eventPopup = GameObject.Find("Canvas/EventPopup"); eventPopup.SetActive(false); }