고급강의실
2014.06.19 08:15

배틀창 이름 체력 레벨 좌표 변경하기

조회 수 1032 추천 수 0 댓글 1
?

단축키

Prev이전 문서

Next다음 문서

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

단축키

Prev이전 문서

Next다음 문서

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

다 아실거라 생각합니다만......

그래도 모르실 분을 위해......

#==============================================================================
# ■ Window_BattleStatus
#------------------------------------------------------------------------------
#  배틀 화면에서 파티 멤버의 스테이터스를 표시하는 윈도우입니다.
#==============================================================================

class Window_BattleStatus < Window_Base
  #--------------------------------------------------------------------------
  # ● 공개 인스턴스 변수
  #--------------------------------------------------------------------------
  attr_accessor :battler                  # 버틀러
  #--------------------------------------------------------------------------
  # ● 오브젝트 초기화
  #--------------------------------------------------------------------------
  def initialize()
    super(0, 320, 640, 160)
    self.contents = Bitmap.new(width - 256, height - 32)
    @level_up_flags = [false, false, false, false]
    refresh
  end
  #-----------------------------------------------------------------
  # ● 레벨업 플래그의 설정
  #     actor_index : 액터 인덱스
  #--------------------------------------------------------------------------
  def level_up(actor_index)
    @level_up_flags[actor_index] = true
  end
  #--------------------------------------------------------------------------
  # ● 리프레쉬
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = $game_party.actors.size
    for i in 0...$game_party.actors.size
      actor = $game_party.actors[i]
      actor_x = i * 160 + 4
      draw_actor_name(actor, actor_x + 250, 0)   << 이 부분에서 받아온 actor의 x값에 +@를 해주시면 됩니다.
      draw_actor_hp(actor, actor_x + 220, 32, 120)
      draw_actor_sp(actor, actor_x + 220, 64, 120
)
     self.contents.draw_text(actor_x + 300, 96, 120, 32, "KOSMOS")
      if @level_up_flags[i]
        self.contents.font.color = normal_color
        self.contents.draw_text(actor_x, 96, 120, 32, "LEVEL UP!")
      else
        draw_actor_state(actor, actor_x + 180, 96)
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신
  #--------------------------------------------------------------------------
  def update
    super
    # 메인 국면 때는 불투명도를 약간 내린다
    if $game_temp.battle_main_phase
      self.contents_opacity -= 4 if self.contents_opacity > 191
    else
      self.contents_opacity += 4 if self.contents_opacity < 255
    end
  end
end

 

배틀스테이터스 상태창 하단에 제 나름대로 메세지를 넣어봤습니다만, MP색 바뀌면 색깔이 같이 바뀌는건 많이 슬프죠......

위에 올려진 좌표는 전부 중앙에 위치되어있습니다.

나름 깔끔하다고 생각합니다.

?

  1. 게임제작강좌 A-Z 색인 (2016.1.24 ver)

    Date2016.01.12 Category초급강의실 By천무 Views7383 Votes1
    read more
  2. 타이틀에 동영상을 넣는 플러그인 사용법

    Date2016.01.08 Category고급강의실 By러닝은빛 Views2589 Votes1
    Read More
  3. 캐릭터그래픽 픽셀

    Date2014.07.19 Category고급강의실 By 운 Views3621 Votes0
    Read More
  4. 카카오소프트 님의 RGSS2 스크립트 강좌

    Date2014.03.27 Category고급강의실 ByOmegaroid Views1667 Votes0
    Read More
  5. 처음부터 전체화면으로 시작하기

    Date2015.12.21 Category고급강의실 By러닝은빛 Views4121 Votes0
    Read More
  6. 죽노의 RGSS 이것저것(1)

    Date2013.10.23 Category고급강의실 By죽은노예 Views2129 Votes1
    Read More
  7. 아이템 한번에 받기

    Date2014.08.24 Category고급강의실 By 운 Views1147 Votes0
    Read More
  8. 배틀창 이름 체력 레벨 좌표 변경하기

    Date2014.06.19 Category고급강의실 BySeed Views1032 Votes0
    Read More
  9. 뮤's 실전 스크립팅 강좌 [5. 실전! 반복문을 응용하자!]

    Date2013.09.16 Category고급강의실 By마니아 Views1411 Votes0
    Read More
  10. 뮤's 실전 스크립팅 강좌 [4. 실전! 플래싱 메시지를 만들어보자]

    Date2013.09.16 Category고급강의실 By마니아 Views2082 Votes0
    Read More
  11. 뮤's 실전 스크립팅 강좌 [3. 기초 문법 다지기 (하)]

    Date2013.09.16 Category고급강의실 By마니아 Views1145 Votes0
    Read More
  12. 뮤's 실전 스크립팅 강좌 [2. 기초 문법 다지기 (중)]

    Date2013.09.16 Category고급강의실 By마니아 Views1371 Votes0
    Read More
  13. 뮤's 실전 스크립팅 강좌 [1. 기초 문법 다지기 (상)]

    Date2013.09.16 Category고급강의실 By마니아 Views2351 Votes0
    Read More
  14. 네코 플레이어 메세지 활용하기

    Date2015.09.01 Category고급강의실 By 운 Views571 Votes2
    Read More
  15. 나뚜루's - 배열, 이렇게도 만들 수 있다.

    Date2013.09.17 Category고급강의실 By마니아 Views2101 Votes0
    Read More
  16. 나뚜루's - Sprite 클래스 파헤치기 [4]

    Date2013.09.17 Category고급강의실 By마니아 Views2040 Votes1
    Read More
  17. 나뚜루's - Sprite 클래스 파헤치기 [3]

    Date2013.09.17 Category고급강의실 By마니아 Views1503 Votes0
    Read More
  18. 나뚜루's - Sprite 클래스 파헤치기 [2]

    Date2013.09.17 Category고급강의실 By마니아 Views1781 Votes0
    Read More
  19. 나뚜루's - Sprite 클래스 파헤치기 [1]

    Date2013.09.17 Category고급강의실 By마니아 Views2086 Votes0
    Read More
  20. 기본 게임 폰트를 다른 폰트로 바꾸기

    Date2015.12.21 Category고급강의실 By러닝은빛 Views7315 Votes0
    Read More
  21. 그림표시50개끝? 51개 해보자.

    Date2014.12.01 Category고급강의실 By 운 Views1191 Votes1
    Read More
Board Pagination Prev 1 2 3 4 Next
/ 4






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

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