31 lines
758 B
C#
31 lines
758 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class ImageRotate : MonoBehaviour
|
|
{
|
|
float rotation = 360;
|
|
// Use this for initialization
|
|
void Start()
|
|
{
|
|
//Debug.Log ("Material used: "+animMat.name);
|
|
}
|
|
|
|
void Update()
|
|
{
|
|
Debug.Log(Time.deltaTime);
|
|
transform.Rotate(Vector3.back);
|
|
//if (Time.frameCount % 1 == 0)
|
|
//{
|
|
// float i = new System.Random().NextDouble() < .5 ? -0.5f : 2f;
|
|
// transform.rotation = Quaternion.Euler(0, 0, rotation += (float)(i * new System.Random().NextDouble()));
|
|
// if (rotation < 0)
|
|
// {
|
|
// rotation = 360;
|
|
// }
|
|
//}
|
|
|
|
}
|
|
}
|