This commit is contained in:
CortexCore
2025-03-04 16:34:31 +08:00
parent 4402ae533b
commit d6e6888bb7
18 changed files with 230 additions and 1 deletions

40
Src/Loot/ILootService.cs Normal file
View File

@@ -0,0 +1,40 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Cysharp.Threading.Tasks;
namespace Net.Project.B.Loot
{
/// <summary>
/// 可配置战利品
/// </summary>
public interface IScriptableLoot
{
public int Id { get; }
/// <summary>
/// 种子
/// </summary>
public int Seed { get; }
/// <summary>
/// 名称
/// </summary>
public string Name { get; }
/// <summary>
/// 物品和权重
/// </summary>
public IReadOnlyDictionary<int, int> ItemWeights { get; }
/// <summary>
/// 类型
/// </summary>
public IWorldLootType LootType { get; }
}
public interface IWorldLootType{}
public interface ILootService
{
public UniTask<IReadOnlyDictionary<int,int>> GetLoot(IWorldLootType type);
}
[Serializable]
public struct WorldContainerLoot:IWorldLootType{}
[Serializable]
public struct WorldItemLoot:IWorldLootType{}
}