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

 

 

 

 

 

 

 

 


List of Articles
분류 제목 글쓴이 날짜 조회 수 추천 수
공지사항 일본어 스크립트를 번역하기 좋은 번역사이트 두곳입니다 ruby 2010.01.09 22086 0
공지사항 스크립트 게시판 관리자' ruby ' 입니다 ruby 2010.01.09 20726 0
공지사항 일본 스크립트/소스 공유 포럼 4 니오티 2010.01.05 22257 0
세이브 자동저장 스크립트 2 레오 2010.12.23 3201 0
HG_SHOOT_ANIMATION file 허걱 2010.11.21 2424 0
HG_LIMIT_CARRY file 허걱 2010.11.11 2066 0
온라인 RPG XP Web Kit 1 file 니오티 2010.11.05 3031 0
ruby-1.9.1-p429 Standard Pack file 니오티 2010.11.05 1874 0
공통 Script 루비 html 라이브러리 file 펜릴 2010.11.05 2833 0
T?tulo Final Fantasy file dizman 2010.10.15 3009 0
전투시 화면 확대..! 2 dizman 2010.10.15 2536 0
기타 상태창표시 스크립투 Ver 6.0 4 file 코아 코스튬 2010.09.21 2412 2
Cacao 엔진 출처사이트의 스크립트 모움 ruby 2010.08.02 2217 0
XP 형식 메뉴 2 file Jenpia 2010.07.29 3641 0
온라인 온라인 11 file 개임 매니저 2010.07.27 2232 0
MYSQL 사용할 수 있게 하는 스크립트 3 file 독도2005 2010.07.25 2774 0
대화관련 얼굴 띄워주는 기능&대화창 명령어 14 file 니오티 2010.07.23 2904 0
메시지 한 글자씩 대화창에 띄웁니다. 1 file 니오티 2010.07.23 1870 0
메뉴관련 메뉴에 얼굴 그래픽을 표현 2 file 니오티 2010.07.23 1840 0
온라인 온라인 11 file 개임 매니저 2010.07.21 2117 0
메뉴를 바꿉니다. 3 file Aqua 2010.06.19 3210 2
HG_QUEST_SYSTEM 7 file 허걱 2010.06.18 3598 1
HG_Variables : 변수 확장 시스템 2 file 허걱 2010.06.14 2559 1
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