1
This commit is contained in:
40
Src/Loot/ILootService.cs
Normal file
40
Src/Loot/ILootService.cs
Normal 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{}
|
||||
}
|
Reference in New Issue
Block a user