RPGXP 스크립트
2011.06.22 08:04

그레고리우스력 원리.

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

단축키

Prev이전 문서

Next다음 문서

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

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
class Window_달력 < Window_Base
  #--------------------------------------------------------------------------
  # ● 오브젝트 초기화
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 160, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
    $year = 1502
    $month = 1
    $date = 1
  def 달력
    $date += 1
    if $month == 2 #2월일 경우
      if $year%4==0 #윤년
        if $date >= 30
          $month = 3
          $date = 1
        end
      else
        if $date >= 29
          $month = 3
          $date = 1
        end
      end
    else #2월이 아닌 경우
      if $month < 8 #1, 3, 4,5, 6, 7월
        if $month%2 == 0 #4, 6월
          if $date >= 31
          $month +=1
          $date = 1
          end
        else
          if $date >= 32
          $month +=1
          $date = 1
          end
        end
      else #8, 9, 10, 11, 12월
        if $month%2 == 0 #8, 10, 12월
          if $month == 12
            if $date >=32
            $month = 1
            $date = 1
            end
          else  
            if $date >=32
            $month +=1
            $date = 1
            end
          end
        else
          if $date >=31
          $month +=1
          $date = 1
          end         
        end       
      end
  end
end
 
 
  #--------------------------------------------------------------------------
  # ● 리프레쉬
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 120, 32, "날짜")
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 32, 120, 32, $year.to_s + "년" + $month.to_s + "월" + $date.to_s + "일", 2)
  end
 
  #--------------------------------------------------------------------------
  # ● 프레임 갱신
  #--------------------------------------------------------------------------
  def update
    super
    if Graphics.frame_count / Graphics.frame_rate != @total_sec
      refresh
    end
  end
end
?

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수 추천 수
268 RPGMV 플러그인 Wav 파일 암호화 도구 - RMMV 1 file 러닝은빛 2016.11.30 1231 1
267 RPGMV 플러그인 CSS 캔버스 필터 file 러닝은빛 2016.10.06 912 0
266 RPGMV 플러그인 화면 다중 분할 플러그인(Multiple Viewports) 러닝은빛 2016.08.25 1175 0
265 RPGMV 플러그인 텍스트 입력창(Keyboard Input Dialog) 1 file 러닝은빛 2016.08.09 1423 1
264 RPGXP 스크립트 Font Setup file 운님 2016.07.22 1447 0
263 RPGMV 플러그인 맵상에서 캐릭터 스프라이트 이미지를 offset해주는 플러그인 file lklslel 2016.07.19 1071 0
262 RPGMV 플러그인 Refresh Manager file 러닝은빛 2016.05.24 1382 1
261 RPGMV 플러그인 YouTube Player 6 file 러닝은빛 2016.05.08 1477 0
260 RPGMV 플러그인 이벤트 자동 추적 플러그인 2 file 러닝은빛 2016.04.27 2705 3
259 RPGMV 플러그인 픽쳐 터치 플러그인 1 양갱님 2016.04.17 2047 0
258 RPGMV 플러그인 이벤트 이름 표시하기 8 file 러닝은빛 2016.04.05 2094 1
257 RPGVX Ace 스크립트 VX Ace 용 8방향 이동 스크립트 1 도라지power 2016.03.17 1654 0
256 RPGMV 플러그인 Item Stream 2 file 러닝은빛 2016.03.08 3197 0
255 RPGXP 스크립트 대화에 얼굴이 나오는 스크립트 by: killarot(네이버 dust_mite)(수정버전) 1 부초 2016.02.22 1895 0
254 RPGVX Ace 스크립트 지속데미지 스크립트(MBS) 天下太平 2016.02.14 1516 0
253 RPGMV 플러그인 한글 이름 입력창 2.1v 2 file 맛난호빵 2016.02.12 2395 0
252 유니티 스크립트 화면에 이미지를 표시하는 스크립트(C#) 1 zerosium 2016.02.04 2370 0
251 RPGMV 플러그인 [plugin] YEP.58 – Item Synthesis (YEP엔진 아이템 합성 시스템) 2 plam 2016.01.21 2371 0
250 RPGMV 플러그인 윈도우 시스템 트레이로 최소화 2 file 러닝은빛 2016.01.21 2028 0
249 유니티 스크립트 유니티)캐릭터 좌우 이동 (C#) 4 zerosium 2016.01.05 979 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(김원배) | 사신지(김병국)