用什么方法? 是不是用类似下面这种?
class Scene_Map #-------------------------------------------------------------------------- # ● 淡入画面 #-------------------------------------------------------------------------- def fadein(duration) #fade_loop(duration) {|v| Graphics.brightness = v } fade_loop(duration) {|v| @viewport.color.set(0,0,0,255-v) } end #-------------------------------------------------------------------------- # ● 淡出画面 #-------------------------------------------------------------------------- def fadeout(duration) #fade_loop(duration) {|v| Graphics.brightness = 255 - v } fade_loop(duration) {|v| @viewport.color.set(0,0,0,v) } end end
class Scene_Map
#--------------------------------------------------------------------------
# ● 淡入画面
#--------------------------------------------------------------------------
def fadein(duration)
#fade_loop(duration) {|v| Graphics.brightness = v }
fade_loop(duration) {|v| @viewport.color.set(0,0,0,255-v) }
end
#--------------------------------------------------------------------------
# ● 淡出画面
#--------------------------------------------------------------------------
def fadeout(duration)
#fade_loop(duration) {|v| Graphics.brightness = 255 - v }
fade_loop(duration) {|v| @viewport.color.set(0,0,0,v) }
end
end
|