| 赞 | 0 |
| VIP | |
| 好人卡 | |
| 积分 | 1 |
| 经验 | |
| 最后登录 | 2013-1-17 |
| 在线时间 | 142 小时 |
辉瑞中国首席研究员<
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 142 小时
- 注册时间
- 2008-1-18
- 回帖
- 2059
|
发表于 2008-8-21 05:05:48
|
显示全部楼层
module QUESTION_STRING
NUMBER = 1
STRING_ARRAY = [["abc",30,30],["a",100,150]]
end
class Window_String < Window_Base
def initialize
super(-16, -16, 640+32, 480+32)
self.contents = Bitmap.new(width - 32, height - 32)
self.visible = false
self.z=9999
@str_s = []
for str in QUESTION_STRING::STRING_ARRAY
@str_s.push([str[0],str[1],str[2]])
end
refresh
end
def refresh
self.contents.clear
for str in @str_s
self.contents.draw_text(str[1],str[2],640,32,str[0])
end
end
end
class Scene_Map
alias old_main main
def main
@window_string = Window_String.new
@window_string.opacity = 0
old_main
@window_string.dispose
end
alias old_update update
def update
old_update
if $game_switches[QUESTION_STRING::NUMBER] then
@window_string.visible = true
@window_string.refresh
else
@window_string.visible = false
end
end
end
在这里添加
STRING_ARRAY = [["abc",30,30],["a",100,150]]
文字 , X ,Y
NUMBER 为开关ID 打开此开关脚本才工作,关闭则停止
|
|