XP 스크립트

http://www.dubealex.com/asylum/index.php?showtopic=9830
여러 개의 png파일을 사용한 애니메이션 처리. 단, 이 스크립트는 암호화된 프로젝트에서는 정상적으로 동작하지 않을 수 있습니다.


#==============================================================================
# ** Quick Animations
#==============================================================================
# SephirothSpawn
# Version 1
# 2006-07-06
#------------------------------------------------------------------------------
# * Instructions
#
# ~ Creating Animation
#
# = Quick_Animation.new(directory, loop, frame_skip, viewport)
#
# directory : Directory in your Projects Folder for the image
# loop : true (image loops) or false (image plays and disposes itself)
# frame_skip : number of frames to proceed to next image
# viewport : viewport of image
#
# ~ Object must update, or frames won't pass through.
# ~ Don't update a object after it disposes. A quick way around of this
#
#.update unless.nil? ||.disposed?
#==============================================================================

#------------------------------------------------------------------------------
# * SDK Log Script-x
#------------------------------------------------------------------------------
SDK.log('Quick Animations', 'SephirothSpawn', 1, '2006-07-06')

#------------------------------------------------------------------------------
# * Begin SDK Enable Test
#------------------------------------------------------------------------------
if SDK.state('Quick Animations') == true

#==============================================================================
# ** Quick_Animation
#==============================================================================

class Quick_Animation < Sprite
#--------------------------------------------------------------------------
# * Object Initialization
# ~ directory : foldername in Pictures Folder
# ~ loop : true or false to loop or not loop image
# ~ frame_skip : number of frames to advance next image
# ~ viewport : viewport on window
#--------------------------------------------------------------------------
def initialize(directory, loop = true, frame_skip = 10, viewport = nil)
super(viewport)
# Stores Directory, Loop & Frame Skip Count
@directory, @loop, @frame_skip = directory, loop, frame_skip
# Starts Index Count
@index = 0
# Updates Bitmap
update
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Stop Unless Frame Skip Reached
return unless Graphics.frame_count % @frame_skip == 0
# Adds 1 to the index
@index += 1
# If not Last Image
if Dir.entries(@directory).include?("#{@index}.png")
# Sets Bitmap
self.bitmap = RPG::Cache.load_bitmap(@directory, @index.to_s)
# If Last Image Already Displayed
else
# If Loop Image
if @loop
# Reset Index & Update Bitmap
@index = 0
update
# If No Loop
else
# Delete Image
self.dispose
end
end
end
end

#--------------------------------------------------------------------------
# * End SDK Enable Test
#--------------------------------------------------------------------------
end

Who's 백호

?

이상혁입니다.

http://elab.kr


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6203
281 전투 Real Time Active Battle(RTAB) 1.14 from 歯車の城 3 file 백호 2009.02.22 1315
280 기타 Rataime's Multi Demo 1 file 백호 2009.02.22 834
279 맵/타일 Random Map Generator by Wachunga@rmxp.net file 백호 2009.02.22 1096
278 기타 Random Character Generator by SephirothSpawn (SDK호환) 1 백호 2009.02.22 1041
» 기타 Quick Animations by SephirothSpawn (SDK호환) 백호 2009.02.22 852
276 기타 Project RGSS3 by joe5491 6 습작 2013.05.06 1971
275 전투 Prize Point System 2.0 by Dark Ruby@rmxp.org 3 file 백호 2009.02.22 1742
274 그래픽 Pictures below Characters by PK8 (XP/VXA) Alkaid 2012.09.07 1643
273 기타 Phylomortis.com 스크립트들. file Alkaid 2010.09.02 1776
272 미니맵 Passability Minimap by squall@rmxp.org 백호 2009.02.22 1125
271 파티 Party Switching Screen by exseiken file 백호 2009.02.22 1303
270 파티 Party Changer 4.0 by Dargor (SDK2.3 호환) 3 WMN 2008.04.06 1574
269 파티 Party & Class Changing script 1 file 백호 2009.02.21 962
268 온라인 ORPG 여러분이 원하는 온라인 스크립트 한글화해서 다시 배포! 20 file 심영 2010.10.16 5573
267 메뉴 Options System by slipknot 3 file 백호 2009.02.22 2101
266 기타 NPC Details Window by SephirothSpawn (SDK호환) 1 file 백호 2009.02.22 1209
265 기타 Note Editor for RMXP by NEWOLD 1 Alkaid 2012.01.15 2101
264 키입력 No F1, F12 and Alt+Return (Kein F1, F12 und Alt+Eingabe) by cremno 습작 2013.04.19 995
263 온라인 NetRPGXP Client Core 일부분임 8 백호 2009.10.06 2885
262 온라인 NetPlay Evolution v3 여러분이 고대하시던 NPE v3입니다! 5 file 심영 2010.10.29 3993
Board Pagination Prev 1 ... 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 ... 52 Next
/ 52