漏上传,补充

This commit is contained in:
YiHan0621
2025-09-08 16:27:21 +08:00
parent 3467536386
commit 29ba23403b
6 changed files with 90 additions and 53 deletions

View File

@@ -58,6 +58,17 @@ namespace TcgEngine
return Mathf.FloorToInt(xp / 1000) + 1;
}
public float GetLevelProgress()
{
int currentLeve = GetLevel();
int baseXp = (currentLeve - 1) * 1000;
Debug.LogError(xp);
// 距离下一级还需多少经验值
int xpIntoCurrentLevel = xp - baseXp;
return (float)xpIntoCurrentLevel / 1000f;
}
public string GetAvatar()
{
if (avatar != null)