Advertisement
nio_kasgami

Game_Personality

Jun 12th, 2015
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.64 KB | None | 0 0
  1. class Game_Personalities
  2.  
  3.   #----------------------------------------------------------------------------
  4.   # ○ new method: initialize
  5.   #----------------------------------------------------------------------------
  6.   def initialize
  7.     @personality =[]
  8.   end
  9.  
  10.   #----------------------------------------------------------------------------
  11.   # ○ new method: []
  12.   #----------------------------------------------------------------------------
  13.   def [](ai_id)
  14.      if !Emoji::AI::AI_Personality[ai_id]
  15.        msgbox("ERROR : please assign a valid ID")
  16.        exit
  17.      else
  18.     @personality[ai_id] ||= Game_AI.new(ai_id)
  19.   end
  20. end
  21.  
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement