退出特效(渐变+自动保存+感谢使用)
class Window_exit<Window_Basedef initialize super(224,132,192,192) self.back_opacity = 0 self.opacity = 0 self.contents_opacity = 255 self.contents = Bitmap.new(width - 32, height - 32) self.visible = true updateenddef update self.contents.clear self.contents.draw_text(0, 0 , self.width - 32 , 24,"感谢使用",0)endenddef exit(n)thexit=Window_exit.newthexit.updateif $scene!=Scene_Titlefile = File.open("Save3.rxdata", "wb")characters = []for i in 0...$game_party.actors.size actor = $game_party.actors characters.push()end# 写入描绘存档文件用的角色数据Marshal.dump(characters, file)# 写入测量游戏时间用画面计数Marshal.dump(Graphics.frame_count, file)# 增加 1 次存档次数$game_system.save_count += 1# 保存魔法编号# (将编辑器保存的值以随机值替换)$game_system.magic_number = $data_system.magic_number# 写入各种游戏对像Marshal.dump($game_system, file)Marshal.dump($game_switches, file)Marshal.dump($game_variables, file)Marshal.dump($game_self_switches, file)Marshal.dump($game_screen, file)Marshal.dump($game_actors, file)Marshal.dump($game_party, file)Marshal.dump($game_troop, file)Marshal.dump($game_map, file)Marshal.dump($game_player, file)file.closeend$scene = nilend复制代码用法:国际惯例,放在main前面.本帖来自P1论坛作者160445706,因Project1站服务器在国外有时候访问缓慢不方便作者交流学习,经联系P1站长fux2同意署名转载一起分享游戏制作经验,共同为国内独立游戏作者共同创造良好交流环境,原文地址:https://rpg.blue/forum.php?mod=viewthread&tid=190215若有侵权,发帖作者可联系底部站长QQ在线咨询功能删除,谢谢。
页:
[1]