Hi,
I am testing something out. I was trying to reduce the number of classes by combing some components together. I have a floating platform which can either go horizontally or vertically (2 separate classes)/ Like I said I was trying to combine them together, so I tried this:
If I try to place this class into the game, I get an error saying that actor is not in the world. Is what I am trying even possible?
public class FPlatform extends Ground
{
public FPlatform(int selection)
{
this.speed = 2;
setImage(FPlatform);
FPlatform.scale(170,30);
if (selection == 1){
moveHFPlatform();
}
else if (selection == 2){
moveVFPlatform();
}
}
/**
* Act - do whatever the FPlatform wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public void act()
{
MovementCounter++;
}
}
