Files
Cielonos/Assets/Scripts/MainGame/Managers/MainGameBaseCollection.cs
SoulliesOfficial f26f9fd374 爆更
2026-03-20 12:07:44 -04:00

59 lines
2.0 KiB
C#

using System.Collections.Generic;
using Cielonos.Core;
using Cielonos.MainGame.Characters.Inventory;
using DamageNumbersPro;
using Sirenix.OdinInspector;
using UnityEngine;
namespace Cielonos.MainGame
{
[CreateAssetMenu(fileName = "BasePrefabsCollection", menuName = "Cielonos/BaseCollections/MainGameBaseCollection")]
public partial class MainGameBaseCollection : BaseCollection<MainGameBaseCollection>
{
}
public partial class MainGameBaseCollection
{
public Dictionary<BreakthroughType, Color> outlineColorCollection = new Dictionary<BreakthroughType, Color>();
public Dictionary<ItemRarity, Color> itemRarityColorCollection = new Dictionary<ItemRarity, Color>();
}
public partial class MainGameBaseCollection
{
public Dictionary<string, MeshEffect> meshEffectCollection = new Dictionary<string, MeshEffect>();
}
public partial class MainGameBaseCollection
{
public Dictionary<string, GameObject> enemiesCollection = new Dictionary<string, GameObject>();
}
public partial class MainGameBaseCollection
{
public Dictionary<string, DamageNumber> hudTextCollection = new Dictionary<string, DamageNumber>();
public DamageNumber DamageNumber(Attack.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 InfoText()
{
return hudTextCollection.GetValueOrDefault("Info_Normal");
}
}
public partial class MainGameBaseCollection
{
public Dictionary<string, GameObject> feedbackCollection;
}
}