30 lines
882 B
C#
30 lines
882 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
namespace BaseGames.Enemies
|
|
{
|
|
/// <summary>
|
|
/// 战利品表 ScriptableObject。定义敌人死亡后可掉落的物品和保底 LingZhu 区间。
|
|
/// </summary>
|
|
[CreateAssetMenu(menuName = "BaseGames/Enemies/LootTable")]
|
|
public class LootTableSO : ScriptableObject
|
|
{
|
|
[Serializable]
|
|
public struct LootEntry
|
|
{
|
|
public string ItemId;
|
|
public int LingZhuAmount;
|
|
/// <summary>基础权重(难度 Hard 以上会对 ScaleWithDifficulty 项目额外加权)。</summary>
|
|
public float BaseWeight;
|
|
public bool ScaleWithDifficulty;
|
|
}
|
|
|
|
[Header("掉落物")]
|
|
public LootEntry[] Entries;
|
|
|
|
[Header("保底 LingZhu")]
|
|
public int GuaranteedLingZhuMin = 1;
|
|
public int GuaranteedLingZhuMax = 5;
|
|
}
|
|
}
|