纳金网
标题:
不间断绘制立方体代码
[打印本页]
作者:
烟雨
时间:
2015-5-29 02:51
标题:
不间断绘制立方体代码
using UnityEngine;
using System.Collections;
public class sssss : MonoBehaviour {
float t1 = 0;
int count = 0;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
void FixedUpdate()
{
Ss();
}
void Ss()
{
t1 += 0.16f;
if (t1 > 1f)
{
print("s");
transform.Rotate(90, 0, 0);
t1 = 0f;
count++;
}
if (count == 5)
{
transform.Rotate(-90, 0, 0);
transform.Rotate(0, -90, 0);
count = 0;
} transform.Translate(0, 0, 1);
}
}
复制代码
欢迎光临 纳金网 (http://go.narkii.com/club/)
Powered by Discuz! X2.5