代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。

原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html



一三三.牙齿陷阱自动重置(1秒自动重置)

	用MT管理器打开游戏目录/assets/scripts/prefabs/trap_teeth.lua文件,在 inst.components.finiteuses:Use(1)的下一行插入以下内容:

	end
	if inst.components.mine then
	   inst:DoTaskInTime(1, function() inst.components.mine:Reset() end )

	即可让牙齿陷阱在触发后1秒钟自动重置。修改其中的1为任意数字,即可设置几秒钟自动重置