跳到主要内容

increaseMoney 增加库存中的金钱

increaseMoney

类型: MethodDeclaration

所属类: Inventory

定义位置: actor.ts

描述

增加库存中的金钱

参数 money: 金钱数量

参数

参数名类型描述默认值
moneynumber--

返回值

类型: void

源代码

位置: 第 4466 行

public increaseMoney(money: number): void {
this.money += Math.max(money, 0)
Inventory.moneyIncrement = money
EventManager.emit('moneygain', {
argument: {},
properties: {
triggerActor: this.actor,
}
})
}

文档生成时间:2025/7/7 12:07:06