mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/MI-38.git
synced 2026-01-24 09:55:38 +03:00
04.07.2022
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user