拿金钱窗口来说 class Window_Gold < Window_Base Window_Base 是 Window_Gold 的父类 可以在 Window_Gold 里使用在 Window_Base 里定义的函数/方法 def initialize super(0, 0, window_width, fitting_height(1)) super 在这个地方的意思是调用在 Window_Base 里定义的 initialize def update super 这里的 super 的意思是 调用 父类里定义的 update 在金钱窗口里的 def refresh 里 有这样的一行 draw_currency_value(value, currency_unit, 4, 0, contents.width - 8) 但是在 Window_Gold 里并没有找到 def draw_currency_value 这样的字样 那这东西在那定义的呢?去他的父类里找.如果他父类里也没有那就去他父类的父类里找. 如果都找不到.那结果就只有一个......报错跳出. 这个 draw_currency_value 的定义在 Window_Gold 的父类 Window_Base 里找到了. 一些最基层的东西在脚本编辑器里找不到 要去 F1 里查询 比如 Window_Base 的父类 Window 类 class Window_Base < Window |
关羽、张飞。。。。额。。好吧= = |
做的不错啊 |
脚本实现啊 很强大的说 |
站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作
GMT+8, 2025-9-10 04:33
Powered by Discuz! X3.1
© 2001-2013 Comsenz Inc.