查看: 3427|回复: 0

[转载发布] 【RMXP发布】标题动画

[复制链接]

石油鸡

梦石
0
星屑
179
在线时间
287 小时
注册时间
2014-1-27
回帖
211
发表于 2015-1-30 15:21:03 | 显示全部楼层 |阅读模式

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

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

×
本帖最后由 1041235896 于 2015-1-30 15:25 编辑

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

[pre lang="ruby" line="1"]#        Escrito por:

#                               LUCAS C.
#                           Data: 12/11/2010

#         Para:

#                    "A galera do Mundo RPG Maker"                              
class Window_Command < Window_Selectable
  def initialize(width, commands)
    super(0, 0, width, commands.size * 32 + 32)
    @item_max = commands.size
    @commands = commands
    self.contents = Bitmap.new(width - 32, @item_max * 32)
    refresh
    self.index = 0
  end
  def refresh
    self.contents.clear
    for i in 0...@item_max
      draw_item(i, normal_color)
    end
  end
  def draw_item(index, color)
    self.contents.font.color = color
    rect = Rect.new(4, 32 * index, self.contents.width - 8, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    self.contents.draw_text(rect, @commands[index])
  end
  def disable_item(index)
    draw_item(index, disabled_color)
  end
  def enable_item(index)
    draw_item(index, normal_color)
  end
end
[/pre]
其次,俺们还得那啥把那啥改了 -
Scene_Title覆盖为:

[pre lang="ruby" line="1"]class Scene_Title
  Velocidade = 15 # MUDE Aqui a velocidade de entrada do menu
  Velocidade2 = 20 #MUDE AQUI A VELOCIDADE DE SAIDA DO MENU
def main
    if $BTEST
      battle_test
      return
    end
    $data_actors        = load_data("Data/Actors.rxdata")
    $data_classes       = load_data("Data/Classes.rxdata")
    $data_skills        = load_data("Data/Skills.rxdata")
    $data_items         = load_data("Data/Items.rxdata")
    $data_weapons       = load_data("Data/Weapons.rxdata")
    $data_armors        = load_data("Data/Armors.rxdata")
    $data_enemies       = load_data("Data/Enemies.rxdata")
    $data_troops        = load_data("Data/Troops.rxdata")
    $data_states        = load_data("Data/States.rxdata")
    $data_animations    = load_data("Data/Animations.rxdata")
    $data_tilesets      = load_data("Data/Tilesets.rxdata")
    $data_common_events = load_data("Data/CommonEvents.rxdata")
    $data_system        = load_data("Data/System.rxdata")
    $game_system = Game_System.new
    @sprite = Sprite.new
    @sprite.bitmap = RPG::Cache.title($data_system.title_name)
    s1 = "新游戏"
    s2 = "继续"
    s3 = "退出"
    @command_window = Window_Command.new(192, [s1, s2, s3])
    @command_window.back_opacity = 160
    @command_window.x = 0 - @command_window.width / 2
    @command_window.y = 288
    @continue_enabled = false
    @novo_jogo = false
    @sair = false
    @mover_janela = true
    for i in 0..3
      if FileTest.exist?("Save#{i+1}.rxdata")
        @continue_enabled = true
      end
    end
    if @continue_enabled
    else
      @command_window.disable_item(1)
    end
    $game_system.bgm_play($data_system.title_bgm)
    Audio.me_stop
    Audio.bgs_stop
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @command_window.dispose
    @sprite.bitmap.dispose
    @sprite.dispose
  end  
  def mover
    if @command_window.x >= 320 - @command_window.width / 2
      @mover_janela = false
    end
    if @mover_janela
      @command_window.x += Velocidade
      @continue_enable = false
      @novo_jogo = false
      @sair = false
    else
      #@command_window.x = 320 - @command_window.width / 2
      @continue_enable = true
      @novo_jogo = true
      @sair = true
    end
  end
def update   
   mover
    if @pressionado_novo_jogo
        @novo_jogo = false
        @continue_enable = false
      @sair = false
     @command_window.x += Velocidade2
     @command_window.opacity -= Velocidade2
     if @command_window.x >= 700
       novojogo2
     end
   end
   
    if @pressionado_continue
       @novo_jogo = false
       @continue_enable = false
      @sair = false
     @command_window.x += Velocidade2
     @command_window.opacity -= Velocidade2
     if @command_window.x >= 700
        continue2
     end
   end
   
    if @novo_jogo
        @command_window.enable_item(0)
    else
      @command_window.disable_item(0)
    end
        
    if @sair
      @command_window.enable_item(2)
    else
      @command_window.disable_item(2)
    end
   
      @command_window.update
    if Input.trigger?(Input::C)
      case @command_window.index
      when 0  
        command_new_game
      when 1  
        command_continue
      when 2  
        command_shutdown
      end
    end
  end
  def command_new_game
    unless @novo_jogo
      $game_system.se_play($data_system.buzzer_se)
      return
    end
    $game_system.se_play($data_system.decision_se)
    Audio.bgm_stop
  @pressionado_novo_jogo = true
end



   def novojogo2
    Graphics.frame_count = 0
    $game_temp          = Game_Temp.new
    $game_system        = Game_System.new
    $game_switches      = Game_Switches.new
    $game_variables     = Game_Variables.new
    $game_self_switches = Game_SelfSwitches.new
    $game_screen        = Game_Screen.new
    $game_actors        = Game_Actors.new
    $game_party         = Game_Party.new
    $game_troop         = Game_Troop.new
    $game_map           = Game_Map.new
    $game_player        = Game_Player.new
    $game_party.setup_starting_members
    $game_map.setup($data_system.start_map_id)
    $game_player.moveto($data_system.start_x, $data_system.start_y)
    $game_player.refresh
    $game_map.autoplay
    $game_map.update
    $scene = Scene_Map.new
  end
  
  
  
  
  
  def command_continue
    unless @continue_enabled
      $game_system.se_play($data_system.buzzer_se)
      return
    end
    if @continue_enable
    @pressionado_continue = true
    $game_system.se_play($data_system.decision_se)
  else
    $game_system.se_play($data_system.buzzer_se)
  end
end
  def continue2
    $scene = Scene_Load.new
  end
  
  
  
  
  def command_shutdown
    unless @sair
      $game_system.se_play($data_system.buzzer_se)
      return
    end
    $game_system.se_play($data_system.decision_se)
    Audio.bgm_fade(800)
    Audio.bgs_fade(800)
    Audio.me_fade(800)
    $scene = nil
  end
  
  
  
  def battle_test
    $data_actors        = load_data("Data/BT_Actors.rxdata")
    $data_classes       = load_data("Data/BT_Classes.rxdata")
    $data_skills        = load_data("Data/BT_Skills.rxdata")
    $data_items         = load_data("Data/BT_Items.rxdata")
    $data_weapons       = load_data("Data/BT_Weapons.rxdata")
    $data_armors        = load_data("Data/BT_Armors.rxdata")
    $data_enemies       = load_data("Data/BT_Enemies.rxdata")
    $data_troops        = load_data("Data/BT_Troops.rxdata")
    $data_states        = load_data("Data/BT_States.rxdata")
    $data_animations    = load_data("Data/BT_Animations.rxdata")
    $data_tilesets      = load_data("Data/BT_Tilesets.rxdata")
    $data_common_events = load_data("Data/BT_CommonEvents.rxdata")
    $data_system        = load_data("Data/BT_System.rxdata")
    Graphics.frame_count = 0
    $game_temp          = Game_Temp.new
    $game_system        = Game_System.new
    $game_switches      = Game_Switches.new
    $game_variables     = Game_Variables.new
    $game_self_switches = Game_SelfSwitches.new
    $game_screen        = Game_Screen.new
    $game_actors        = Game_Actors.new
    $game_party         = Game_Party.new
    $game_troop         = Game_Troop.new
    $game_map           = Game_Map.new
    $game_player        = Game_Player.new
    $game_party.setup_battle_test_members
    $game_temp.battle_troop_id = $data_system.test_troop_id
    $game_temp.battle_can_escape = true
    $game_map.battleback_name = $data_system.battleback_name
    $game_system.se_play($data_system.battle_start_se)
    $game_system.bgm_play($game_system.battle_bgm)
    $scene = Scene_Battle.new
  end
end[/pre]

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

评分

参与人数 2星屑 +180 收起 理由
怪蜀黍 + 175 发布奖励
zmz6668 + 5 塞糖

查看全部评分

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部