mirror of
http://47.107.252.169:3000/Roguelite-Game-Developing-Team/Gen_Hack-and-Slash-Roguelite.git
synced 2025-11-20 06:57:12 +08:00
(client) feat:健康给予,路径优化,结算界面,商店界面 (#60)
Co-authored-by: m0_75251201 <m0_75251201@noreply.gitcode.com> Reviewed-on: http://47.107.252.169:3000/Roguelite-Game-Developing-Team/Gen_Hack-and-Slash-Roguelite/pulls/60
This commit is contained in:
@@ -1,49 +1,43 @@
|
||||
using System;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UI
|
||||
{
|
||||
public class WaitStartUI:MonoBehaviour
|
||||
public class WaitStartUI : MonoBehaviour
|
||||
{
|
||||
public TMP_Text text;
|
||||
public string baseText;
|
||||
|
||||
|
||||
public int dotCount = 3;
|
||||
public int dotCounter = 0;
|
||||
public int dotCounter;
|
||||
|
||||
public float updateTime = 1;
|
||||
private float timer = 0;
|
||||
private float timer;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
gameObject.SetActive(true);
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
if(string.IsNullOrEmpty(baseText))
|
||||
{
|
||||
if (string.IsNullOrEmpty(baseText))
|
||||
baseText = text.text;
|
||||
}
|
||||
else
|
||||
{
|
||||
text.text = baseText;
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
timer+=Time.deltaTime;
|
||||
if (this.timer >= updateTime)
|
||||
timer += Time.deltaTime;
|
||||
if (timer >= updateTime)
|
||||
{
|
||||
timer-=updateTime;
|
||||
timer -= updateTime;
|
||||
var dots = "";
|
||||
for (var i = 0; i < dotCounter; i++)
|
||||
{
|
||||
dots += ".";
|
||||
}
|
||||
for (var i = 0; i < dotCounter; i++) dots += ".";
|
||||
text.text = baseText + dots;
|
||||
dotCounter += 1;
|
||||
if (dotCounter > dotCount)
|
||||
{
|
||||
dotCounter = 0;
|
||||
}
|
||||
if (dotCounter > dotCount) dotCounter = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user