码迷,mamicode.com
首页 > 其他好文 > 详细

JieTiInstiate

时间:2016-08-31 13:41:26      阅读:179      评论:0      收藏:0      [点我收藏+]

标签:

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 () {

}
}

JieTiInstiate

标签:

原文地址:http://www.cnblogs.com/ZeroMurder/p/5825317.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!