RPGXP 스크립트
2013.09.24 08:08

경험치 표시 스크립트

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

단축키

Prev이전 문서

Next다음 문서

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

단축키

Prev이전 문서

Next다음 문서

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

class Game_Actor < Game_Battler 
  def exp_rate 
    if @exp_list[@level+1] - @exp_list[@level] > 0 
      return (@exp - @exp_list[@level]).to_f / (@exp_list[@level+1] - @exp_list[@level]).to_f 
    else 
      return 0 
    end 
  end 
end 
class Window_ExpRate < Window_Base 
  def initialize 
    super(0, 0, 125, 55) # <- location, size 
    self.contents = Bitmap.new(width - 32, height - 32) 
    
    self.contents.font = Font.new("궁서체", 16) # <- font, size 
    self.opacity = 0 
self.back_opacity = 0 
  end 
  def refresh 
    self.contents.clear 
    self.contents.draw_text(0, 0, 100, 30, @show_text) 
  end 
  def actor 
    $game_party.actors[0] # <- 파티 0번째 
  end 
  def update 
    super 
    text = sprintf("경험치: %d%%", (actor.exp_rate * 100).to_i) 
    if @show_text != text 
      @show_text = text 
      refresh 
    end 
  end 
end 
class Scene_Map 
  alias update_before_map update 
  def update 
    update_before_map 
    @window_exp = Window_ExpRate.new unless @window_exp 
    @window_exp.update 
    unless $scene.is_a?(Scene_Map) 
      @window_exp.dispose 
      @window_exp = nil 
    end 
  end 
end 


출처: 게임공작소

?

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수 추천 수
188 RPGMV 플러그인 Ghost Effect 러닝은빛 2019.01.20 945 0
187 RPGXP 스크립트 RPG XP Xas액알 1 file 심심치 2018.10.30 941 0
186 RPGMV 플러그인 9마리 이상의 몬스터 설정 | More Enemies 러닝은빛 2018.08.31 766 0
185 RPGMV 플러그인 동적 맵 타일 수정 플러그인 베지테리안카카오 2018.07.17 823 0
184 RPGVX Ace 스크립트 VXA에서 XBOX360 컨트롤러 사용 여부 체크 file 러닝은빛 2018.07.15 695 0
183 RPGMV 플러그인 RMMV 옵션 창에 메시지 속도 및 글자 크기 변경 기능 추가 file 러닝은빛 2018.07.15 1407 0
182 RPGMV 플러그인 한글 데미지 표시 file 러닝은빛 2018.07.09 1203 0
181 RPGMV 플러그인 [ MV ] 심장[체력표시 하트] 플러그인 file 수성의물 2018.07.01 1990 0
180 RPGMV 플러그인 [鳥小屋] 실적 플러그인(인게임 트로피 시스템) file 이니군 2017.10.31 1552 0
179 RPGVX Ace 스크립트 [VXAce] 레이어 맵 <layer> 시스템 file LuD 2017.08.07 1045 0
178 RPGMV 플러그인 [RPG MV] 퀘스트 마커 지속 표시 플러그인 file lklslel 2017.04.09 1416 0
177 RPGMV 플러그인 Mirror Area - RPG Maker MV 2 file 러닝은빛 2017.01.03 4746 0
176 RPGMV 플러그인 Keyboard Event - RPG Maker MV 1 러닝은빛 2017.01.03 2084 0
175 RPGMV 플러그인 CSS 캔버스 필터 file 러닝은빛 2016.10.06 916 0
174 RPGMV 플러그인 화면 다중 분할 플러그인(Multiple Viewports) 러닝은빛 2016.08.25 1179 0
173 RPGXP 스크립트 Font Setup file 운님 2016.07.22 1450 0
172 RPGMV 플러그인 맵상에서 캐릭터 스프라이트 이미지를 offset해주는 플러그인 file lklslel 2016.07.19 1074 0
171 RPGVX Ace 스크립트 VX Ace 용 8방향 이동 스크립트 1 도라지power 2016.03.17 1657 0
170 RPGMV 플러그인 Item Stream 2 file 러닝은빛 2016.03.08 3201 0
169 RPGVX Ace 스크립트 지속데미지 스크립트(MBS) 天下太平 2016.02.14 1519 0
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 15 Next
/ 15






[개인정보취급방침] | [이용약관] | [제휴문의] | [후원창구] | [인디사이드연혁]

Copyright © 1999 - 2016 INdiSide.com/(주)씨엘쓰리디 All Rights Reserved.
인디사이드 운영자 : 천무(이지선) | kernys(김원배) | 사신지(김병국)