じ☆ve冰风 发表于 2024-4-18 19:29:58

【RMXP发布】标题动画

好吧其实是从外站搬过来的- -就是那啥啦
标题哇擦跳出来的 然后那啥不好截图描述- -你可以复制那啥去试下
要改两个部分-
第一个是Window_Command
Window_Command全部覆盖为:
RUBY 代码
#      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 in0...@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)
end
def disable_item(index)
    draw_item(index, disabled_color)
end
def enable_item(index)
    draw_item(index, normal_color)
end
end

其次,俺们还得那啥把那啥改了 -
Scene_Title覆盖为:
RUBY 代码
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, )
    @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 in0..3
      ifFileTest.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
    loopdo
      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
      when0
      command_new_game
      when1
      command_continue
      when2
      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


大概有就这样- -那啥然后Scene_Title的前3行那个15和20分别是调出来的速度那啥,你要改可以试试- -
越高越快大概就是酱紫- -{:2_280:}
             本帖来自P1论坛作者1041235896,因Project1站服务器在国外有时候访问缓慢不方便作者交流学习,经联系P1站长fux2同意署名转载一起分享游戏制作经验,共同为国内独立游戏作者共同创造良好交流环境,原文地址:https://rpg.blue/forum.php?mod=viewthread&tid=375974若有侵权,发帖作者可联系底部站长QQ在线咨询功能删除,谢谢。
页: [1]
查看完整版本: 【RMXP发布】标题动画