RPGXP 스크립트
2011.06.22 08:04

그레고리우스력 원리.

조회 수 2509 추천 수 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
번호 분류 제목 글쓴이 날짜 조회 수 추천 수
48 RPGMV 플러그인 MBS - Map Zoom plugin (맵을 확대,축소해주는 플러그인) HT9MAN 2016.01.06 909 0
47 RPGMV 플러그인 Icon Inventory and Details Window (인벤토리 아이템을 아이콘으로 보이게) plam 2016.01.06 915 0
46 RPGMV 플러그인 Advanced Game Time (게임에 시간개념을 적용해주는 플러그인) 2 plam 2016.01.06 1404 0
45 RPGMV 플러그인 Crafting System (아이템 조합 시스템) 3 plam 2016.01.06 1732 0
44 RPGVX Ace 스크립트 Damage Popup by Dargor (데미지 수치 팝업하는 스크립트) plam 2016.01.10 624 0
43 RPGVX Ace 스크립트 Custom Icon Sheets (커스텀 아이콘 적용 스크립트) plam 2016.01.10 478 0
42 RPGMV 플러그인 Multiple HUD 6 file 러닝은빛 2016.01.12 2863 1
41 RPGMV 플러그인 전투 도중 멤버교체가 가능해지는 플러그인 2 file Wailer 2016.01.13 1306 0
40 RPGMV 플러그인 Wave Filter 1 러닝은빛 2016.01.14 969 0
39 RPGMV 플러그인 윈도우 시스템 트레이로 최소화 2 file 러닝은빛 2016.01.21 2034 0
38 RPGMV 플러그인 [plugin] YEP.58 – Item Synthesis (YEP엔진 아이템 합성 시스템) 2 plam 2016.01.21 2384 0
37 유니티 스크립트 화면에 이미지를 표시하는 스크립트(C#) 1 zerosium 2016.02.04 2379 0
36 RPGMV 플러그인 한글 이름 입력창 2.1v 2 file 맛난호빵 2016.02.12 2434 0
35 RPGVX Ace 스크립트 지속데미지 스크립트(MBS) 天下太平 2016.02.14 1528 0
34 RPGXP 스크립트 대화에 얼굴이 나오는 스크립트 by: killarot(네이버 dust_mite)(수정버전) 1 부초 2016.02.22 1906 0
33 RPGMV 플러그인 Item Stream 2 file 러닝은빛 2016.03.08 3205 0
32 RPGVX Ace 스크립트 VX Ace 용 8방향 이동 스크립트 1 도라지power 2016.03.17 1669 0
31 RPGMV 플러그인 이벤트 이름 표시하기 8 file 러닝은빛 2016.04.05 2100 1
30 RPGMV 플러그인 픽쳐 터치 플러그인 1 양갱님 2016.04.17 2068 0
29 RPGMV 플러그인 이벤트 자동 추적 플러그인 2 file 러닝은빛 2016.04.27 2719 3
Board Pagination Prev 1 ... 6 7 8 9 10 11 12 13 14 15 Next
/ 15






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

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