Получение урона теперь чуть более заметно (плейсхолдер)
This commit is contained in:
1 parent
dd1399e015
commit
5d856ae162
38 files changed
+436053
-134
No files matched your search
@@ -0,0 +1,25 @@
|
||||
using DG.Tweening;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Code.UI.Panels
|
||||
{
|
||||
public class DamagePanel : UIElement
|
||||
{
|
||||
[SerializeField] private Image background;
|
||||
[SerializeField] private Color shownColor;
|
||||
[SerializeField] private Color hiddenColor;
|
||||
public override void Hide()
|
||||
{
|
||||
Shown = false;
|
||||
// background.enabled = false;
|
||||
background.DOColor(hiddenColor, 2f);
|
||||
}
|
||||
public override void Show()
|
||||
{
|
||||
Shown = true;
|
||||
// background.enabled = true;
|
||||
background.DOColor(shownColor, 0.3f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b586dbc292c44261892460f578a38e50
|
||||
timeCreated: 1764769541
|
||||
@@ -26,6 +26,9 @@ namespace Code.UI.Panels
|
||||
[Header("MoneyBar")]
|
||||
[SerializeField] private TMP_Text moneyText;
|
||||
|
||||
[SerializeField] private DamagePanel damagePanel;
|
||||
public DamagePanel DamagePanel => damagePanel;
|
||||
|
||||
private void ScoreUpdate(int count, int money)
|
||||
{
|
||||
// TODO Анимация получения\потери
|
||||
|
||||
Reference in new issue
Block a user