2025-11-25 08:19:33 -05:00
|
|
|
using System.Collections.Generic;
|
2026-01-03 18:19:39 -05:00
|
|
|
using Cielonos.MainGame.Inventory;
|
2025-12-22 18:36:29 -05:00
|
|
|
using DamageNumbersPro;
|
2025-11-25 08:19:33 -05:00
|
|
|
using Sirenix.OdinInspector;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
namespace Cielonos.MainGame
|
|
|
|
|
{
|
|
|
|
|
[CreateAssetMenu(fileName = "BasePrefabsCollection", menuName = "Cielonos/MainGame/BasePrefabsCollection")]
|
2026-01-03 18:19:39 -05:00
|
|
|
public partial class BasePrefabsCollection : SerializedScriptableObject
|
2025-11-25 08:19:33 -05:00
|
|
|
{
|
|
|
|
|
public GameObject audioPoint;
|
2025-12-22 18:36:29 -05:00
|
|
|
public Dictionary<string, DamageNumber> hudTextCollection;
|
2025-11-25 08:19:33 -05:00
|
|
|
|
2025-12-08 05:27:53 -05:00
|
|
|
public Dictionary<BreakthroughType, Color> outlineColorCollection;
|
2026-01-03 18:19:39 -05:00
|
|
|
|
|
|
|
|
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");
|
|
|
|
|
}
|
2025-11-25 08:19:33 -05:00
|
|
|
}
|
|
|
|
|
}
|