gameplay所有基本功能都装了,加入了全局警告。加入飘字等各种东西。

This commit is contained in:
FloatGaming
2026-02-21 00:20:03 +08:00
parent 9f7c1c57b7
commit 14fb281d6f
254 changed files with 102927 additions and 9427 deletions
@@ -0,0 +1,30 @@
using UnityEngine;
public class load_skillwarn : MonoBehaviour
{
public static load_skillwarn Instance;
public GameObject skill_warn_prefab;
public GameObject skillwarn_obj;
private void Awake()
{
Instance = this;
}
public void ShowWarning(string targetName, string attributeName)
{
if (skill_warn_prefab == null || skillwarn_obj == null) return;
var go = Instantiate(skill_warn_prefab, skillwarn_obj.transform, false);
var comp = go.GetComponent<skillWarn_prefab>();
if (comp != null)
{
if (comp.warn_btm_img != null && comp.warn_btm_red != null)
comp.warn_btm_img.sprite = comp.warn_btm_red;
if (comp.warn_txt != null)
comp.warn_txt.text = $"<b>{targetName}</b> 的 <b>{attributeName}</b> 已达到阈值";
}
}
}