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{}
|
||||
}
|
11
Src/Loot/ILootService.cs.meta
Normal file
11
Src/Loot/ILootService.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: befc1e67d73162342acfab5e34e6a4ae
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
18
Src/Loot/Net.Project.B.Loot.asmdef
Normal file
18
Src/Loot/Net.Project.B.Loot.asmdef
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "Net.Project.B.Loot",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:14fe60d984bf9f84eac55c6ea033a8f4",
|
||||
"GUID:d8b63aba1907145bea998dd612889d6b",
|
||||
"GUID:f51ebe6a0ceec4240a699833d6309b23"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": true
|
||||
}
|
7
Src/Loot/Net.Project.B.Loot.asmdef.meta
Normal file
7
Src/Loot/Net.Project.B.Loot.asmdef.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e18d548755c9bc8458ca189e16813742
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user