public void SpawnHoles()
{
int y;
int x;
for (int i = 0; i < 10; i++)
{
y = Random.Range(-90, -30);
x = Random.Range(10, 152);
PhotonNetwork.InstantiateSceneObject("Holes", new Vector3((float)x, (float)y, 10f), Quaternion.identity, 0, null);
if (x < 153)
{
GameObject lava = GameObject.Find("GenLava(Clone)");
lava.GetComponent <PhotonView>().RPC("SetInitialBlock", PhotonTargets.All, x, y - (int)lava.GetComponent <Lava>().offset_y);
}
}
for (int i = 0; i < 10; i++)
{
y = Random.Range(5, 90);
x = Random.Range(154, 300);
PhotonNetwork.InstantiateSceneObject("Holes", new Vector3((float)x, (float)y, 10f), Quaternion.identity, 0, null);
if (x > 153)
{
GameObject water = GameObject.Find("GenWater(Clone)");
//Debug.Log (x + "/" + (y - (int)lavaScript.offset_y));
water.GetComponent <PhotonView>().RPC("SetInitialBlock", PhotonTargets.All, x - (int)water.GetComponent <Lava>().offset_x, y);
}
}
}