// Use this for initialization void Start() { //init player player = GameObject.FindGameObjectWithTag("Player"); //init controller controller = new gameController(groundsize, player, numberOfPuzzle, gg); controller.CreateEnvironment(); hands = new handController(controller, sphere1, sphere2, sphere3, sphere4, xtxt, ytxt, ztxt, wtxt); CreateBoard(); }
public handController(gameController game, GameObject sph1, GameObject sph2, GameObject sph3, GameObject sph4, UnityEngine.UI.Text xt, UnityEngine.UI.Text yt, UnityEngine.UI.Text zt, UnityEngine.UI.Text wt) { menu = GameObject.Find("menu"); leapspace = GameObject.Find("LeapSpace"); controller = new Leap.Controller(); camera = GameObject.Find("CenterEyeAnchor").GetComponent <Camera>(); gamer = game; debug1 = DrawLine(Vector3.zero, Vector3.zero, Color.white, 0.05f); debug2 = DrawLine(Vector3.zero, Vector3.zero, Color.white, 0.05f); sphereswitch = sph1; sphererand = sph2; sphereexpand = sph3; spheresmall = sph4; txt1 = xt; txt2 = yt; txt3 = zt; txt4 = wt; getctr = this; }
public gameController(int size, GameObject playerOb, int numberOfP, UnityEngine.UI.Text g) { bombcub = GameObject.Find("bombcub"); cubcub = GameObject.Find("cubecub"); bomb = GameObject.Find("Bomb"); explosion = GameObject.Find("explosion"); cub = GameObject.Find("Cubeee"); bombtxt = GameObject.Find("bombmoney").GetComponent <UnityEngine.UI.Text>(); cubtxt = GameObject.Find("cubemoney"); puzzles = new List <puzzle>(); groundsize = size; occupied = new int[size, size, size]; player = playerOb; numberOfPuzzle = numberOfP; timePerGenerate = timeperunit * groundsize; generatetime = timePerGenerate - 3; ctr = this; gg = g; gg.enabled = false; origin = player.transform.GetChild(0).gameObject; ggcub = GameObject.Find("ggcube"); ggcub.SetActive(false); }