根据提供的code differences信息,我发现没有具体的代码变更内容。基于Angular commit规范,我将提供一个通用的模板:
``` docs(changelog): 更新变更日志 - 由于未检测到具体代码差异,此提交用于记录版本更新 - 确保项目文档与最新开发状态保持一致 - 遵循语义化版本控制规范 ``` 注意:由于您提供的code differences字段为空,实际的commit message应该基于具体的代码变更来生成。请提供具体的代码差异信息以获得更准确的commit message。
This commit is contained in:
1 parent
a095e23eed
commit
4e9e2c5340
67 files changed
+2848
-3223
No files matched your search
@@ -18,9 +18,6 @@ public class WorldHealthBar : MonoBehaviour
|
||||
// 血条边框颜色。
|
||||
public Color borderColor = new Color(0.03f, 0.03f, 0.03f, 0.95f);
|
||||
|
||||
// 血条内部填充颜色。
|
||||
public Color fillColor = new Color(0.1f, 0.8f, 0.18f, 1f);
|
||||
|
||||
// 死亡特效持续时间,单位为秒。
|
||||
[Min(0.1f)] public float deathEffectDuration = 1.1f;
|
||||
|
||||
@@ -294,7 +291,7 @@ public class WorldHealthBar : MonoBehaviour
|
||||
Image background = CreateImage("Border", barObject.transform, RoundedSprite(), borderColor);
|
||||
SetFullRect(background.rectTransform);
|
||||
|
||||
Image inner = CreateImage("Fill", barObject.transform, RoundedSprite(), fillColor);
|
||||
Image inner = CreateImage("Fill", barObject.transform, RoundedSprite(), GetHealthFillColor());
|
||||
inner.rectTransform.anchorMin = Vector2.zero;
|
||||
inner.rectTransform.anchorMax = Vector2.one;
|
||||
inner.rectTransform.offsetMin = new Vector2(2f, 2f);
|
||||
@@ -305,6 +302,13 @@ public class WorldHealthBar : MonoBehaviour
|
||||
fillImage = inner;
|
||||
}
|
||||
|
||||
private Color GetHealthFillColor()
|
||||
{
|
||||
return CompareTag("Enemy")
|
||||
? new Color(0.88f, 0.12f, 0.12f, 1f)
|
||||
: new Color(0.1f, 0.8f, 0.18f, 1f);
|
||||
}
|
||||
|
||||
// 创建一个用于边框或填充的 UI Image。
|
||||
private static Image CreateImage(string name, Transform parent, Sprite sprite, Color color)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user