mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/MI-38.git
synced 2026-01-24 02:45:39 +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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bf0f870d3d9c0584e974de7e474657bd
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user