// Use this for initialization void Start() { if (cam == null){ cam = Camera.main.gameObject.GetComponent<CameraController>(); } constr = cam.gameObject.GetComponent<ConstructionMain>(); if (constr != null){ const_mode = true; } /* if (balloons.Length == null){ GameObject ball_obj = GameObject.Find("Balloon"); if(ball_obj != null){ balloon = ball_obj.GetComponent<Balloon>(); } } */ }
// Use this for initialization void Start() { main = Camera.main.GetComponent<ConstructionMain>(); item_list = new GameObject[6,8]; cat_sizes = new int[6]; for (int i = 0; i < data.categories.Length; i++) { int cat = data.categories[i]; item_list[cat, cat_sizes [cat]] = data.const_items[i]; cat_sizes [cat] ++; //increase the sizeof appropriate category Debug.Log("Nesting item "+ data.item_names[i]+" in category "+cat); } }