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

Project1

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

[已经解决] 请问怎么把音乐盒子这个功能的脚本变成事件

[复制链接]

Lv1.梦旅人

梦石
0
星屑
1042
在线时间
5 小时
注册时间
2014-7-8
帖子
4
跳转到指定楼层
1
发表于 2014-7-8 11:01:21 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
想变成人物对话才可以出现音乐盒子而不是出现在菜单栏那种的,但是不会弄,完全不懂脚本
david_ng223 该用户已被删除
2
发表于 2014-7-8 11:37:55 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
1042
在线时间
5 小时
注册时间
2014-7-8
帖子
4
3
 楼主| 发表于 2014-7-8 11:49:44 | 只看该作者
david_ng223 发表于 2014-7-8 11:37
首先,你要把你所用的「音樂盒子」腳本發上來.
  1. #==============================================================================
  2. # +++ MOG - MUSIC BOX  (v1.1) +++
  3. #==============================================================================
  4. # By Moghunter
  5. # http://www.atelier-rgss.com/
  6. #==============================================================================
  7. # Sistema que permite escutar as músicas tocadas durante o jogo.
  8. #==============================================================================
  9. #==============================================================================
  10. # UTILIZAÇÃO
  11. #
  12. # 1 - Crie uma pasta com o nome MUSIC COVER
  13. #     /Graphics/Music_Cover/
  14. #
  15. # 2 - Copie os seguintes arquivos contidos na Demo.
  16. #     Layout.png
  17. #     Layout2.png
  18. #
  19. #==============================================================================
  20. # OPCIONAL
  21. #
  22. # Para adicionar imagens vinculadas as músicas nomeie as imagens da
  23. # seguinte forma.
  24. #
  25. # FILE_NAME + _B1
  26. # FILE_NAME + _B2
  27. #
  28. # Exemplo (eg)
  29. #
  30. # Nome da música
  31. # Theme5.MP3 (Ogg/mid/etc...)
  32. #
  33. # Nome dos arquivos gráficos que ficarão na pasta /Graphics/Music_Cover/
  34. # Theme5_B1.png
  35. # Theme5_B2.png
  36. #
  37. # NOTA - O Sufixo _B1 é a imagem que terá o efeito scrolling, caso não queira
  38. #        o efeito de deslizar a imagem basta criar apenas um arquivo de
  39. #        imagem e nomea-lo com o sufixo _B2
  40. #
  41. #==============================================================================
  42. # Para chamar o script use o comando abaixo.
  43. #
  44. # SceneManager.call(Scene_Music_Box)
  45. #
  46. #==============================================================================

  47. #==============================================================================
  48. # ● Histórico (Version History)
  49. #==============================================================================
  50. # v 1.1 - Melhoria no sistema de dispose.
  51. #==============================================================================

  52. module MOG_MUSIC_BOX
  53.   # Posição da janela da lista de músicas.
  54.   MUSIC_LIST_POSITION_TEXT = [0, 200]
  55.   # Posição do layout da lista de músicas.
  56.   MUSIC_LIST_POSITION_LAYOUT = [0, 195]
  57.   # Tempo para ocultar a janela de lista de músicas.
  58.   MUSICLIST_FADE_TIME = 2#(Sec)
  59.   # Definição da velocidade de deslizar a imagem de fundo. [X,Y]
  60.   BACKGROUND_SCROLL_SPEED = [2,0]  
  61.   # Ativar a animação do gráfico do personagem. *(Não é obrigatório ser
  62.   # a imagem de um personagem, você pode criar outros efeitos de animações
  63.   # no lugar do personagem.
  64.   CHARACTER_SPRITE = true
  65.   # Velociadade da animação do personagem.
  66.   CHARACTER_ANIMATION_SPEED = 30
  67.   # Posição do personagem
  68.   CHARACTER_POSITION = [300,140]
  69.   # Definição da palavra Completado.
  70.   COMPLETED_WORD =  "Completed"
  71.   # Posição do texto de informação.
  72.   INFO_POSITION = [0,373]  
  73.   # Incluir músicas contidas no RTP.
  74.   INCLUDE_RTP = true
  75.   # Definição do diretório que foi instalado o RTP.
  76.   # Por padrão o caminho do diretório foi baseado no Windows 7 (64Bits).
  77.   # Outros sistemas operacionais o caminho do diretório é diferente.
  78.   RTP_PATH = "C:/Program Files (x86)/Common Files/"
  79.   # Ativar o comando Music Box no menu principal.
  80.   MENU_COMMAND = true
  81.   # Nome do comando
  82.   MENU_COMMAND_NAME = "Music Box"  
  83. end


  84. #===============================================================================
  85. # ■ Game System
  86. #===============================================================================
  87. class Game_System
  88.   
  89.   attr_accessor  :music_book_list

  90. #--------------------------------------------------------------------------
  91. # ● Initialize
  92. #--------------------------------------------------------------------------                     
  93.   alias mog_music_book_initialize initialize
  94.   def initialize
  95.       mog_music_book_initialize
  96.       music_book_setup
  97.   end

  98. #--------------------------------------------------------------------------
  99. # ● Music Book Setup
  100. #--------------------------------------------------------------------------                  
  101.   def music_book_setup
  102.       return if !SceneManager.scene_is?(Scene_Title)
  103.       @music_book_list = []
  104.       @music_book_list.push([$data_system.title_bgm.name,true]) if $data_system.title_bgm.name != ""
  105.       path = "Audio/BGM/"  
  106.       make_music_list(path)  
  107.       if MOG_MUSIC_BOX::INCLUDE_RTP
  108.          path = MOG_MUSIC_BOX::RTP_PATH
  109.          make_music_list(path)
  110.       end
  111.     end  
  112.    
  113. #--------------------------------------------------------------------------
  114. # ● Make_Music_List
  115. #--------------------------------------------------------------------------                       
  116.   def make_music_list(path)
  117.       return if !File.directory?(path)
  118.       list = Dir.entries(path)
  119.       for i in 2...list.size
  120.           file_name = File.basename(list.to_s,  ".*")
  121.           @music_book_list.push([file_name,false]) unless repeated_song?(file_name)
  122.       end   
  123.    end
  124.   
  125. #--------------------------------------------------------------------------
  126. # ● Repeated Song?
  127. #--------------------------------------------------------------------------                          
  128.   def repeated_song?(file_name)
  129.       for i in 0...@music_book_list.size         
  130.          return true if @music_book_list.include?(file_name)
  131.       end
  132.       return false
  133.   end  
  134.    
  135. end  

  136. #===============================================================================
  137. # ■ RPG AudioFile
  138. #===============================================================================
  139. class RPG::BGM < RPG::AudioFile
  140.   
  141. #--------------------------------------------------------------------------
  142. # ● Play
  143. #--------------------------------------------------------------------------                     
  144.   alias mog_music_book_play play
  145.   def play(pos = 0)
  146.       mog_music_book_play(pos)
  147.       check_music_book
  148.   end
  149.   
  150. #--------------------------------------------------------------------------
  151. # ● Check Music Book
  152. #--------------------------------------------------------------------------                  
  153.   def check_music_book
  154.       return if $game_system.music_book_list == nil      
  155.       return if @name.empty?
  156.       for i in 0...$game_system.music_book_list.size
  157.           if $game_system.music_book_list[0] == @name
  158.              $game_system.music_book_list[1] = true
  159.              break
  160.           end  
  161.       end  
  162.   end  
  163.   
  164. end
  165.   
  166. #===============================================================================
  167. # ■ RPG Cache
  168. #===============================================================================
  169. module Cache
  170.   
  171.   #--------------------------------------------------------------------------
  172.   # ● Music Cover
  173.   #--------------------------------------------------------------------------
  174.   def self.music_cover(filename)
  175.       load_bitmap("Graphics/Music_Cover/", filename)
  176.   end
  177.   
  178. end  

  179. #===============================================================================
  180. # ■ RPG_FileTest
  181. #===============================================================================
  182. module RPG_FileTest
  183.   
  184.   #--------------------------------------------------------------------------
  185.   # ● RPG_FileTest.music_cover_exist?
  186.   #--------------------------------------------------------------------------
  187.   def RPG_FileTest.music_cover_exist?(filename)
  188.       return Cache.music_cover(filename) rescue return false
  189.   end  
  190.   
  191. end

  192. #==============================================================================
  193. # ■ Window_Picture
  194. #==============================================================================
  195. class Window_Music_List < Window_Selectable
  196.   
  197. #------------------------------------------------------------------------------
  198. # ● Initialize
  199. #------------------------------------------------------------------------------   
  200.   def initialize
  201.       super(0, 0, 544, 160)
  202.       self.opacity = 0
  203.       @Index = -1
  204.       @item_max = $game_system.music_book_list.size
  205.       refresh
  206.       select(0)
  207.       activate
  208.   end

  209. #------------------------------------------------------------------------------
  210. # ● Refresh
  211. #------------------------------------------------------------------------------   
  212.   def refresh
  213.       if self.contents != nil
  214.          self.contents.dispose
  215.          self.contents = nil
  216.       end
  217.       if @item_max > 0         
  218.          self.contents = Bitmap.new(width - 32, 24 * @item_max)
  219.          for i in 0...@item_max
  220.             draw_item(i)
  221.          end
  222.          return
  223.       end
  224.       self.contents = Bitmap.new(width - 32, 24)
  225.       self.contents.draw_text(x,y,440,32,"No Data",0)   
  226.   end
  227.   
  228. #------------------------------------------------------------------------------
  229. # ● draw_item
  230. #------------------------------------------------------------------------------   
  231.   def draw_item(index)
  232.       x = 0
  233.       y = 24 * index
  234.       if $game_system.music_book_list[index][1]
  235.          change_color(normal_color,true)
  236.          music = "N" + sprintf("%02d", index + 1).to_s +  " - "+ $game_system.music_book_list[index][0].to_s
  237.       else
  238.          change_color(normal_color,false)
  239.          music = "N" + sprintf("%02d", index + 1).to_s +  " - Not Available"
  240.       end  
  241.       self.contents.draw_text(x,y,440,32,music,0)
  242.   end
  243.   
  244. #------------------------------------------------------------------------------
  245. # ● Col Max
  246. #------------------------------------------------------------------------------      
  247.   def col_max
  248.       return 1
  249.   end
  250.    
  251. #------------------------------------------------------------------------------
  252. # ● Item Max
  253. #------------------------------------------------------------------------------         
  254.   def item_max
  255.       return @item_max == nil ? 0 : @item_max
  256.   end  
  257.   
  258. end

  259. #===============================================================================
  260. # ■ Scene Music Box
  261. #===============================================================================
  262. class Scene_Music_Box
  263. include MOG_MUSIC_BOX

  264. #--------------------------------------------------------------------------
  265. # ● Main
  266. #--------------------------------------------------------------------------               
  267.   def main
  268.       execute_dispose
  269.       create_music_list
  270.       create_layout
  271.       create_sprite_now_playing
  272.       create_character
  273.       execute_loop
  274.       execute_dispose      
  275.   end

  276. #--------------------------------------------------------------------------
  277. # ● Execute Loop
  278. #--------------------------------------------------------------------------                 
  279.   def execute_loop
  280.       Graphics.transition
  281.       loop do
  282.            Graphics.update
  283.            Input.update
  284.            update
  285.            break if SceneManager.scene != self
  286.      end        
  287.    end  
  288.   
  289. #--------------------------------------------------------------------------
  290. # ● Create Layout
  291. #--------------------------------------------------------------------------                 
  292.   def create_layout
  293.       @background = Plane.new
  294.       @background.z = 1
  295.       @background2 = Sprite.new
  296.       @background2.z = 2      
  297.       @layout = Sprite.new
  298.       @layout.bitmap = Cache.music_cover("Layout")
  299.       @layout.z = 90
  300.       @old_index = -1
  301.   end
  302.   
  303. #--------------------------------------------------------------------------
  304. # ● create Sprite now Playing
  305. #--------------------------------------------------------------------------                  
  306.   def create_sprite_now_playing
  307.       @now_playing = Plane.new
  308.       @now_playing.bitmap = Bitmap.new(544,416)
  309.       @now_playing.z = 100
  310.       check_completion
  311.       make_now_playing(true)
  312.   end  

  313. #--------------------------------------------------------------------------
  314. # ● Check Completion
  315. #--------------------------------------------------------------------------                     
  316.   def check_completion
  317.       comp = 0
  318.       for i in 0...$game_system.music_book_list.size
  319.           comp += 1 if $game_system.music_book_list[1]        
  320.       end
  321.       if  $game_system.music_book_list.size > 0   
  322.           @completed = "( " + COMPLETED_WORD + " " + (comp.to_f / $game_system.music_book_list.size * 100).truncate.to_s + "% )"
  323.       else
  324.           @completed = "( " + COMPLETED_WORD + " )"
  325.       end  
  326.   end
  327.   
  328. #--------------------------------------------------------------------------
  329. # ● Create_Character
  330. #--------------------------------------------------------------------------                       
  331.   def create_character
  332.       return if !CHARACTER_SPRITE
  333.       @character_index = 0
  334.       @character_animation_speed = 0
  335.       @character = Sprite.new
  336.       @character.z = 80
  337.       @character_image = Cache.music_cover("Character")
  338.       @character_frame_max = @character_image.width / @character_image.height
  339.       @character_width = @character_image.width / @character_frame_max  
  340.       @character.bitmap = Bitmap.new(@character_width,@character_image.height)
  341.       @character.x = CHARACTER_POSITION[0]
  342.       @character.y = CHARACTER_POSITION[1]     
  343.       make_character_bitmap
  344.   end
  345.   
  346. #--------------------------------------------------------------------------
  347. # ● Make Now Playing
  348. #--------------------------------------------------------------------------                     
  349. def make_now_playing(init = false)
  350.      @now_playing.bitmap.clear
  351.      @now_playing.bitmap.font.size = 20
  352.      @now_playing.bitmap.font.bold = true
  353.      text = song_name + "   " + @completed
  354.      text = @completed if init
  355.      @now_playing.bitmap.draw_text(INFO_POSITION[0],INFO_POSITION[1], 544, 32, text.to_s,1)      
  356.      @now_playing.opacity = 0
  357. end

  358. #--------------------------------------------------------------------------
  359. # ● Make Background
  360. #--------------------------------------------------------------------------                  
  361. def make_background
  362.      if @background.bitmap != nil
  363.         @background.bitmap.dispose
  364.         @background.bitmap = nil
  365.      end  
  366.      if RPG_FileTest.music_cover_exist?(song_name + "_B1")
  367.         @background.bitmap = Cache.music_cover(song_name + "_B1")
  368.      else
  369.         @background.bitmap = Cache.music_cover("")
  370.      end  
  371.      @background.opacity = 0
  372.      if @background2.bitmap != nil
  373.         @background2.bitmap.dispose
  374.         @background2.bitmap = nil
  375.      end  
  376.      if RPG_FileTest.music_cover_exist?(song_name + "_B2")
  377.         @background2.bitmap = Cache.music_cover(song_name + "_B2")
  378.      else
  379.         @background2.bitmap = Cache.music_cover("")
  380.      end  
  381.      @background2.opacity = 0     
  382. end

  383. #--------------------------------------------------------------------------
  384. # ● Song Name
  385. #--------------------------------------------------------------------------                    
  386. def song_name
  387.      if $game_system.music_book_list.size == 0      
  388.         return ""
  389.      end  
  390.      return $game_system.music_book_list[@music_list_window.index][0].to_s
  391. end

  392. #--------------------------------------------------------------------------
  393. # ● Create_Music_List
  394. #--------------------------------------------------------------------------                     
  395.   def create_music_list
  396.       [url=home.php?mod=space&uid=76426]@stop[/url] = true
  397.       @layout2 = Sprite.new
  398.       @layout2.bitmap = Cache.music_cover("Layout2")
  399.       @layout_org_position = [MUSIC_LIST_POSITION_LAYOUT[0],MUSIC_LIST_POSITION_LAYOUT[1]]      
  400.       @layout2.y = @layout_org_position[1]
  401.       @layout2.z = 90   
  402.       @music_list_window = Window_Music_List.new
  403.       @music_list_window.z = 100
  404.       @music_list_window_org = [MUSIC_LIST_POSITION_TEXT[0],MUSIC_LIST_POSITION_TEXT[1]]
  405.       @music_list_window.y = @music_list_window_org[1]
  406.       @music_index = @music_list_window.index
  407.       @fade_max =  60 + 60 * MUSICLIST_FADE_TIME
  408.       @fade_time = @fade_max
  409.       @music_list_window.x = -544
  410.       @music_list_window.contents_opacity = 0
  411.       @layout2.x = -544
  412.       @layout2.opacity = 0        
  413.   end  
  414.   
  415. #--------------------------------------------------------------------------
  416. # ● Initialize
  417. #--------------------------------------------------------------------------                  
  418.   def initialize
  419.       BattleManager.save_bgm_and_bgs
  420.       RPG::BGM.fade(2 * 1000)
  421.       RPG::BGS.fade(2 * 1000)
  422.       @w_visible = true
  423.   end
  424.    
  425.   
  426. #--------------------------------------------------------------------------
  427. # ● Execute Dispose
  428. #--------------------------------------------------------------------------                  
  429.   def execute_dispose
  430.       return if @layout == nil
  431.       Graphics.freeze
  432.       @music_list_window.dispose
  433.       if @background.bitmap != nil
  434.          @background.bitmap.dispose
  435.       end      
  436.       @background.dispose
  437.       if @background2.bitmap != nil
  438.          @background2.bitmap.dispose
  439.       end      
  440.       @background2.dispose      
  441.       @layout.bitmap.dispose
  442.       @layout.dispose
  443.       @layout = nil
  444.       @layout2.bitmap.dispose
  445.       @layout2.dispose      
  446.       @now_playing.bitmap.dispose
  447.       @now_playing.dispose
  448.       if CHARACTER_SPRITE
  449.          @character.bitmap.dispose
  450.          @character.dispose
  451.          @character_image.dispose
  452.       end   
  453.       RPG::BGM.stop
  454.       BattleManager.replay_bgm_and_bgs
  455.   end
  456.   
  457. #--------------------------------------------------------------------------
  458. # ● Hide_Layout
  459. #--------------------------------------------------------------------------                       
  460.   def hide_layout
  461.       Sound.play_ok
  462.       @w_visible = @w_visible == true ? false : true
  463.       @fade_time = @w_visible ? @fade_max : 0
  464.       @layout.visible = @w_visible
  465.       if CHARACTER_SPRITE
  466.          @character.visible = @w_visible
  467.       end  
  468.   end   
  469.   
  470. #--------------------------------------------------------------------------
  471. # ● Update
  472. #--------------------------------------------------------------------------                  
  473.   def update
  474.       update_commands
  475.       update_animation
  476.   end

  477. #--------------------------------------------------------------------------
  478. # ● Update Animation
  479. #--------------------------------------------------------------------------                     
  480.   def update_animation
  481.       @now_playing.opacity += 2
  482.       @now_playing.ox += 1
  483.       update_list_fade
  484.       update_character_animation
  485.       update_background_animation
  486.   end  

  487. #--------------------------------------------------------------------------
  488. # ● Update Background Animation
  489. #--------------------------------------------------------------------------                       
  490.   def update_background_animation
  491.       @background.opacity += 1
  492.       @background2.opacity += 1
  493.       @background.ox += BACKGROUND_SCROLL_SPEED[0]
  494.       @background.oy += BACKGROUND_SCROLL_SPEED[1]   
  495.   end
  496.       
  497. #--------------------------------------------------------------------------
  498. # ● Update Character Animation
  499. #--------------------------------------------------------------------------                       
  500.   def update_character_animation
  501.       return if !CHARACTER_SPRITE or @stop
  502.       @character_animation_speed += 1
  503.       if @character_animation_speed > CHARACTER_ANIMATION_SPEED
  504.          @character_animation_speed = 0
  505.          @character_index += 1
  506.          @character_index = 0 if @character_index >= @character_frame_max
  507.          make_character_bitmap   
  508.       end
  509.   end

  510. #--------------------------------------------------------------------------
  511. # ● Make Character_bitmap
  512. #--------------------------------------------------------------------------                        
  513.   def make_character_bitmap
  514.       @character.bitmap.clear
  515.       src_rect_back = Rect.new(@character_width * @character_index, 0,@character_width,@character_image.height)
  516.       @character.bitmap.blt(0,0, @character_image, src_rect_back)  
  517.   end

  518. #--------------------------------------------------------------------------
  519. # ● Update List Fade
  520. #--------------------------------------------------------------------------                       
  521.   def update_list_fade
  522.       @fade_time = @fade_max if moved?
  523.       slide_speed = 5
  524.       fade_speed = 3
  525.       if @fade_time > 0
  526.          @fade_time -= 1
  527.          @layout2.opacity += fade_speed * 2
  528.          @music_list_window.contents_opacity += fade_speed * 2
  529.          if @music_list_window.x < @music_list_window_org[0]
  530.             @music_list_window.x += slide_speed * 2
  531.             @layout2.x += slide_speed * 2
  532.             if @music_list_window.x >= @music_list_window_org[0]
  533.                @music_list_window.x = @music_list_window_org[0]
  534.                @layout2.x = @layout_org_position[0]
  535.             end  
  536.          end
  537.       else
  538.          @music_list_window.x -= slide_speed
  539.          @music_list_window.contents_opacity -= fade_speed
  540.          @layout2.x -= slide_speed
  541.          @layout2.opacity -= fade_speed
  542.          if @music_list_window.x < -544
  543.             @music_list_window.x = -544
  544.             @music_list_window.contents_opacity = 0
  545.             @layout2.x = -544
  546.             @layout2.opacity = 0         
  547.           end  
  548.       end
  549.   end  

  550. #--------------------------------------------------------------------------
  551. # ● Moved?
  552. #--------------------------------------------------------------------------                       
  553.   def moved?
  554.       return true if Input.trigger?(:C)
  555.       return true if Input.trigger?(:B)
  556.       return true if Input.trigger?(:X)
  557.       return true if Input.trigger?(:R)
  558.       return true if Input.trigger?(:L)
  559.       return true if Input.press?(Input.dir4)
  560.       return false
  561.   end  
  562.   
  563. #--------------------------------------------------------------------------
  564. # ● Update Commands
  565. #--------------------------------------------------------------------------                     
  566.   def update_commands
  567.       @music_list_window.update
  568.       if Input.trigger?(:B)
  569.          return_to_scene
  570.       elsif Input.trigger?(:C)
  571.          play_song
  572.       elsif Input.trigger?(:X)
  573.          stop_song
  574.       elsif Input.trigger?(:Y)
  575.          hide_layout
  576.       end  
  577.   end
  578.   
  579. #--------------------------------------------------------------------------
  580. # ● Return to Scene
  581. #--------------------------------------------------------------------------                           
  582.   def return_to_scene
  583.       return if @fade_time == 0 and @layout2.opacity == 0
  584.       Sound.play_cancel
  585.       SceneManager.return
  586.   end
  587.       
  588. #--------------------------------------------------------------------------
  589. # ● index_changed?
  590. #--------------------------------------------------------------------------                        
  591.   def index_changed?
  592.       if @old_index != @music_list_window.index
  593.          @old_index = @music_list_window.index
  594.          return true
  595.       end  
  596.       return false
  597.   end  
  598.   
  599. #--------------------------------------------------------------------------
  600. # ● Play Song
  601. #--------------------------------------------------------------------------                       
  602.   def play_song
  603.       return if $game_system.music_book_list.size == 0
  604.       return if @fade_time == 0 and @layout2.opacity == 0
  605.       if $game_system.music_book_list[@music_list_window.index][1]
  606.          if index_changed? or @stop
  607.             Sound.play_ok            
  608.             @stop = false
  609.             Audio.bgm_play("Audio/BGM/" +  song_name, 100, 100) rescue nil
  610.             make_background
  611.             make_now_playing
  612.           end  
  613.       else
  614.          Sound.play_buzzer
  615.       end      
  616.   end  
  617.   
  618. #--------------------------------------------------------------------------
  619. # ● Stop Song
  620. #--------------------------------------------------------------------------                        
  621.   def stop_song
  622.       Sound.play_ok
  623.       @stop = true
  624.       RPG::BGM.fade(3 * 1000)
  625.       make_now_playing(true)   
  626.   end  
  627. end

  628. if MOG_MUSIC_BOX::MENU_COMMAND
  629. #==============================================================================
  630. # ■ Window Menu Command
  631. #==============================================================================
  632. class Window_MenuCommand < Window_Command  
  633.   
  634. #------------------------------------------------------------------------------
  635. # ● Add Main Commands
  636. #------------------------------------------------------------------------------     
  637.   alias mog_musicbox_add_main_commands add_main_commands
  638.   def add_main_commands
  639.       mog_musicbox_add_main_commands
  640.       add_command(MOG_MUSIC_BOX::MENU_COMMAND_NAME, :musicbox, main_commands_enabled)
  641.   end
  642. end   

  643. #==============================================================================
  644. # ■ Scene Menu
  645. #==============================================================================
  646. class Scene_Menu < Scene_MenuBase
  647.   
  648. #------------------------------------------------------------------------------
  649. # ● Create Command Windows
  650. #------------------------------------------------------------------------------      
  651.    alias mog_musicbox_create_command_window create_command_window
  652.    def create_command_window
  653.        mog_musicbox_create_command_window
  654.        @command_window.set_handler(:musicbox,     method(:Music_Box))
  655.    end
  656.    
  657. #------------------------------------------------------------------------------
  658. # ● Music Box
  659. #------------------------------------------------------------------------------        
  660.    def Music_Box
  661.        SceneManager.call(Scene_Music_Box)
  662.    end

  663. end   

  664. end

  665. $mog_rgss3_music_box = true
复制代码
回复 支持 反对

使用道具 举报

david_ng223 该用户已被删除
4
发表于 2014-7-8 12:23:26 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-9-25 17:19

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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