allowed omitting of diveengine2d from tags

rotation
Marcus Gosselin 2016-02-22 07:22:28 -05:00
parent f6081de91b
commit efeef2782c
1 changed files with 6 additions and 2 deletions

View File

@ -43,8 +43,12 @@ public class SceneManager {
try{ try{
entityClass = Class.forName(newLine); entityClass = Class.forName(newLine);
}catch(ClassNotFoundException e) { }catch(ClassNotFoundException e) {
System.out.println(newLine + " class not found!"); try{
continue; entityClass = Class.forName("diveengine2d." + newLine);
}catch(ClassNotFoundException ex) {
System.out.println(newLine + " class not found!");
continue;
}
} }
Object object = entityClass.newInstance(); Object object = entityClass.newInstance();
if(!(object instanceof Entity)) { if(!(object instanceof Entity)) {