Пример #1
0
 void CalculateHeight()
 {
     if (GameData.ScreenWidth >= 10)
     {
         height = (Mathf.Round((this.transform.position.y - initalHeight) * 10) / 10);
         moveTextScript.UpdateText(height + "Ft");
     }
     else
     {
         height = (Mathf.Round((this.transform.position.y / GameData.ScreenWidth * 10 - initalHeight / GameData.ScreenWidth * 10) * 10)) / 10;
         moveTextScript.UpdateText(height + "Ft");
     }
     moveTextScript.UpdateText(height + "Ft");
     text.text = height + "Ft";
     GameData.currentHeight = height;
 }
Пример #2
0
 // Update is called once per frame
 void Update()
 {
     GoalMatch();
     moveTextScript.UpdateText(height + "Ft");
 }