RPGXP 스크립트
2011.06.22 08:04

그레고리우스력 원리.

조회 수 2758 추천 수 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
번호 분류 제목 글쓴이 날짜 조회 수 추천 수
228 RPGMV 플러그인 게임시작하면 바로 뉴게임으로 가는 플러그인! 1 willmv 2015.11.07 930 0
227 RPGXP 스크립트 UNR (아시려나... ) - 상태 이상 2 file 동동주 2013.01.20 937 0
226 RPGVX Ace 스크립트 Random Dungeon Generator - Random Room 7 JunkMan 2014.10.11 939 0
225 RPGXP 스크립트 플레이어 발소리 스크립트 1 청담 2013.09.24 941 0
224 RPGMV 플러그인 오렌지 - 타임 시스템 플러그인(Time system). (게임 시간시스템 관련) 4 plam 2015.11.07 948 1
223 RPGXP 스크립트 아이템 사용 클래스 한정 스크립트 청담 2013.09.24 949 0
222 RPGXP 스크립트 RPG XP Xas액알 1 file 심심치 2018.10.30 952 0
221 RPGMV 플러그인 Ghost Effect 러닝은빛 2019.01.20 954 0
220 RPGMV 플러그인 Menu Music MV (메뉴를 열때 음악을 콘트롤 하는 플러그인) 1 파란별빛 2015.11.09 968 0
219 RPGMV 플러그인 Wave Filter 1 러닝은빛 2016.01.14 969 0
218 RPGXP 스크립트 현재위치&임무 표시 2 2013.10.01 969 0
217 RPGVX Ace 스크립트 RPG Maker VX Lite Maze(미로) 만들기 (DFS 사용) 1 JunkMan 2014.10.06 983 2
216 유니티 스크립트 유니티)캐릭터 좌우 이동 (C#) 4 zerosium 2016.01.05 986 0
215 RPGXP 스크립트 창고 시스템 1 청담 2013.09.24 988 0
214 RPGXP 스크립트 화면의 쉐이크를 더 어지럽게 바꿔보자! 2013.10.01 990 0
213 RPGXP 스크립트 밤낮 설정 3 2013.10.01 996 0
212 RPGXP 스크립트 아이템 소지수 무제한 스크립트 청담 2013.09.24 1004 0
211 RPGXP 스크립트 상점 메뉴 개조시킨 스크립트 1 청담 2013.09.24 1008 0
210 RPGMV 플러그인 EnemyBook v1.1 - SkottyTV Update(몬스터북 플러그인) plam 2015.10.27 1011 0
209 RPGXP 스크립트 c[n] 명령어 줄때의 색상 결정. 창조도시 2008.02.14 1019 1
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(김원배) | 사신지(김병국)