赞 | 0 |
VIP | 313 |
好人卡 | 0 |
积分 | 1 |
经验 | 6681 |
最后登录 | 2024-1-20 |
在线时间 | 66 小时 |
Lv1.梦旅人 蚂蚁卡卡
- 梦石
- 0
- 星屑
- 116
- 在线时间
- 66 小时
- 注册时间
- 2007-12-16
- 帖子
- 3081
|
- #--------------------------------------------------------------------------
- # 开始菜单前加入图片
- # 作者 : 擇
- #--------------------------------------------------------------------------
- class Scene_Logo
- #--------------------------------------------------------------------------
- # ● 住处理
- #--------------------------------------------------------------------------
- def get_pic_name(i,name)
- pic_name = i.to_s
- for n in 0..3 - pic_name.size
- next if n == 0
- pic_name = "0" + pic_name
- end
- pic_name = name + pic_name
- return pic_name
- end
- #--------------------------------------------------------------------------
- # ●读取背景图片处理_TitleA
- #--------------------------------------------------------------------------
- def menu_back_load_title_a
- $menupicback = []
- pic_name = []
- @point = Bitmap.new("Graphics/Titles/point.png")
- src_rect = Rect.new(0,0,3,3)
- for i in 0..1
- pic_name[i] = get_pic_name(i,"TitleA")
- $menupicback[i] = Sprite.new
- $menupicback[i].visible = false
- end
- for i in 0..1
- $menupicback[i].bitmap = Bitmap.new("Graphics/Video/TitleA/" + pic_name[i])
- if i == 15 or i == 30 or i == 45
- @sprite.bitmap.blt(606 + ((i * 3 / 45) - 1) * 7, 468, @point,src_rect)
- Graphics.update
- end
- end
- end
- #--------------------------------------------------------------------------
- # ●读取背景图片处理_TitleB
- #--------------------------------------------------------------------------
- def menu_back_load_title_b
- $menupicback = []
- pic_name = []
- @point = Bitmap.new("Graphics/Titles/point.png")
- src_rect = Rect.new(0,0,3,3)
- for i in 0..69
- pic_name[i] = get_pic_name(i,"TitleB")
- $menupicback[i] = Sprite.new
- $menupicback[i].visible = false
- end
- for i in 0..69
- $menupicback[i].bitmap = Bitmap.new("Graphics/Video/TitleB/" + pic_name[i])
- if i == 23 or i == 46 or i == 69
- @sprite.bitmap.blt(606 + ((i * 3 / 69) - 1) * 7, 468, @point,src_rect)
- Graphics.update
- end
- end
- end
- #--------------------------------------------------------------------------
- # ●读取背景图片处理_TitleB
- #--------------------------------------------------------------------------
- def menu_back_load_title_c
- $menupicback = []
- pic_name = []
- @point = Bitmap.new("Graphics/Titles/point.png")
- src_rect = Rect.new(0,0,3,3)
- for i in 0..49
- pic_name[i] = get_pic_name(i,"TitleC")
- $menupicback[i] = Sprite.new
- $menupicback[i].visible = false
- end
- for i in 0..49
- $menupicback[i].bitmap = Bitmap.new("Graphics/Video/TitleC/" + pic_name[i])
- if i == 15 or i == 30 or i == 45
- @sprite.bitmap.blt(606 + ((i * 3 / 45) - 1) * 7, 468, @point,src_rect)
- Graphics.update
- end
- end
- end
- #--------------------------------------------------------------------------
- # ●读取背景图片处理_a
- #--------------------------------------------------------------------------
- def menu_back_load_a
- $menupicback = []
- pic_name = []
- @point = Bitmap.new("Graphics/Titles/point.png")
- src_rect = Rect.new(0,0,3,3)
- for i in 0..60
- pic_name[i] = get_pic_name(i * 2)
- $menupicback[i] = Sprite.new
- $menupicback[i].visible = false
- end
- for i in 0..60
- $menupicback[i].bitmap = Bitmap.new("Graphics/Video/1/" + pic_name[i])
- if i == 20 or i == 40 or i == 60
- @sprite.bitmap.blt(606 + ((i * 3 / 60) - 1) * 7, 468, @point,src_rect)
- Graphics.update
- end
- end
- end
- #--------------------------------------------------------------------------
- # ●读取背景图片处理_b
- #--------------------------------------------------------------------------
- def menu_back_load_b
- $menupicn = 0
- $menupicback = []
- $i = 1
- @point = Sprite.new
- @point.bitmap = Bitmap.new("Graphics/Titles/point.png")
- src_rect = Rect.new(0,0,3,3)
- for i in 1..3
- $menupicback[i] = Sprite.new
- $menupicback[i].opacity = 0
- $menupicback[i].bitmap = Bitmap.new("Graphics/Video/2/bg"+ i.to_s + ".jpg")
- @sprite.bitmap.blt(606 + (i - 1) * 7, 468, @point.bitmap,src_rect)
- Graphics.update
- end
- $rectpic = Rect.new(0, 0, 530, 364)
- end
- #--------------------------------------------------------------------------
- # ● 住处理
- #--------------------------------------------------------------------------
- def main
- i = 0
- # 播放LOGO音效
- #Audio.se_play("Audio/SE/标题画面出现.wav")
- # 生成标题图形
- @sprite = Sprite.new
- @sprite.bitmap = RPG::Cache.title("Titless.png")
- # 生成位置为画面中央
- @sprite.x = (640 - @sprite.bitmap.width) / 2
- @sprite.y = (480 - @sprite.bitmap.height) / 2
- # 透明度(0为完全透明)
- @sprite.opacity = 255
- # 执行过渡
- Graphics.transition
- if $piantou == 1
- $menu_back_type = rand(2)
- case $menu_back_type
- when 0
- menu_back_load_title_a
- when 1
- menu_back_load_title_c
- end
- end
- # 主循环
- loop do
- # 刷新游戏画面
- Graphics.update
- #i += 1
- # 刷新输入信息
- Input.update
- # 如果画面被切换就中断循环
- break
- end
- # 装备过渡
- Graphics.freeze
- # 释放标题图形
- #@gameovershow.dispose
- @sprite.bitmap.dispose
- @sprite.dispose
- $scene = Scene_Title.new
- end
- end
复制代码
来自《石焚刃暖》 略有改动
提示缺什么素材就自己添
想要原版 推荐下载游戏
main里
要改成 $scene = Scene_Logo.new
事件的话 应该用 跳过标题 脚本
然后 条件分歧吧
这个在http://rpg.blue/forumdisplay.php?fid=65里去看看吧 |
|