Created
March 31, 2014 08:53
-
-
Save jake1256/9888153 to your computer and use it in GitHub Desktop.
【Unity】MMDモデルを使ってボールを蹴って物体を壊すゲームを作ろう!その5【基礎】 ref: http://qiita.com/kuuki_yomenaio/items/95f54a7404d71c80cbaf
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 CreateStage : MonoBehaviour { | |
public GameObject gameObject; | |
// Use this for initialization | |
void Start () { | |
int countW = 5; | |
int countH = 5; | |
int countZ = 5; | |
float x = -3; | |
float y = 0; | |
float z = 5; | |
Vector3 pos; | |
for(int i = 0 ; i < countW ; i++){ | |
for(int j = 0 ; j < countH ; j++){ | |
for(int k = 0 ; k < countZ ; k++){ | |
pos = new Vector3(x, y, z); | |
Instantiate(gameObject , pos , transform.rotation); | |
z += 1; | |
} | |
y += 1; | |
z = 5; | |
} | |
x += 1; | |
y = 0; | |
} | |
} | |
// Update is called once per frame | |
void Update () { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment