mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/MI-38.git
synced 2026-01-24 01:15:41 +03:00
27 lines
629 B
C#
27 lines
629 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using TMPro;
|
|
|
|
public class AngleToNumber : MonoBehaviour
|
|
{
|
|
public Handler handle;//крутилка
|
|
|
|
public TextMeshPro number;//счетчик
|
|
|
|
private void Start()
|
|
{
|
|
handle = this.gameObject.GetComponent<Handler>();
|
|
|
|
}
|
|
private void LateUpdate()
|
|
{
|
|
if (handle.drag)
|
|
{
|
|
var k = handle.gameObject.transform.localEulerAngles.z;
|
|
int count = 9-(int)(handle.gameObject.transform.localEulerAngles.z / 36);
|
|
number.text = count.ToString();
|
|
}
|
|
}
|
|
}
|