示例#1
0
    public void ShowHPSub(DamageData damadata)
    {
        if (ShowHPSubPrefab == null)
        {
            Debug.Log("Ko có PrefabShowHPSub");
            return;
        }
        if (!(damadata.To is Enemy))
        {
            Debug.Log("Dữ liệu sát thương ko tìm thấy mục tiêu");
            return;
        }
        Enemy         enemy = damadata.To as Enemy;
        List <string> list  = damadata.GetStringShow();

        foreach (string s in list)
        {
            ShowText show = Instantiate(ShowHPSubPrefab, enemy.PR_HPsub.transform.position, Quaternion.identity);
            show.SetText(s);
        }
    }