create class from array of classnames
In Java how do I create an array of class definitions and create the class
from that array?
List<Class> blockArray = new Array<Class>();
blockArray.add(LTetrino.class);
I get stuck when it comes to this, how do I create the class from the
classname?
public Tetrino getBlock(int x, int y)
{
// return new LTetrino(x, y); OLD CODE
return new blockArray.get(blah);
}
I'm pretty sure I'm doing something wrong here. Thanks in advance.
No comments:
Post a Comment