Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Sound
- alias __init_wo_ext_resolv_ initialize
- def initialize(name, ext = nil)
- ext = name.split('.')[-1] if ext.nil?
- if !File.exist?(name)
- puts "Does not exist." # this is true in my tests
- if File.exist?(File.join('Audio/BGM', name))
- name = (File.join('Audio/BGM', name))
- else
- name = (File.join(Game.audio_path, 'Audio/BGM', name))
- end
- end
- __init_wo_ext_resolv_(name, ext) # The alias to the C function
- # When this ^^^^ is called, it seems that name is not changed at all?
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment