1
2
3
if (getWorld() instanceof Level1)
// or
if (Level1.class.isInstance(getWorld()))
1 2 3 if (getWorld() instanceof Level1) // or if (Level1.class.isInstance(getWorld()))
