Project1
标题:
【标题画面制作】← 问题对象,大虾来解救我
[打印本页]
作者:
Ceopal
时间:
2012-9-25 19:01
标题:
【标题画面制作】← 问题对象,大虾来解救我
本帖最后由 Ceopal 于 2012-9-25 21:38 编辑
待解救工程在这里……
出问题的地方:【标题界面】
光标从上往下行得通,从下往上,行不通……
因为我是去 case @command_window.index 的,光标从下往上和从上往下移动情况不同 0 —— 0……
所以不知道怎么写……
导致:从下往上 = =无限跑远
QQ截图20120925185357.jpg
(59.06 KB, 下载次数: 23)
下载附件
保存到相册
从下往上 = =无限跑远
2012-9-25 18:59 上传
#==============================================================================
# ■ Scene_Title
#------------------------------------------------------------------------------
# 标题画面
#==============================================================================
class Scene_Title < Scene_Base
#--------------------------------------------------------------------------
# ● 开始处理
#--------------------------------------------------------------------------
def start
super
SceneManager.clear
Graphics.freeze
create_background
create_foreground
create_command_window
play_title_music
@title = Plane.new
@title.bitmap = Bitmap.new("Graphics/Tilesets/Ocean1")
@start_1 = Sprite.new
@start_2 = Sprite.new
@start_3 = Sprite.new
@start_4 = Sprite.new
@start_5 = Sprite.new
@start_1.bitmap = Bitmap.new("Graphics/Tilesets/Title-Initial Game")
@start_2.bitmap = Bitmap.new("Graphics/Tilesets/Title-Continue")
@start_3.bitmap = Bitmap.new("Graphics/Tilesets/Title-Exit Game")
@start_4.bitmap = Bitmap.new("Graphics/Tilesets/Title-光标")
@start_5.bitmap = Bitmap.new("Graphics/Tilesets/遮挡")
@start_5.opacity = 40
@start_1.z = 2
@start_2.z = 2
@start_3.z = 2
@start_5.z = 1
@start_1.y = -20
@start_2.y = -20
@start_3.y = -20
@start_4.y = 20
@start_5.y = 265
@start_4.x = 280
@command_window.visible = false
end
def update
super
@title.ox = @title.ox - 1
if @command_window.index != @pic_index
case @command_window.index
when 0
@start_4.y = 20
@start_5.y = 265
@start_1.x -= 1 unless @start_1.x == -10
@start_2.x += 1 unless @start_2.x == 0
@start_3.x += 1 unless @start_3.x == 35
when 1
@start_4.y = 70
@start_5.y = 315
@start_1.x += 1 unless @start_1.x == 20
@start_2.x -= 1 unless @start_2.x == -15
@start_3.x -= 1 unless @start_3.x == 15
when 2
@start_4.y = 120
@start_5.y = 365
@start_1.x += 1 unless @start_1.x == 30
@start_2.x += 1 unless @start_2.x == 0
@start_3.x -= 1 unless @start_3.x == -5
end
end
end
复制代码
作者:
布里蓝
时间:
2012-9-25 20:51
参考这个
http://rpg.blue/forum.php?mod=viewthread&tid=225420
作者:
345912390
时间:
2012-9-25 21:24
@Ceopal
Scene_Title中的
def update
super
@title.ox = @title.ox - 1
if @command_window.index != @pic_index
case @command_window.index
when 0
@start_4.y = 20
@start_5.y = 265
@start_1.x -= 1 unless @start_1.x == -10
@start_2.x += 1 unless @start_2.x == 0
@start_3.x += 1 unless @start_3.x == 35
when 1
@start_4.y = 70
@start_5.y = 315
if @start_1.x <20
@start_1.x += 1 unless @start_1.x == 20
else
@start_1.x-= 1 unless @start_1.x == 20
end
@start_2.x -= 1 unless @start_2.x == -15
if @start_3.x >15
@start_3.x -= 1 unless @start_3.x == 15
else
@start_3.x += 1 unless @start_3.x == 15
end
when 2
@start_4.y = 120
@start_5.y = 365
@start_1.x += 1 unless @start_1.x == 30
@start_2.x += 1 unless @start_2.x == 0
@start_3.x -= 1 unless @start_3.x == -5
end
end
end
复制代码
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1