using UnityEngine;
using System.Collections;
public class Rotate : MonoBehaviour
{
public int volicity = 200;
private GameObject center;
public bool kaiguan=true;
void Start ()
{
center = GameObject.Find("Sphere");
InvokeRepeating("Repeating",0f,0.03f);
}
void Repeating()
{
if (kaiguan)
{
transform.Rotate(0f, 0f, volicity * Time.deltaTime);
}
else
{
transform.Rotate(0f, 0f, -volicity * Time.deltaTime);
}
}
}
using System.Collections;
public class Rotate : MonoBehaviour
{
public int volicity = 200;
private GameObject center;
public bool kaiguan=true;
void Start ()
{
center = GameObject.Find("Sphere");
InvokeRepeating("Repeating",0f,0.03f);
}
void Repeating()
{
if (kaiguan)
{
transform.Rotate(0f, 0f, volicity * Time.deltaTime);
}
else
{
transform.Rotate(0f, 0f, -volicity * Time.deltaTime);
}
}
}