질문과 답변

Extra Form
class DP3_WindowThingy < Window_Base

def initialize()

super(50, 50, 200, 200) 

end #def 닫음

def change_text(text)

return unless text.is_a?(String)
contents.clear #이것을 써야 말이 계속 겹치지 않는다.
draw_text(text, 10, 10, 200, 200)

end #def 닫음

def draw_text(text, x, y, text_width, text_height, alignment = 0)
  
contents.draw_text(x, y, text_width, text_height, text, alignment)

end #def 닫음

end #class 닫음

이 스크립트를 실행하면 커스텀 윈도우가 생기는데 게임을 종료하지 않는 이상 계속 계속 떠있습니다.
결정버튼(C버튼)을 눌렀을 때 사라지게 하려면 어떻게 할 수 있는 지 알려주시면 감사하겠습니다.

Who's REMAIN

profile

잉여맨


만든 게이ㅁ


REMAIN WORLD

REMAIN WORLD 2

짙은 안개 낀 낙원


제작 중 게이ㅁ


쌍둥이별 이야기(harmony of twin star)


제작중단


JUNKGIRL(2014 03 25)


블로그: http://blog.naver.com/zxce12

메에에에에일 zxce12@naver.com

Comment '2'
  • ?
    AltusZeon 2014.01.20 00:08

    씬에 대한 설명을 게시문에 적어두시지 않았기에 개요를 설명해드리겠습니다.

    윈도우나 씬에 존재하는 update 메소드를 이용합니다.
    씬의 update 메소드는 매 프레임마다 호출되는 메소드입니다.

    1. 윈도우에서 정의하는 경우
    # 씬 update 메소드에 해당 윈도우 update 메소드를 추가하셔야 합니다.
    # Scene
    def update
    @window.update
    end
    # Window
    def update
    self.dispose if Input.trigger?(:C)
    end

    2. 씬에서 정의하는 경우
    # Scene
    def update
    @window.dispose if Input.trigger?(:C)
    end

  • profile
    REMAIN 2014.01.20 06:37
    답변해주셔서 정말 감사합니다ㅠㅠㅠㅠ

List of Articles
종류 분류 제목 글쓴이 날짜 조회 수
공지 묻고 답하기 가이드 습작 2014.06.14 12450
Board Pagination Prev 1 ... 19 Next
/ 19