Last active
October 11, 2018 00:49
-
-
Save aidiary/76599268376397b661dc to your computer and use it in GitHub Desktop.
ブロックを積み上げて壁を作る
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma strict | |
// ブロック(インスペクタからセット) | |
var brickObject : GameObject; | |
function Start () { | |
// ブロックを配置して壁を作る | |
for (var y = 0; y < 10; y++) { | |
for (var x = -10; x < 10; x++) { | |
Instantiate(brickObject, | |
transform.position + Vector3(x, y, 0), | |
Quaternion.identity); | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment