Created
May 14, 2013 00:30
-
-
Save shinriyo/5572691 to your computer and use it in GitHub Desktop.
keijiroさんのサンプルのRing部分のC#化
transformは最適化した
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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