This commit is contained in:
SoulliesOfficial
2026-01-03 18:19:39 -05:00
parent 3bcd7c1cf8
commit 33b1795c1f
7387 changed files with 2762819 additions and 716926 deletions

View File

@@ -1,4 +1,5 @@
using System.Collections.Generic;
using Cielonos.MainGame.Inventory;
using DamageNumbersPro;
using Sirenix.OdinInspector;
using UnityEngine;
@@ -6,11 +7,35 @@ using UnityEngine;
namespace Cielonos.MainGame
{
[CreateAssetMenu(fileName = "BasePrefabsCollection", menuName = "Cielonos/MainGame/BasePrefabsCollection")]
public class BasePrefabsCollection : SerializedScriptableObject
public partial class BasePrefabsCollection : SerializedScriptableObject
{
public GameObject audioPoint;
public Dictionary<string, DamageNumber> hudTextCollection;
public Dictionary<BreakthroughType, Color> outlineColorCollection;
public Dictionary<ItemRarity, Color> itemRarityColorCollection;
}
public partial class BasePrefabsCollection
{
public DamageNumber GetHudTextPrefab(AttackType attackType, bool isCritical)
{
string prefix = "DN";
string typeStr = attackType.ToString();
string criticalStr = isCritical ? "Critical" : "Normal";
string dnKey = $"{prefix}_{typeStr}_{criticalStr}";
if (hudTextCollection.TryGetValue(dnKey, out var hudTextPrefab))
{
return hudTextPrefab;
}
throw new KeyNotFoundException($"HUD Text Prefab with key '{dnKey}' not found in BasePrefabsCollection.");
}
public DamageNumber GetInfoTextPrefab()
{
return hudTextCollection.GetValueOrDefault("Info_Normal");
}
}
}