mkxp/scripts/Game_Actors.rb
Mathew Velasquez 5118df09f4 Added scripts
2016-01-04 21:30:25 -05:00

28 lines
1,020 B
Ruby

#==============================================================================
# ** Game_Actors
#------------------------------------------------------------------------------
# This class handles the actor array. Refer to "$game_actors" for each
# instance of this class.
#==============================================================================
class Game_Actors
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
@data = []
end
#--------------------------------------------------------------------------
# * Get Actor
# actor_id : actor ID
#--------------------------------------------------------------------------
def [](actor_id)
if actor_id > 999 or $data_actors[actor_id] == nil
return nil
end
if @data[actor_id] == nil
@data[actor_id] = Game_Actor.new(actor_id)
end
return @data[actor_id]
end
end