SelfRotate.cs 362 B

12345678910111213141516171819
  1. using UnityEngine;
  2. using System.Collections;
  3. public class SelfRotate : MonoBehaviour {
  4. public float x;
  5. public float y;
  6. public float z;
  7. // Use this for initialization
  8. void Start () {
  9. }
  10. // Update is called once per frame
  11. void Update () {
  12. this.gameObject.transform.Rotate (new Vector3(x*Time.deltaTime,y*Time.deltaTime,z*Time.deltaTime));
  13. }
  14. }