23 lines
539 B
C#
23 lines
539 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using UnityEngine;
|
|
|
|
public class IndicatorRoller : MonoBehaviour
|
|
{
|
|
[Range(0, 120f)]
|
|
public float speed;
|
|
public Transform indicator;
|
|
|
|
private void Update()
|
|
{
|
|
indicator = GetComponent<Transform>();
|
|
|
|
var value = Time.deltaTime * speed;
|
|
var rot = indicator.rotation.eulerAngles;
|
|
rot.y += value;
|
|
indicator.rotation = Quaternion.Euler(rot);
|
|
}
|
|
}
|
|
|