// Use Start for initialization protected void Awake() { me = this; color = getRandomColor(); squareSize /= 2; GameObject arenaParent = new GameObject("Arena"); LineCreate(-squareSize, squareSize, squareSize, squareSize, arenaParent, "top"); LineCreate(-squareSize, -squareSize, squareSize, -squareSize, arenaParent, "bottom"); LineCreate(-squareSize, squareSize, -squareSize, -squareSize, arenaParent, "left"); LineCreate(squareSize, squareSize, squareSize, -squareSize, arenaParent, "right"); topLeftBound = new Vector3(-squareSize, 0, squareSize); foreach (GameObject g in lines) { g.GetComponent<BoxCollider>().material = arenaBordersMaterial; g.tag = "arenaBorder"; } }
// Use Start for initialization protected void Awake() { me = this; color = getRandomColor(); squareSize /= 2; GameObject arenaParent = new GameObject("Arena"); LineCreate(-squareSize, squareSize, squareSize, squareSize, arenaParent, "top"); LineCreate(-squareSize, -squareSize, squareSize, -squareSize, arenaParent, "bottom"); LineCreate(-squareSize, squareSize, -squareSize, -squareSize, arenaParent, "left"); LineCreate(squareSize, squareSize, squareSize, -squareSize, arenaParent, "right"); topLeftBound = new Vector3(-squareSize, 0, squareSize); foreach (GameObject g in lines) { g.GetComponent <BoxCollider>().material = arenaBordersMaterial; g.tag = "arenaBorder"; } }