设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 2901|回复: 2
打印 上一主题 下一主题

[已经解决] 【标题画面制作】← 问题对象,大虾来解救我

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
521 小时
注册时间
2011-12-7
帖子
305
跳转到指定楼层
1
发表于 2012-9-25 19:01:11 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
本帖最后由 Ceopal 于 2012-9-25 21:38 编辑

待解救工程在这里……

出问题的地方:【标题界面】
光标从上往下行得通,从下往上,行不通……

因为我是去 case @command_window.index 的,光标从下往上和从上往下移动情况不同 0 —— 0……

所以不知道怎么写……

导致:从下往上 = =无限跑远

  1. #==============================================================================
  2. # ■ Scene_Title
  3. #------------------------------------------------------------------------------
  4. #  标题画面
  5. #==============================================================================

  6. class Scene_Title < Scene_Base
  7.   #--------------------------------------------------------------------------
  8.   # ● 开始处理
  9.   #--------------------------------------------------------------------------
  10.   def start
  11.     super
  12.     SceneManager.clear
  13.     Graphics.freeze
  14.     create_background
  15.     create_foreground
  16.     create_command_window
  17.     play_title_music
  18.    
  19.     @title = Plane.new
  20.     @title.bitmap = Bitmap.new("Graphics/Tilesets/Ocean1")
  21.    
  22.     @start_1 = Sprite.new
  23.     @start_2 = Sprite.new
  24.     @start_3 = Sprite.new
  25.     @start_4 = Sprite.new
  26.     @start_5 = Sprite.new
  27.    
  28.     @start_1.bitmap = Bitmap.new("Graphics/Tilesets/Title-Initial Game")
  29.     @start_2.bitmap = Bitmap.new("Graphics/Tilesets/Title-Continue")
  30.     @start_3.bitmap = Bitmap.new("Graphics/Tilesets/Title-Exit Game")
  31.     @start_4.bitmap = Bitmap.new("Graphics/Tilesets/Title-光标")
  32.     @start_5.bitmap = Bitmap.new("Graphics/Tilesets/遮挡")
  33.    
  34.     @start_5.opacity = 40
  35.    
  36.     @start_1.z = 2
  37.     @start_2.z = 2
  38.     @start_3.z = 2
  39.     @start_5.z = 1
  40.    
  41.     @start_1.y = -20
  42.     @start_2.y = -20
  43.     @start_3.y = -20
  44.     @start_4.y = 20
  45.     @start_5.y = 265
  46.     @start_4.x = 280
  47.     @command_window.visible = false
  48.   end
  49.   
  50.   def update
  51.     super
  52.     @title.ox = @title.ox - 1
  53.    
  54.     if @command_window.index != @pic_index
  55.      case @command_window.index
  56.      when 0
  57.        @start_4.y = 20
  58.        @start_5.y = 265
  59.        @start_1.x -= 1 unless @start_1.x == -10
  60.        @start_2.x += 1 unless @start_2.x == 0
  61.        @start_3.x += 1 unless @start_3.x == 35
  62.       
  63.      when 1
  64.        @start_4.y = 70
  65.        @start_5.y = 315
  66.        @start_1.x += 1 unless @start_1.x == 20
  67.        @start_2.x -= 1 unless @start_2.x == -15
  68.        @start_3.x -= 1 unless @start_3.x == 15
  69.      when 2
  70.        @start_4.y = 120
  71.        @start_5.y = 365
  72.        @start_1.x += 1 unless @start_1.x == 30
  73.        @start_2.x += 1 unless @start_2.x == 0
  74.        @start_3.x -= 1 unless @start_3.x == -5
  75.      end
  76.    end
  77.    
  78.   end
  79.   
复制代码

Lv2.观梦者

梦石
0
星屑
743
在线时间
2064 小时
注册时间
2011-10-3
帖子
1686
2
发表于 2012-9-25 20:51:51 | 只看该作者

点评

这个贴子我看过 0.0 重点是 下载那个工程时>无法显示该网页……  发表于 2012-9-25 21:15
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
465
在线时间
915 小时
注册时间
2011-5-11
帖子
438
3
发表于 2012-9-25 21:24:30 | 只看该作者
@Ceopal
Scene_Title中的
  1.   def update
  2.     super
  3.     @title.ox = @title.ox - 1
  4.    
  5.     if @command_window.index != @pic_index
  6.      case @command_window.index
  7.      when 0
  8.        @start_4.y = 20
  9.        @start_5.y = 265
  10.       
  11.        @start_1.x -= 1 unless @start_1.x == -10
  12.        @start_2.x += 1 unless @start_2.x == 0
  13.        @start_3.x += 1 unless @start_3.x == 35
  14.       
  15.      when 1
  16.         @start_4.y = 70
  17.         @start_5.y = 315
  18.         if @start_1.x <20
  19.           @start_1.x += 1 unless @start_1.x == 20
  20.         else
  21.           @start_1.x-= 1 unless @start_1.x == 20
  22.         end
  23.         @start_2.x -= 1 unless @start_2.x == -15
  24.         if @start_3.x >15
  25.           @start_3.x -= 1 unless @start_3.x == 15
  26.         else
  27.           @start_3.x += 1 unless @start_3.x == 15
  28.        end
  29.      when 2
  30.        @start_4.y = 120
  31.        @start_5.y = 365
  32.       
  33.       
  34.        @start_1.x += 1 unless @start_1.x == 30
  35.        @start_2.x += 1 unless @start_2.x == 0
  36.        @start_3.x -= 1 unless @start_3.x == -5
  37.      end
  38.    end
  39.    
  40.   end
复制代码

点评

哈~你搞定了,谢谢~!  发表于 2012-9-25 21:38
http://rpg.blue/static/image/smiley/yct/A059.gif中国字认识都不到一半,哪的心情学英语呀!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-5-8 10:21

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表