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_Actors.rb

24 lines
916 B
Ruby
Raw Normal View History

2014-04-23 21:59:50 -07:00
# -*- coding: utf-8 -*-
#==============================================================================
# ** Game_Actors
#------------------------------------------------------------------------------
# This is a wrapper for an actor array. Instances of this class are referenced
# by $game_actors.
#==============================================================================
class Game_Actors
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
@data = []
end
#--------------------------------------------------------------------------
# * Get Actor
#--------------------------------------------------------------------------
def [](actor_id)
return nil unless $data_actors[actor_id]
@data[actor_id] ||= Game_Actor.new(actor_id)
end
end