JieTiInstiate

using UnityEngine;
using System.Collections;

public class Stand : MonoBehaviour {

public GameObject cube;
float angel = 30;
// Use this for initialization
void Start () {
for (int i = 1; i < 10; i++)
{
cube = Instantiate(Resources.Load("Cube")) as GameObject;
float hudu = (angel / 180) * Mathf.PI;
float yy = i * Mathf.Tan(hudu);
cube.transform.position = new Vector3(13 + i, 0 + i, 0);


}

}

// Update is called once per frame
void Update () {

}
}

posted @ 2016-08-31 11:47  Fei非非  阅读(259)  评论(0编辑  收藏  举报