LootHeapBuild

LootHeapBuild类用于构建战利品堆。 该类提供了创建和管理游戏战利品堆的功能。

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

存储掉落物列表,每个元素为概率权重和掉落物对象的配对

Link copied to clipboard

数量映射表,键为概率值,值为对应的数量

Functions

Link copied to clipboard

构建掉落物映射表

Link copied to clipboard
fun equipment(weight: Int, code: String)

添加一个装备掉落物

Link copied to clipboard
fun exp(weight: Int, value: Long)

添加一个经验掉落物

Link copied to clipboard
fun gold(weight: Int, value: Int)

添加一个金币掉落物

Link copied to clipboard
fun none(weight: Int)
fun none(code: String)

添加一个空掉落物

Link copied to clipboard
fun num(num: Int)

设置权重为100的数值

fun num(weight: Int, num: Int)

设置指定权重的数值

Link copied to clipboard
fun prop(weight: Int, code: String)

添加一个道具掉落物