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 () {
}
}
时间: 2024-10-25 17:53:18