Skip to content

Instantly share code, notes, and snippets.

@arket
Last active August 29, 2015 13:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arket/8698950 to your computer and use it in GitHub Desktop.
Save arket/8698950 to your computer and use it in GitHub Desktop.
n×nサイズのブロック敷き詰め
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