Skip to content

Instantly share code, notes, and snippets.

@shinriyo
Created May 14, 2013
Embed
What would you like to do?
keijiroさんのサンプルのRing部分のC#化 transformは最適化した
using UnityEngine;
using System.Collections;
public class Ring : MonoBehaviour
{
private Transform _myTransform ;
void Awake ()
{
_myTransform = transform;
}
// Use this for initialization
void Start ()
{
_myTransform.rotation = Random.rotation;
}
// Update is called once per frame
void Update ()
{
_myTransform.localRotation *= Quaternion.AngleAxis (Time.deltaTime * 180.0f, Vector3.right);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment