Initial import
This commit is contained in:
23
Scripts/RPG/Game_Actors.rb
Normal file
23
Scripts/RPG/Game_Actors.rb
Normal file
@@ -0,0 +1,23 @@
|
||||
# -*- 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
|
||||
Reference in New Issue
Block a user