修改敌人

This commit is contained in:
wulongxiao 2024-12-30 12:40:25 +08:00
parent 8e97dea665
commit dae940c7c2
4 changed files with 23 additions and 6 deletions

View File

@ -330,7 +330,7 @@ MonoBehaviour:
id: 0
Name:
camp: 1
hp: 500
hp: 20
dieIndex: 1
Hpfiil: {fileID: 1566038940701374259}
HpfiilYello: {fileID: 605146830908541898}
@ -633,7 +633,7 @@ SpriteRenderer:
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: cebb0d54c57db444d8b1f48aab88bb48, type: 3}
m_Sprite: {fileID: 21300000, guid: 0b98f7c80a18aa544a59829d0d8e8cb5, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0

View File

@ -100,7 +100,7 @@ public class CharacterClick : MonoBehaviour
if (role.camp == Camp.Enemy)
{
//string eveText,string name,string def,string speed,string shanghai,string info,int hp,int maxHp
panelRect.GetComponent<charainfoPanel>().UpDateShow("1", "Enemy_002", "0", "3", "1", "测试文档一", role.hp, 100f);
panelRect.GetComponent<charainfoPanel>().UpDateShow("1", "Enemy_001", "0", "3", "1", "测试文档一", role.hp, role.maxHp);
}
else

View File

@ -92,10 +92,7 @@ public class SpawnPool : Base
void Start()
{
Base.GlobalObj.GetComponent<gameGlobal>().OnGamePlay += this.StartSpawning;
}
public void UpdateNodeList()
{

View File

@ -45,6 +45,15 @@ public class charainfoPanel : Base
}
/// <summary>
///
/// </summary>
/// <param name="LeveText">等级</param>
/// <param name="NameText">名字</param>
/// <param name="InfoText">信息</param>
/// <param name="AttackText">攻击力</param>
/// <param name="AttackFanweiText">攻击范围</param>
/// <param name="AttackCD">攻击cd</param>
public void UpDateShow(string LeveText, string NameText, string InfoText, string AttackText, string AttackFanweiText,string AttackCD)
{
this.LeveText.text= "Lv."+LeveText;
@ -55,6 +64,17 @@ public class charainfoPanel : Base
this.AttackCD.text= "<color=#00FF00>"+ AttackCD+"</color>";
}
/// <summary>
///
/// </summary>
/// <param name="eveText">等级</param>
/// <param name="name">名字</param>
/// <param name="def">防御力</param>
/// <param name="speed">速度</param>
/// <param name="shanghai">伤害</param>
/// <param name="info">信息</param>
/// <param name="hp">血量</param>
/// <param name="maxHp">最大血量</param>
public void UpDateShow(string eveText,string name,string def,string speed,string shanghai,string info,float hp,float maxHp)
{
textList[0].text = "lv." + eveText;