XP 스크립트

  RMXP SDK 1.x, 2.x와 RMVX를 참조하여 대충 만들어 본 Scene_Base입니다.  (개인적으로는 오브젝트 자동 업데이트와 자동처리가 있는 SDK 2.x의 Scene_Base가 쓰기 편합니다만) 

 

#Simple Scene_Base

class Scene_Base
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    main_variable
    main_spriteset
    main_window
    main_audio
    main_transition
    # Main loop
    loop do
      main_loop
      break if main_scenechange?
    end
    main_pre_terminate
    # Prepare for transition
    Graphics.freeze
    main_dispose
    main_terminate
  end
  #--------------------------------------------------------------------------
  # * Main Processing: Variable
  #--------------------------------------------------------------------------
  def main_variable ;end
  #--------------------------------------------------------------------------
  # * Main Processing: Spriteset
  #--------------------------------------------------------------------------
  def main_spriteset ;end
  #--------------------------------------------------------------------------
  # * Main Processing: Windows
  #--------------------------------------------------------------------------
  def main_window ;end
  #--------------------------------------------------------------------------
  # * Main Processing: Audio
  #--------------------------------------------------------------------------
  def main_audio ;end
  #--------------------------------------------------------------------------
  # * Main Processing: Transition
  #--------------------------------------------------------------------------
  def main_transition
    # Execute transition
    Graphics.transition
  end
  #--------------------------------------------------------------------------
  # * Main Loop
  #--------------------------------------------------------------------------
   def main_loop 
     # Update game screen
     Graphics.update
     # Update input information
     Input.update
     # Frame update
     update
   end
  #--------------------------------------------------------------------------
  # * Scene Change
  #--------------------------------------------------------------------------
  def main_scenechange?
    # Abort loop if screen is changed
    return $scene != self
  end
  #--------------------------------------------------------------------------
  # * Main Processing: Pre-termination
  #--------------------------------------------------------------------------
  def main_pre_terminate ;end
  #--------------------------------------------------------------------------
  # * Main Processing: Object Disposing
  #--------------------------------------------------------------------------
  def main_dispose ;end
  #--------------------------------------------------------------------------
  # * Main Processing: End
  #--------------------------------------------------------------------------
  def main_terminate ;end
end

 

 

**사용법:
  Scene_Base를 사용하는 스크립트는 class Scene_(이름) <Scene_Base로 현재 작성하는 클래스가 Scene_Base를 상속받음을 명시해야 합니다(상속이 맞나 모르겠네.... 배운 지 오래되어서).
그리고 (상속받은)상위 클래스에 정의된 것을 그대로 쓰고 싶다면 super를 써 준다든가.... 그런 식으로 하면 됩니다. 


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 7320
1021 메시지 Taylor's Simple Message System 2000 Alkaid 2020.07.05 315
1020 제작도구 [XP/VX/VXA] Doodad's Editor by newold Alkaid 2020.07.12 464
1019 이름입력 한글조합입력기(영어가능) file 조규진1 2019.11.10 589
1018 기타 [All RGSS] FileTest (Unicode) file Cheapmunk 2014.12.29 660
1017 전투 전투중에 장비들 교체하기 file 레이스89 2017.08.19 682
1016 기타 에어리어 설정 by RPG Advocate 백호 2009.02.22 735
1015 기타 Boat Script 백호 2009.02.21 752
1014 기타 Materia System file 백호 2009.02.21 767
1013 기타 Localization by ForeverZer0, KK20 습작 2013.04.26 767
1012 스킬 SG_Escape Only Skills by sandgolem (SDK호환) 백호 2009.02.22 773
1011 기타 killer님 요청하신 스크립트 두번째입니다. 나뚜루 2009.02.21 774
1010 기타 Letter by Letter Message Window by slipknot@rmxp.org (SDK호환) 1 file 백호 2009.02.22 775
1009 기타 Real-Time Day Night 3 백호 2009.02.22 777
1008 맵/타일 맵연결 스크립트 (데모첨부) file 게임애호가 2018.06.15 777
1007 스킬 Skill Requirements by SephirothSpawn (SDK호환) file 백호 2009.02.22 781
1006 기타 AMS-Advanced Message Script Edited by Dubleax 3 file 백호 2009.02.21 783
1005 기타 Sphere Grid System file 백호 2009.02.21 787
1004 기타 Activation_system file 백호 2009.02.22 787
1003 기타 Terrain Encounter Areas by SephirothSpawn 백호 2009.02.22 792
1002 전투 전투 관련 횟수 취득 스크립트 백호 2009.02.21 794
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 52 Next
/ 52