This repository has been archived on 2026-05-18. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
rpgskeleton/Scripts/RPG/Game_Pictures.rb

30 lines
1.2 KiB
Ruby
Raw Normal View History

2014-04-23 21:59:50 -07:00
# -*- coding: utf-8 -*-
#==============================================================================
# ** Game_Pictures
#------------------------------------------------------------------------------
# This is a wrapper for a picture array. This class is used within the
# Game_Screen class. Map screen pictures and battle screen pictures are
# handled separately.
#==============================================================================
class Game_Pictures
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
@data = []
end
#--------------------------------------------------------------------------
# * Get Picture
#--------------------------------------------------------------------------
def [](number)
@data[number] ||= Game_Picture.new(number)
end
#--------------------------------------------------------------------------
# * Iterator
#--------------------------------------------------------------------------
def each
@data.compact.each {|picture| yield picture } if block_given?
end
end