// Use this for initialization void Start() { buttonTxt = buttonTxtObj.GetComponent<Text>(); worldObjCode = GameObject.FindGameObjectWithTag ("globalObj").GetComponent<StartEndStuff>(); if (worldObjCode.UseColorBlindMode ()) { buttonTxt.text = "Color Blind Mode: ON"; } else { buttonTxt.text = "Color Blind Mode: OFF"; } }
void Awake() { if (Instance == null) { DontDestroyOnLoad(gameObject); Instance = this; } else if (Instance != this) { Destroy (gameObject); } }
// Use this for initialization void Start() { globalObj = GameObject.FindGameObjectWithTag("globalObj"); globalObjCode = globalObj.GetComponent<StartEndStuff> (); score = globalObjCode.GetScore (); time = globalObjCode.GetTime (); if (time < 0) { time =0;}// I was getting weird negative outputs wonGame = globalObjCode.GetWon (); if (wonGame) { wonTxt.text = "You Won!"; } else { wonTxt.text = "You Lost!"; } scoreTxt.text = "Score: " + score; timeTxt.text = "Time Left: " + time; }
// Use this for initialization void Start() { oneSecAgo = Time.time - 1; startScreenCode = startScreen.GetComponent<StartEndStuff> (); nextCubeCode = nextCube.GetComponent<NextCubeCode> (); float ySpot = ySpotStart; for (int y = 0; y < yMax; y++) { float xSpot = xSpotStart; for(int x = 0; x < xMax; x++){// the x side Vector3 pos = new Vector3(xSpot,ySpot,0); GameObject thisCube = Instantiate(cube,pos,Quaternion.identity) as GameObject; grid[x,y] = thisCube.GetComponent<ClassInfo>(); int[] cords = new int[]{x,y}; grid[x,y].SetCords(cords); xSpot = xSpot + instCubesMoveBy; } ySpot = ySpot + instCubesMoveBy; } // set lists for each row //row1 = new List<Color>(grid[]); }
// Use this for initialization void Start() { worldObjCode = GameObject.FindGameObjectWithTag ("globalObj").GetComponent<StartEndStuff>(); text = GetComponent<TextMesh> (); text.text = " "; }