I have a function that has conditional operator inside of Game_System that checks if the scene I am in currently is at Scene_Menu or Scene_Map. However, it is very natural that this code:
if(SceneManager._scene instanceof Scene_Map || SceneManager._scene instanceof Scene_Menu) {}becomes impractical if I am about to check Scene_Item, Scene_Equip, Scene_Status, Scene_Save, Scene_Load and Scene_End. It would become long and adding the || everytime makes it even pedestrian when coded. Is there a way to simplify this?
if(SceneManager._scene instanceof Scene_Map || SceneManager._scene instanceof Scene_Menu) {}becomes impractical if I am about to check Scene_Item, Scene_Equip, Scene_Status, Scene_Save, Scene_Load and Scene_End. It would become long and adding the || everytime makes it even pedestrian when coded. Is there a way to simplify this?