Last active
August 29, 2015 13:55
-
-
Save arket/8698950 to your computer and use it in GitHub Desktop.
n×nサイズのブロック敷き詰め
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
using UnityEngine; | |
using System.Collections; | |
public class SetStageCubes : MonoBehaviour { | |
public GameObject[] stage_cubes; | |
public int max_mapsize; | |
private float map_Row; | |
private float map_Col; | |
void Start () { | |
map_Row = 0.0f; | |
map_Col = 0.0f; | |
for(map_Row = 0; map_Row < max_mapsize; map_Row++){ | |
for(map_Col = 0; map_Col < max_mapsize; map_Col++){ | |
var create_point = new Vector3(map_Row,0.0f,map_Col); | |
Instantiate(stage_cubes[0],create_point,Quaternion.identity); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment