mirror of
http://47.107.252.169:3000/Roguelite-Game-Developing-Team/Gen_Hack-and-Slash-Roguelite.git
synced 2025-11-20 10:27:13 +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,10 +1,28 @@
|
||||
using UI;
|
||||
using Entity;
|
||||
using Managers;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Prefab
|
||||
{
|
||||
public class BuffIconUI: MonoBehaviour
|
||||
public class BuffIconUI : MonoBehaviour
|
||||
{
|
||||
public UIImageAnimator icon;
|
||||
|
||||
public void Init(Hediff hediff)
|
||||
{
|
||||
var stage = hediff.CurrentStage;
|
||||
if (stage is { textures: { Length: > 0 } })
|
||||
{
|
||||
if (stage.textures == null) return;
|
||||
var sprites = PackagesImageManager.Instance.GetSprites(stage.textures);
|
||||
icon.SetSprites(sprites);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (hediff.def.textures == null) return;
|
||||
var sprites = PackagesImageManager.Instance.GetSprites(hediff.def.textures);
|
||||
icon.SetSprites(sprites);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user