4.png (282.77 KB, 下载次数: 24)
怪蜀黍 发表于 2014-8-26 14:41
其实汝的脚本长度可以大幅缩短,def one ~ def nin 内容完全相同,可以引入参数x,y,m把他们合并喵~顺便吐槽 ...
RUBY 代码复制
@command_window.set_handler(:one, method(:one)) @command_window.set_handler(:two, method(:two)) @command_window.set_handler(:thi, method(:thi)) @command_window.set_handler(:fou, method(:fou)) @command_window.set_handler(:fiv, method(:fiv)) @command_window.set_handler(:six, method(:six)) @command_window.set_handler(:sev, method(:sev)) @command_window.set_handler(:eig, method(:eig)) @command_window.set_handler(:nin, method(:nin))
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |