Project1

标题: 【RMXP发布】标题动画 [打印本页]

作者: 1041235896    时间: 2015-1-30 15:21
标题: 【RMXP发布】标题动画
本帖最后由 1041235896 于 2015-1-30 15:25 编辑

好吧其实是从外站搬过来的- -就是那啥啦
标题哇擦跳出来的 然后那啥不好截图描述- -你可以复制那啥去试下
要改两个部分-
第一个是Window_Command
Window_Command全部覆盖为:

RUBY 代码复制
  1. #        Escrito por:
  2.  
  3. #                               LUCAS C.
  4. #                           Data: 12/11/2010
  5.  
  6. #         Para:
  7.  
  8. #                    "A galera do Mundo RPG Maker"                              
  9. class Window_Command < Window_Selectable
  10.   def initialize(width, commands)
  11.     super(0, 0, width, commands.size * 32 + 32)
  12.     @item_max = commands.size
  13.     @commands = commands
  14.     self.contents = Bitmap.new(width - 32, @item_max * 32)
  15.     refresh
  16.     self.index = 0
  17.   end
  18.   def refresh
  19.     self.contents.clear
  20.     for i in 0...@item_max
  21.       draw_item(i, normal_color)
  22.     end
  23.   end
  24.   def draw_item(index, color)
  25.     self.contents.font.color = color
  26.     rect = Rect.new(4, 32 * index, self.contents.width - 8, 32)
  27.     self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
  28.     self.contents.draw_text(rect, @commands[index])
  29.   end
  30.   def disable_item(index)
  31.     draw_item(index, disabled_color)
  32.   end
  33.   def enable_item(index)
  34.     draw_item(index, normal_color)
  35.   end
  36. end

其次,俺们还得那啥把那啥改了 -
Scene_Title覆盖为:

RUBY 代码复制
  1. class Scene_Title
  2.   Velocidade = 15 # MUDE Aqui a velocidade de entrada do menu
  3.   Velocidade2 = 20 #MUDE AQUI A VELOCIDADE DE SAIDA DO MENU
  4. def main
  5.     if $BTEST
  6.       battle_test
  7.       return
  8.     end
  9.     $data_actors        = load_data("Data/Actors.rxdata")
  10.     $data_classes       = load_data("Data/Classes.rxdata")
  11.     $data_skills        = load_data("Data/Skills.rxdata")
  12.     $data_items         = load_data("Data/Items.rxdata")
  13.     $data_weapons       = load_data("Data/Weapons.rxdata")
  14.     $data_armors        = load_data("Data/Armors.rxdata")
  15.     $data_enemies       = load_data("Data/Enemies.rxdata")
  16.     $data_troops        = load_data("Data/Troops.rxdata")
  17.     $data_states        = load_data("Data/States.rxdata")
  18.     $data_animations    = load_data("Data/Animations.rxdata")
  19.     $data_tilesets      = load_data("Data/Tilesets.rxdata")
  20.     $data_common_events = load_data("Data/CommonEvents.rxdata")
  21.     $data_system        = load_data("Data/System.rxdata")
  22.     $game_system = Game_System.new
  23.     @sprite = Sprite.new
  24.     @sprite.bitmap = RPG::Cache.title($data_system.title_name)
  25.     s1 = "新游戏"
  26.     s2 = "继续"
  27.     s3 = "退出"
  28.     @command_window = Window_Command.new(192, [s1, s2, s3])
  29.     @command_window.back_opacity = 160
  30.     @command_window.x = 0 - @command_window.width / 2
  31.     @command_window.y = 288
  32.     @continue_enabled = false
  33.     @novo_jogo = false
  34.     @sair = false
  35.     @mover_janela = true
  36.     for i in 0..3
  37.       if FileTest.exist?("Save#{i+1}.rxdata")
  38.         @continue_enabled = true
  39.       end
  40.     end
  41.     if @continue_enabled
  42.     else
  43.       @command_window.disable_item(1)
  44.     end
  45.     $game_system.bgm_play($data_system.title_bgm)
  46.     Audio.me_stop
  47.     Audio.bgs_stop
  48.     Graphics.transition
  49.     loop do
  50.       Graphics.update
  51.       Input.update
  52.       update
  53.       if $scene != self
  54.         break
  55.       end
  56.     end
  57.     Graphics.freeze
  58.     @command_window.dispose
  59.     @sprite.bitmap.dispose
  60.     @sprite.dispose
  61.   end  
  62.   def mover
  63.     if @command_window.x >= 320 - @command_window.width / 2
  64.       @mover_janela = false
  65.     end
  66.     if @mover_janela
  67.       @command_window.x += Velocidade
  68.       @continue_enable = false
  69.       @novo_jogo = false
  70.       @sair = false
  71.     else
  72.       #@command_window.x = 320 - @command_window.width / 2
  73.       @continue_enable = true
  74.       @novo_jogo = true
  75.       @sair = true
  76.     end
  77.   end
  78. def update   
  79.    mover
  80.     if @pressionado_novo_jogo
  81.         @novo_jogo = false
  82.         @continue_enable = false
  83.       @sair = false
  84.      @command_window.x += Velocidade2
  85.      @command_window.opacity -= Velocidade2
  86.      if @command_window.x >= 700
  87.        novojogo2
  88.      end
  89.    end
  90.  
  91.     if @pressionado_continue
  92.        @novo_jogo = false
  93.        @continue_enable = false
  94.       @sair = false
  95.      @command_window.x += Velocidade2
  96.      @command_window.opacity -= Velocidade2
  97.      if @command_window.x >= 700
  98.         continue2
  99.      end
  100.    end
  101.  
  102.     if @novo_jogo
  103.         @command_window.enable_item(0)
  104.     else
  105.       @command_window.disable_item(0)
  106.     end
  107.  
  108.     if @sair
  109.       @command_window.enable_item(2)
  110.     else
  111.       @command_window.disable_item(2)
  112.     end
  113.  
  114.       @command_window.update
  115.     if Input.trigger?(Input::C)
  116.       case @command_window.index
  117.       when 0  
  118.         command_new_game
  119.       when 1  
  120.         command_continue
  121.       when 2  
  122.         command_shutdown
  123.       end
  124.     end
  125.   end
  126.   def command_new_game
  127.     unless @novo_jogo
  128.       $game_system.se_play($data_system.buzzer_se)
  129.       return
  130.     end
  131.     $game_system.se_play($data_system.decision_se)
  132.     Audio.bgm_stop
  133.   @pressionado_novo_jogo = true
  134. end
  135.  
  136.  
  137.  
  138.    def novojogo2
  139.     Graphics.frame_count = 0
  140.     $game_temp          = Game_Temp.new
  141.     $game_system        = Game_System.new
  142.     $game_switches      = Game_Switches.new
  143.     $game_variables     = Game_Variables.new
  144.     $game_self_switches = Game_SelfSwitches.new
  145.     $game_screen        = Game_Screen.new
  146.     $game_actors        = Game_Actors.new
  147.     $game_party         = Game_Party.new
  148.     $game_troop         = Game_Troop.new
  149.     $game_map           = Game_Map.new
  150.     $game_player        = Game_Player.new
  151.     $game_party.setup_starting_members
  152.     $game_map.setup($data_system.start_map_id)
  153.     $game_player.moveto($data_system.start_x, $data_system.start_y)
  154.     $game_player.refresh
  155.     $game_map.autoplay
  156.     $game_map.update
  157.     $scene = Scene_Map.new
  158.   end
  159.  
  160.  
  161.  
  162.  
  163.  
  164.   def command_continue
  165.     unless @continue_enabled
  166.       $game_system.se_play($data_system.buzzer_se)
  167.       return
  168.     end
  169.     if @continue_enable
  170.     @pressionado_continue = true
  171.     $game_system.se_play($data_system.decision_se)
  172.   else
  173.     $game_system.se_play($data_system.buzzer_se)
  174.   end
  175. end
  176.   def continue2
  177.     $scene = Scene_Load.new
  178.   end
  179.  
  180.  
  181.  
  182.  
  183.   def command_shutdown
  184.     unless @sair
  185.       $game_system.se_play($data_system.buzzer_se)
  186.       return
  187.     end
  188.     $game_system.se_play($data_system.decision_se)
  189.     Audio.bgm_fade(800)
  190.     Audio.bgs_fade(800)
  191.     Audio.me_fade(800)
  192.     $scene = nil
  193.   end
  194.  
  195.  
  196.  
  197.   def battle_test
  198.     $data_actors        = load_data("Data/BT_Actors.rxdata")
  199.     $data_classes       = load_data("Data/BT_Classes.rxdata")
  200.     $data_skills        = load_data("Data/BT_Skills.rxdata")
  201.     $data_items         = load_data("Data/BT_Items.rxdata")
  202.     $data_weapons       = load_data("Data/BT_Weapons.rxdata")
  203.     $data_armors        = load_data("Data/BT_Armors.rxdata")
  204.     $data_enemies       = load_data("Data/BT_Enemies.rxdata")
  205.     $data_troops        = load_data("Data/BT_Troops.rxdata")
  206.     $data_states        = load_data("Data/BT_States.rxdata")
  207.     $data_animations    = load_data("Data/BT_Animations.rxdata")
  208.     $data_tilesets      = load_data("Data/BT_Tilesets.rxdata")
  209.     $data_common_events = load_data("Data/BT_CommonEvents.rxdata")
  210.     $data_system        = load_data("Data/BT_System.rxdata")
  211.     Graphics.frame_count = 0
  212.     $game_temp          = Game_Temp.new
  213.     $game_system        = Game_System.new
  214.     $game_switches      = Game_Switches.new
  215.     $game_variables     = Game_Variables.new
  216.     $game_self_switches = Game_SelfSwitches.new
  217.     $game_screen        = Game_Screen.new
  218.     $game_actors        = Game_Actors.new
  219.     $game_party         = Game_Party.new
  220.     $game_troop         = Game_Troop.new
  221.     $game_map           = Game_Map.new
  222.     $game_player        = Game_Player.new
  223.     $game_party.setup_battle_test_members
  224.     $game_temp.battle_troop_id = $data_system.test_troop_id
  225.     $game_temp.battle_can_escape = true
  226.     $game_map.battleback_name = $data_system.battleback_name
  227.     $game_system.se_play($data_system.battle_start_se)
  228.     $game_system.bgm_play($game_system.battle_bgm)
  229.     $scene = Scene_Battle.new
  230.   end
  231. end


大概有就这样- -那啥然后Scene_Title的前3行那个15和20分别是调出来的速度那啥,你要改可以试试- -
越高越快大概就是酱紫- -{:2_280:}




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