lua脚本文本翻译

inst.lives_left = 9
inst.components.childspawner.onchildkilledfn = function(inst, child)
inst.lives_left = inst.lives_left - 1
if inst.lives_left <= 0 then
inst.components.childspawner:StopRegen()
inst.components.childspawner:StopSpawning()
inst:RemoveComponent("childspawner")
end
end

这是游戏里的一段脚本,自己玩单机想修改些数据,作为完全的门外汉,以往的修改都是照搬旧版本大佬写的帖子,新版本里没有。
求翻译一下,照搬了辣么多数据,多少能明白一些。
直白点,别那么专业,我只为了玩玩单机游戏。

inst可以看做一个人,lives_left 是他的一个部位。
inst.components.childspawner.onchildkilledfn这就是inst的部位的部位,比如胳膊上的毛
inst.components.childspawner:StopRegen()这冒号后面就是inst某个部位的一些动作,比如:胳膊 动起来
后面同理 .点后面就相当于部位 :冒号后面就是动作
inst:RemoveComponent("childspawner")括号里面就是动作的指令,比如:向上动,向下动
温馨提示:答案为网友推荐,仅供参考
相似回答