Project1

标题: 谁有文字向上滚动的脚本和文字完后自动进入游戏 [打印本页]

作者: 200878242    时间: 2008-8-1 05:34
标题: 谁有文字向上滚动的脚本和文字完后自动进入游戏
谁有文字向上滚动的脚本和文字完后自动进入游戏 [LINE]1,#dddddd[/LINE]此贴于 2008-8-1 7:25:58 被版主凌冰提醒,请楼主看到后对本贴做出回应。 [LINE]1,#dddddd[/LINE]此贴于 2008-8-4 2:21:43 被版主darkten提醒,请楼主看到后对本贴做出回应。 [LINE]1,#dddddd[/LINE]版务信息:本贴由楼主自主结贴~
作者: 灯笼菜刀王    时间: 2008-8-1 05:39
  1. #==============================================================================
  2. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  3. #==============================================================================

  4. #——————————————————————————————————————
  5. # Scene_Credit 制作人员名单
  6. #——————————————————————————————————————


  7. #——使用注意:默认会返回地图,如果需要返回开头,请将本脚本中的
  8. #return_scene = Scene_Map.new改为return_scene = Scene_Title.new

  9. class Scene_Credit
  10.   CREDIT=<<_END_
  11. -----Cast------

  12. 制作工具:RPG Maker XP

  13. 先帝创业未半而中道崩殂
  14. 今天下三分,益州疲弊
  15. 此诚危急存亡之秋也
  16. 然侍卫之臣不懈于内,忠志之士忘身于外者
  17. 盖追先帝之殊遇,欲报之于陛下也
  18. 诚宜开张圣听,以光先帝遗德,恢弘志士之气
  19. 不宜妄自菲薄,引喻失义,以塞忠谏之路也

  20. 宫中府中,俱为一体,陟罚臧否,不宜异同
  21. 若有作奸犯科及为忠善者
  22. 宜付有司论其刑赏,以昭陛下平明之理
  23. 不宜偏私,使内外异法也。
  24. 侍中侍郎郭攸之、费祎、董允等
  25. 此皆良实,志虑忠纯,是以先帝简拔以遗陛下
  26. 愚以为宫中之事,事无大小,悉以咨之,然后施行
  27. 必能裨补阙漏,有所广益。


  28. _END_
  29. end

  30. class Scene_Credit

  31.   def initialize(return_scene = nil)
  32.     if return_scene.nil?
  33.       return_scene = Scene_Map.new
  34.     end
  35.     @return_scene = return_scene
  36.   end
  37.   
  38.   def scene_start
  39.     credit_lines = CREDIT.split(/\n/)
  40.     credit_bitmap = Bitmap.new(640,32 * credit_lines.size)
  41.     credit_lines.each_index do |i|
  42.       line = credit_lines[i]
  43.       credit_bitmap.draw_text_s(0,i * 32,640,32,line,1)
  44.     end
  45.     @credit_sprite = Sprite.new(Viewport.new(0,50,640,380))
  46.     @credit_sprite.bitmap = credit_bitmap
  47.     @credit_sprite.oy = -430
  48.     @frame_index = 0
  49.     @last_flag = false
  50.   end

  51.   def scene_end
  52.     @credit_sprite.dispose
  53.   end
  54.   
  55.   def last?
  56.     return (@frame_index >= @credit_sprite.bitmap.height + 480)
  57.   end
  58.   
  59.   def last
  60.     if not @last_flag
  61.       Audio.bgm_fade(10000)
  62.       @last_flag = true
  63.       @last_count = 0
  64.     else
  65.       @last_count += 1
  66.     end
  67.     if @last_count >= 300
  68.       $scene = @return_scene
  69.     end
  70.   end
  71.   
  72.   def update
  73.     @frame_index += 1
  74.     return if cancel?
  75.     last if last?
  76.     @credit_sprite.oy += 1
  77.   end

  78.   def cancel?
  79.     if Input.trigger?(Input::C)
  80.       $scene = @return_scene
  81.       return true
  82.     end
  83.     return false
  84.   end

  85.   def main
  86.     scene_start
  87.     # 过渡
  88.     Graphics.transition
  89.     # 主循环
  90.     loop do
  91.       Graphics.update
  92.       Input.update
  93.       update
  94.       if $scene != self
  95.         break
  96.       end
  97.     end
  98.     # 准备过渡
  99.     Graphics.freeze
  100.     scene_end
  101.   end
  102. end
复制代码

作者: 200878242    时间: 2008-8-2 05:25
我加上脚本怎么不好使大哥大姐帮帮忙我是初学者
作者: アイシャ    时间: 2008-8-2 05:29
提示: 作者被禁止或删除 内容自动屏蔽




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1