04.07.2022

This commit is contained in:
Plotnikov
2022-07-04 13:15:35 +03:00
parent 5fad2bcf6b
commit 696daa0b2e
7224 changed files with 3814576 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using TMPro;
//TextBarPressure
public class BarPressure : MonoBehaviour
{
[HideInInspector]
public string textValue_="";
private (string, string) defaultValue_ = ("766 мм рт.ст", "1013 гѕ");
private TextMeshPro text_;
//private Text text_;
void Start()
{
text_ = this.GetComponent<TextMeshPro>();
var txt= (textValue_ == "") ? defaultValue_.Item1 : textValue_;
text_.SetText(txt);
/*text_ = this.gameObject.GetComponent<Text>();
text_.text = (textValue_ == "") ? defaultValue_.Item1 : textValue_;*/
}
private void OnMouseDown()//нажатие на счетчик
{
if(textValue_ == "")
{
var txt = (text_.text == defaultValue_.Item2) ? defaultValue_.Item1 : defaultValue_.Item2;
text_.SetText(txt);
}
else
{
text_.SetText(textValue_);
}
/*if(textValue_ == "")
{
text_.text = (text_.text == defaultValue_.Item2) ? defaultValue_.Item1 : defaultValue_.Item2;
}
else
{
text_.text = textValue_;
}*/
}
}