public GameObject JewelInstantiatebt(int x, int y) { GameObject tmp; tmp = (GameObject)Instantiate(JewelObject); JewelScript = tmp.GetComponent <JewelObj>(); tmp.transform.SetParent(JewelParent.transform, false); //JewelScript.render.enabled = true; JewelGrib[x, y] = ObjTmp; JewelGribScript[x, y] = JewelScript; int r = 0; if (PLayerInfo.MODE == 1) { r = Random.Range(0, 6); } else { r = Random.Range(0, 7); } JewelScript.SetSkin(r); JewelScript.jewel.JewelPosition = new Vector2(x, 9); JewelScript.jewel.JewelType = r; JewelScript.jewel.JewelPower = 0; return(tmp); }
public GameObject JewelInstantiate(int x, int y) { ObjTmp = (GameObject)Instantiate(JewelObject); JewelScript = ObjTmp.GetComponent <JewelObj>(); ObjTmp.transform.SetParent(JewelParent.transform, false); ObjTmp.transform.localPosition = new Vector3(ObjTmp.transform.localPosition.x + x * BaseDistance, ObjTmp.transform.localPosition.y + y * BaseDistance); JewelGrib[x, y] = ObjTmp; JewelGribScript[x, y] = JewelScript; int r = 0; if (PLayerInfo.MODE == 1) { r = Random.Range(0, 6); } else { r = Random.Range(0, 7); } JewelScript.SetSkin(r); JewelScript.jewel.JewelPosition = new Vector2(x, y); JewelScript.jewel.JewelType = r; return(ObjTmp); }
void JewelObjInitializer(ref GameObject jewelObj, int x, int y, int type, int power) { JewelScript = jewelObj.GetComponent <JewelObj>(); JewelGrib[x, y] = jewelObj; JewelGribScript[x, y] = JewelScript; JewelScript.jewel.JewelPosition = new Vector2(x, y); JewelScript.jewel.JewelType = type; JewelScript.jewel.JewelPower = power; JewelScript.SetSkin(type, power); //Have no idea why, had to improvise on the old code }
GameObject Test(int x, int y, int r) { ObjTmp = (GameObject)Instantiate(JewelObject); JewelScript = ObjTmp.GetComponent <JewelObj>(); ObjTmp.transform.SetParent(JewelParent.transform, false); ObjTmp.transform.localPosition = new Vector3(x, y); ObjTmp.transform.GetChild(0).gameObject.transform.localScale = new Vector3(0, 0, 1); JewelGrib[x, y] = ObjTmp; JewelGribScript[x, y] = JewelScript; JewelScript.SetSkin(r); JewelScript.jewel.JewelPosition = new Vector2(x, y); JewelScript.jewel.JewelType = r; return(ObjTmp); }
void JewelObjInitializer(ref GameObject jewelObj,int x, int y,int type,int power) { JewelScript = jewelObj.GetComponent<JewelObj>(); JewelGrib[x, y] = jewelObj; JewelGribScript[x, y] = JewelScript; JewelScript.jewel.JewelPosition = new Vector2(x, y); JewelScript.jewel.JewelType = type; JewelScript.jewel.JewelPower = power; JewelScript.SetSkin (type,power); //Have no idea why, had to improvise on the old code }
GameObject RJewelInstantiate(int x, int y) { ObjTmp = (GameObject)Instantiate(JewelObject); JewelScript = ObjTmp.GetComponent<JewelObj>(); ObjTmp.transform.SetParent(JewelParent.transform, false); ObjTmp.transform.localPosition = new Vector3(x, y); ObjTmp.transform.GetChild(0).gameObject.transform.localScale = new Vector3(0, 0, 1); JewelGrib[x, y] = ObjTmp; JewelGribScript[x, y] = JewelScript; int r = randomjewel(x, y); JewelScript.SetSkin (r); JewelScript.jewel.JewelPosition = new Vector2(x, y); JewelScript.jewel.JewelType = r; return ObjTmp; }
public GameObject JewelInstantiatebt(int x, int y) { GameObject tmp; tmp = (GameObject)Instantiate(JewelObject); JewelScript = tmp.GetComponent<JewelObj>(); tmp.transform.SetParent(JewelParent.transform, false); //JewelScript.render.enabled = true; JewelGrib[x, y] = ObjTmp; JewelGribScript[x, y] = JewelScript; int r = 0; if (PLayerInfo.MODE == 1) r = Random.Range(0, 6); else r = Random.Range(0, 7); JewelScript.SetSkin (r); JewelScript.jewel.JewelPosition = new Vector2(x, 9); JewelScript.jewel.JewelType = r; JewelScript.jewel.JewelPower = 0; return tmp; }
public GameObject JewelInstantiate(int x, int y) { ObjTmp = (GameObject)Instantiate(JewelObject); JewelScript = ObjTmp.GetComponent<JewelObj>(); ObjTmp.transform.SetParent(JewelParent.transform, false); ObjTmp.transform.localPosition = new Vector3(ObjTmp.transform.localPosition.x + x * BaseDistance, ObjTmp.transform.localPosition.y + y * BaseDistance); JewelGrib[x, y] = ObjTmp; JewelGribScript[x, y] = JewelScript; int r = 0; if (PLayerInfo.MODE == 1) r = Random.Range(0, 6); else r = Random.Range(0, 7); JewelScript.SetSkin (r); JewelScript.jewel.JewelPosition = new Vector2(x, y); JewelScript.jewel.JewelType = r; return ObjTmp; }