23 lines
694 B
C#
23 lines
694 B
C#
using Continentis.MainGame.Character;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace Continentis.MainGame.UI
|
|
{
|
|
public class CharacterAvatar : MonoBehaviour
|
|
{
|
|
public Image characterImage;
|
|
public Image frame;
|
|
|
|
public Sprite normalFrame;
|
|
public Sprite actionFrame;
|
|
|
|
public void Initialize(CharacterBase character)
|
|
{
|
|
characterImage.sprite = character.data.avatar;
|
|
normalFrame = MainGameManager.Instance.basePrefabs.fractionFrames[character.fraction][0];
|
|
actionFrame = MainGameManager.Instance.basePrefabs.fractionFrames[character.fraction][1];
|
|
frame.sprite = normalFrame;
|
|
}
|
|
}
|
|
} |