队伍角色添加、快速更换新位置完善
This commit is contained in:
@@ -6,15 +6,38 @@ using UnityEngine.UI;
|
||||
public class CharacterCardView : MonoBehaviour
|
||||
{
|
||||
public int characterID;
|
||||
public string currentBoundaryLevel;
|
||||
public GameObject charactCard;
|
||||
public Image characterImage;
|
||||
public Image levelIcon;
|
||||
public Image occupationIcon;
|
||||
public bool isSelected=false;
|
||||
|
||||
void Start()
|
||||
{
|
||||
charactCard=gameObject;
|
||||
}
|
||||
/// <summary>
|
||||
/// 未在队中的卡点击后进入被操纵状态。若在队伍中默认进入已经入队状态
|
||||
/// </summary>
|
||||
public void beSelected()
|
||||
{
|
||||
if (!isSelected)
|
||||
{
|
||||
isSelected = true;
|
||||
TeamManager.Instance.currentSelectedCharacterCard = new CharacterView(characterID, currentBoundaryLevel);
|
||||
characterImage.color = new Color(0.5f, 0.5f, 0.5f,1);
|
||||
}
|
||||
else beUnSelected();
|
||||
}
|
||||
|
||||
public void beUnSelected()
|
||||
{
|
||||
//还需要走TeamManager去掉此角色的队列信息
|
||||
isSelected = false;
|
||||
TeamManager.Instance.removeTeamCharacter(characterID);
|
||||
characterImage.color = new Color(1f, 1f, 1f,1);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user