赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 4395 |
最后登录 | 2019-9-30 |
在线时间 | 163 小时 |
Lv1.梦旅人 小莹爱水区
- 梦石
- 0
- 星屑
- 60
- 在线时间
- 163 小时
- 注册时间
- 2010-9-18
- 帖子
- 1085
|
采集系统:(不是原创)
在Main 插入此脚本!
在事件里输入脚本
$scene = Scene_Collection
接有采集画面了
哈哈
######################################################################
class Window_Collection < Window_Selectable
def initialize
super(240, 200, 120, 80)
self.contents = Bitmap.new(width - 32, height - 32)
self.back_opacity = 160
refresh
end
def refresh
self.contents.clear
#self.contents.draw_text(4, 20, 40, 32, "采集……", 2)
end
def update(t)
@t = t
for i in 0..@t
self.contents.font.color = Color.new(32, 255, 32, 160)
self.contents.draw_text(4, 0, 80, 32, "采集中……", 0)
self.contents.font.color = Color.new(200, 200, 200, 160)
self.contents.draw_text(4 + i * 4, 32, 4 ,20, "█", 0)
end
end
end
class Window_Collection_End < Window_Selectable
def initialize
super(240, 200, 120, 80)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
update
end
def refresh
self.contents.clear
end
def update
self.contents.draw_text(4, 10, 80, 32, "得到 花 1 个")
end
end
class Scene_Collection
def main
@spriteset = Spriteset_Map.new
@message_window = Window_Message.new
@i = 1
@collection_window = Window_Collection.new
@wait_count = 20
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
return
end
end
Graphics.freeze
end
def update
if @wait_count != 0
@wait_count -= 1
return
elsif @i <= 20
@collection_window.update(@i)
@i += 1
@wait_count = 20
return
else
@collection_window.dispose
update_collection_window
@wait_count = 20
return
end
end
def update_collection_window
@collection_end_window = Window_Collection_End.new
@wait_count = 160
@collection_end_window.dispose
$scene = Scene_Map.new
end
end
###################################################################
如果觉得我的答案好请在http://rpg.blue/thread-155979-1-1.html
回复:http://rpg.blue/thread-158881-1-1.html 认可莹的赎生 |
|