赞 | 17 |
VIP | 6 |
好人卡 | 3 |
积分 | 10 |
经验 | 2591 |
最后登录 | 2024-3-18 |
在线时间 | 251 小时 |
Lv3.寻梦者
- 梦石
- 0
- 星屑
- 1044
- 在线时间
- 251 小时
- 注册时间
- 2016-9-2
- 帖子
- 126
|
本帖最后由 雪在燃 于 2016-9-3 10:22 编辑
Scene_Title 里
- #--------------------------------------------------------------------------
- # ● 生成前景
- #--------------------------------------------------------------------------
- def create_foreground
- @foreground_sprite = Sprite.new
- @foreground_sprite.bitmap = Bitmap.new(Graphics.width, Graphics.height)
- @foreground_sprite.z = 100
- draw_game_title if $data_system.opt_draw_title
- end
- #--------------------------------------------------------------------------
- # ● 绘制游戏标题
- #--------------------------------------------------------------------------
- def draw_game_title
- @foreground_sprite.bitmap.font.size = 48
- rect = Rect.new(0, 0, Graphics.width, Graphics.height / 2)
- @foreground_sprite.bitmap.draw_text(rect, $data_system.game_title, 1)
- end
复制代码
这里的代码是标题的生成,通过修改
rect = Rect.new(x, y, Graphics.width, Graphics.height / 2) 这里的x,y可以改变坐标
Window_TitleCommand
里
- #--------------------------------------------------------------------------
- # ● 更新窗口的位置
- #--------------------------------------------------------------------------
- def update_placement
- self.x = (Graphics.width - width) /2
- self.y = (Graphics.height * 1.6 - height) / 2
- end
复制代码
修改x y 就能随意挪动了
- module Cache
- def self.title()
- v = ["one.png","two.png","three.png"]
- load_bitmap("Graphics/Titles1/", v[rand(2)])
- end
- end
- class Scene_Title
- alias randTitle_create_background create_background
- def create_background
- randTitle_create_background
- @sprite1.bitmap = Cache.title()
- end
- end
复制代码
把这个插入到main前,然后在titles1文件夹下创建one.png two.png three.png三张图片
然后rm就会随机标题画面了 |
评分
-
查看全部评分
|