Advertisement
neonblack

get_picture_name

Feb 17th, 2013
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.21 KB | None | 0 0
  1. class Game_Interpreter
  2.   def get_picture_name(name, emotion)
  3.     a = Dir.entries("Graphics/Pictures").select {|i| i =~ /%\[(\d+),?\s*?(\d*?)\]#{name}-#{emotion}/}
  4.     return !a.empty? ? a[0] : nil
  5.   end
  6. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement