Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Copyright 2019 John Wheeler<tmoneygames2019@gmail.com>
- Trying to do different things with unity
- */
- for(float x = gridBoundsMin.x; x < gridBoundsMax.x; x += 40f)
- {
- for (float y = gridBoundsMin.z; y < gridBoundsMax.z; y += 40f)
- {
- int hash = (x * y).GetHashCode();
- Random.InitState(hash);
- var debugColor = new Color(Random.value, Random.value, Random.value, 1f);
- Debug.DrawLine(new Vector3(x, 0f, y), new Vector3(x + 40f, 0f, y), debugColor, 60f);
- Debug.DrawLine(new Vector3(x, 0f, y), new Vector3(x , 0f, y + 40f), debugColor, 60f);
- Debug.DrawLine(new Vector3(x + 40f, 0f, y), new Vector3(x + 40f, 0f, y + 40f), debugColor, 60f);
- Debug.DrawLine(new Vector3(x, 0f, y + 40f), new Vector3(x + 40f, 0f, y + 40f), debugColor, 60f);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement