Basically, I have a couple of BGMs in the BGM folder that I've used countless times now, yet whose name I need to change due to typo in file name, change of songs, etc. So instead of going back and spend a week searching & editing the name in the editor, I just made some exceptions in the bgm_play method.
My question is, if I add a few of those exceptions there, would it slow things down noticeably? I'm pretty sure that it doesn't since it's constant time, but seeing those in a method that's run so often feels a little intimidating, so I just wanted some reassurance. If it does, is there another way of doing this?
Many thanks for your time.
Code:
def bgm_play(bgm)
@playing_bgm = bgm
#E.g. this block vvv
if bgm != nil and bgm.name == "Old song name"
Audio.bgm_play("Audio/BGM/" + "New song name", bgm.volume, bgm.pitch)
elsif bgm != nil and bgm.name != ""
Audio.bgm_play("Audio/BGM/" + bgm.name, bgm.volume, bgm.pitch)
else
Audio.bgm_stop
end
Graphics.frame_reset
end
My question is, if I add a few of those exceptions there, would it slow things down noticeably? I'm pretty sure that it doesn't since it's constant time, but seeing those in a method that's run so often feels a little intimidating, so I just wanted some reassurance. If it does, is there another way of doing this?
Many thanks for your time.