2010.10.15 23:46

T?tulo Final Fantasy

조회 수 3009 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 첨부
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 첨부
Extra Form

##############################################################
# Script By Johnny Mercy
# Program: Rpg Maker VX
# Language: RGSS2
##############################################################
# Class SceneTittle
##############################################################

class Scene_Title < Scene_Base
 
  #--------------------------------------------------------------------------
  # Processo principal
  #--------------------------------------------------------------------------
  def main
    if $BTEST                         # Se for teste de batalha
      battle_test                     # Teste inicia
    else                              # Se voc? est? jogando normal
      super                           # V? ao processo principal
    end
  end
  #--------------------------------------------------------------------------
  # Inicializa??o do processo
  #--------------------------------------------------------------------------
  def start
   
    load_database                     # Carrega o banco de dados
    create_game_objects               # Cria os objetos do jogo
    check_continue                    # Verifica se h? arquivos salvos
    play_title_music                  # Toca a m?sica de T?tulo
   
    #----------------------------------------------------------------------
    # Configura??es
    #----------------------------------------------------------------------
 
    #Nome da Imagem de Background
    @nBgImage = "FFBg"
   
    #Nome da imagem do selector
    @nSelector = "handpick"
   
    #Nome das imagens dos explicadores
    @nexp1 = "exp1"
    @nexp2 = "exp2"
    @nexp3 = "exp3"
   
    #Nome das imagens do menu do t?tulo
    @nnew_game = "new_game"
    @ncontinue = "continue"
    @nexit = "exit"
   
    #----------------------------------------------------------------------
    # Fim das Configura??es
    #----------------------------------------------------------------------
   
    @SelectorStartPos = 112
    @handmov = "left"
    @menu_index = 0
    load_images()
   
  end
  #--------------------------------------------------------------------------
  # Atualiza??o da tela
  #--------------------------------------------------------------------------
  def update
    current_menu_index()
    selector_animation()
    keyboard_input()
  end
  #--------------------------------------------------------------------------
  # Fim do processo
  #--------------------------------------------------------------------------
  def terminate
    @bg.dispose
    @new_game.dispose
    @continue.dispose
    @exit.dispose
    @exp1.dispose
    @exp2.dispose
    @exp3.dispose
    @selector.dispose
  end
 
  def keyboard_input
    if Input.trigger?(Input::DOWN) and @menu_index < 2
      @menu_index += 1
      Sound.play_cursor
    elsif Input.trigger?(Input::DOWN) and @menu_index == 2
      @menu_index = 0
      Sound.play_cursor
    elsif Input.trigger?(Input::UP) and @menu_index > 0
      @menu_index -= 1
      Sound.play_cursor
    elsif Input.trigger?(Input::UP) and @menu_index == 0
      @menu_index = 2
      Sound.play_cursor
    end
    if Input.trigger?(Input::C)
      case @menu_index
      when 0   
        command_new_game
      when 1   
        command_continue
      when 2   
        command_shutdown
      end
    end
  end
  #--------------------------------------------------------------------------
  # Actualiza??es do Menu
  #--------------------------------------------------------------------------
  def current_menu_index
    case @menu_index
      when 0
        menu_opacity(255,160,160)
        exp_opacity(255,0,0)
      when 1
        menu_opacity(160,255,160)
        exp_opacity(0,255,0)
      when 2
        menu_opacity(160,160,255)
        exp_opacity(0,0,255)
    end
    @selector.y = 252 + (20 * @menu_index)
  end
  #--------------------------------------------------------------------------
  # Opacidade dos items do Menu
  #--------------------------------------------------------------------------
  def menu_opacity(a,b,c)
    @new_game.opacity = a
    @continue.opacity = b
    @exit.opacity = c
    @new_game.update
    @continue.update
    @exit.update
  end
  #--------------------------------------------------------------------------
  # Opacidade das explica??es
  #--------------------------------------------------------------------------
  def exp_opacity(a,b,c)
    @exp1.opacity = a
    @exp2.opacity = b
    @exp3.opacity = c
    @exp1.update
    @exp2.update
    @exp3.update
  end
  #--------------------------------------------------------------------------
  # Anima??o do Selector
  #--------------------------------------------------------------------------
  def selector_animation
     if (@handmov == "left" and @selector.x > (@SelectorStartPos - 10))
      @selector.x -= 1
    elsif (@handmov == "left" and @selector.x <= (@SelectorStartPos - 10))
      @selector.x = @SelectorStartPos - 10
      @handmov = "right"
    end
    if (@handmov == "right" and @selector.x < @SelectorStartPos)
       @selector.x += 1
     elsif (@handmov == "right" and @selector.x >= @SelectorStartPos)
       @selector.x = @SelectorStartPos
       @handmov = "left"
    end
    @selector.update
  end
  #--------------------------------------------------------------------------
  # Carregamento de Imagens usadas no t?tulo
  #--------------------------------------------------------------------------
  def load_images
    #Background
    @bg = Sprite.new
    @bg.bitmap = Cache.picture(@nBgImage)
    #Menu
    @new_game = Sprite.new
    @new_game.bitmap = Cache.picture(@nnew_game)
    @new_game.x = 149
    @new_game.y = 253
    @continue = Sprite.new
    @continue.bitmap = Cache.picture(@ncontinue)
    @continue.x = 149
    @continue.y = 253 + 20
    @exit = Sprite.new
    @exit.bitmap = Cache.picture(@nexit)
    @exit.x = 149
    @exit.y = 253 + 40
    #Explica??es
    @exp1 = Sprite.new
    @exp1.bitmap = Cache.picture(@nexp1)
    @exp1.x = 285
    @exp1.y = 262
    @exp2 = Sprite.new
    @exp2.bitmap = Cache.picture(@nexp2)
    @exp2.x = @exp1.x
    @exp2.y = @exp1.y
    @exp3 = Sprite.new
    @exp3.bitmap = Cache.picture(@nexp3)
    @exp3.x = @exp1.x
    @exp3.y = @exp1.y
    #Selector
    @selector = Sprite.new
    @selector.bitmap = Cache.picture(@nSelector)
    @selector.x = @SelectorStartPos
    @selector.y = 252
  end
  #--------------------------------------------------------------------------
  # Carregamento do banco de dados
  #--------------------------------------------------------------------------
  def load_database
    $data_actors        = load_data("Data/Actors.rvdata")
    $data_classes       = load_data("Data/Classes.rvdata")
    $data_skills        = load_data("Data/Skills.rvdata")
    $data_items         = load_data("Data/Items.rvdata")
    $data_weapons       = load_data("Data/Weapons.rvdata")
    $data_armors        = load_data("Data/Armors.rvdata")
    $data_enemies       = load_data("Data/Enemies.rvdata")
    $data_troops        = load_data("Data/Troops.rvdata")
    $data_states        = load_data("Data/States.rvdata")
    $data_animations    = load_data("Data/Animations.rvdata")
    $data_common_events = load_data("Data/CommonEvents.rvdata")
    $data_system        = load_data("Data/System.rvdata")
    $data_areas         = load_data("Data/Areas.rvdata")
  end
  #--------------------------------------------------------------------------
  # Carregamento do banco de dados para teste de batalha
  #--------------------------------------------------------------------------
  def load_bt_database
    $data_actors        = load_data("Data/BT_Actors.rvdata")
    $data_classes       = load_data("Data/BT_Classes.rvdata")
    $data_skills        = load_data("Data/BT_Skills.rvdata")
    $data_items         = load_data("Data/BT_Items.rvdata")
    $data_weapons       = load_data("Data/BT_Weapons.rvdata")
    $data_armors        = load_data("Data/BT_Armors.rvdata")
    $data_enemies       = load_data("Data/BT_Enemies.rvdata")
    $data_troops        = load_data("Data/BT_Troops.rvdata")
    $data_states        = load_data("Data/BT_States.rvdata")
    $data_animations    = load_data("Data/BT_Animations.rvdata")
    $data_common_events = load_data("Data/BT_CommonEvents.rvdata")
    $data_system        = load_data("Data/BT_System.rvdata")
  end
  #--------------------------------------------------------------------------
  # Cria??o dos objetos do jogo
  #--------------------------------------------------------------------------
  def create_game_objects
    $game_temp          = Game_Temp.new
    $game_message       = Game_Message.new
    $game_system        = Game_System.new
    $game_switches      = Game_Switches.new
    $game_variables     = Game_Variables.new
    $game_self_switches = Game_SelfSwitches.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
  end
  #--------------------------------------------------------------------------
  # Verifica se h? arquivos salvos
  #--------------------------------------------------------------------------
  def check_continue
    @continue_enabled = (Dir.glob('Save*.rvdata').size > 0)
  end
  #--------------------------------------------------------------------------
  # Verifica se h? uma Posi??o Inicial de Personagem
  #--------------------------------------------------------------------------
  def confirm_player_location
    if $data_system.start_map_id == 0
      print "A Posi??o Inicial de Personagem n?o foi definida."
      exit
    end
  end
  #--------------------------------------------------------------------------
  # Comando: Novo Jogo
  #--------------------------------------------------------------------------
  def command_new_game
    confirm_player_location
    Sound.play_decision
    $game_party.setup_starting_members            # A equipe (party) inicial
    $game_map.setup($data_system.start_map_id)    # Posi??o inicial no mapa
    $game_player.moveto($data_system.start_x, $data_system.start_y)
    $game_player.refresh
    $scene = Scene_Map.new
    RPG::BGM.fade(1500)
    Graphics.fadeout(60)
    Graphics.wait(40)
    Graphics.frame_count = 0
    RPG::BGM.stop
    $game_map.autoplay
  end
  #--------------------------------------------------------------------------
  # Comando: Continuar
  #--------------------------------------------------------------------------
  def command_continue
    if @continue_enabled
      Sound.play_decision
      $scene = Scene_File.new(false, true, false)
    else
      Sound.play_buzzer
    end
  end
  #--------------------------------------------------------------------------
  # Comando: Sair
  #--------------------------------------------------------------------------
  def command_shutdown
    Sound.play_decision
    RPG::BGM.fade(800)
    RPG::BGS.fade(800)
    RPG::ME.fade(800)
    $scene = nil
  end
  #--------------------------------------------------------------------------
  # Toca a m?sica de t?tulo
  #--------------------------------------------------------------------------
  def play_title_music
    $data_system.title_bgm.play
    RPG::BGS.stop
    RPG::ME.stop
  end
  #--------------------------------------------------------------------------
  # Teste de batalha
  #--------------------------------------------------------------------------
  def battle_test
    load_bt_database                  # Carrega o banco de dados para o teste
    create_game_objects               # Cria os objetos do jogo
    Graphics.frame_count = 0          # Inicializa??o da contagem de frames
    $game_party.setup_battle_test_members
    $game_troop.setup($data_system.test_troop_id)
    $game_troop.can_escape = true
    $game_system.battle_bgm.play
    snapshot_for_background
    $scene = Scene_Battle.new
  end
end

 

 

 

 

 

 

 

 


  1. 일본어 스크립트를 번역하기 좋은 번역사이트 두곳입니다

  2. 스크립트 게시판 관리자' ruby ' 입니다

  3. 일본 스크립트/소스 공유 포럼

  4. 자동저장 스크립트

  5. HG_SHOOT_ANIMATION

  6. HG_LIMIT_CARRY

  7. RPG XP Web Kit

  8. ruby-1.9.1-p429 Standard Pack

  9. 루비 html 라이브러리

  10. T?tulo Final Fantasy

  11. 전투시 화면 확대..!

  12. 상태창표시 스크립투 Ver 6.0

  13. Cacao 엔진 출처사이트의 스크립트 모움

  14. XP 형식 메뉴

  15. 온라인

  16. MYSQL 사용할 수 있게 하는 스크립트

  17. 얼굴 띄워주는 기능&대화창 명령어

  18. 한 글자씩 대화창에 띄웁니다.

  19. 메뉴에 얼굴 그래픽을 표현

  20. 온라인

  21. 메뉴를 바꿉니다.

  22. HG_QUEST_SYSTEM

  23. HG_Variables : 변수 확장 시스템

Board Pagination Prev 1 2 3 4 5 6 7 Next
/ 7

Copyright ⓒ Nioting All Rights Reserved. (since 1999)    개인정보
        

Fatal error: Cannot access property sessionController::$lifetime in /web/old/xe/modules/session/session.controller.php on line 45