12345678910111213141516171819202122232425262728293031 |
- using UnityEngine;
- using System.Collections;
- public class LifeManagerUI : MonoBehaviour
- {
- [SerializeField]
- private UILabel _lblTimeToNexLife;
- [SerializeField]
- private UILabel _lblLivesCount;
- [SerializeField]
- private UIButton _uiButton;
- private float _lastTick = 0;
- internal void Start()
- {
- LifeManager.Reset();
- }
- public void Update()
- {
- if (_lastTick < Time.time)
- {
- _lastTick = Time.time + 1;
- _lblLivesCount.text = LifeManager.Lifes.ToString();
- _lblTimeToNexLife.text = "";
- }
- }
- }
|