Yeat, it works, I've added setPaintOrder(Puppy_Player.class); in another void, there it was the problem, thanks anyway. Now I have problem with building the levels. How can i set corectly actors postions if there is that biggest sidescrooling world. I've tried like in mario sidescrooling scenario to divide the world in 10 eqauls parts. Starting area , areatwo, areathree....endingArea like in Mace_Level, and I taught that every part will represent one part that have scrolled. For example If my world is 960 areaTwo will start from 960 to 1920, but when I add an element after i scroll manualy the world and click inspect on it shows to me that object is located >960, so I've added the object in the areaTwo, but goes to the startingArea coordinates For example the last object added in areaTwo goes to startingArea: I'm a little bit confused, and probably you will don't understandwhat I want to say, I just want to know how to add easily actors and desired position to my big 9600px scrolling worlds.
private void buildWorld()
{
startingArea();
areaTwo();
areaThree();
areaFour();
areaFive();
areaSix();
areaSeven();
areaEight();
areaNine();
endingArea();
addScoreboard();
}
private void startingArea()
{
addObject(new Long_Grass1(),237,551);
addObject(new Grass_Normal_Left(),320,498);
addObject(new Grass_Normal_Left(),379,442);
addObject(new Grass_Normal_Center(),438,442);
addObject(new Ground_Center(),320,557);
addObject(new Ground_Center(),379,557);
addObject(new Ground_Center(),379,499);
addObject(new Ground_Right(),439,499);
addObject(new Ground_Right(),439,557);
addObject(new Water(),596,518);
addObject(new Water(),849,518);
addObject(new Coin(),123,495);
addObject(new Coin(),177,495);
addObject(new Coin(),232,495);
addObject(new Coin(),325,444);
addObject(new Coin(),415,386);
addObject(new Grass_Normal_Left(),560,368);
addObject(new Grass_Normal_Left(),681,308);
addObject(new Grass_Normal_Left(),802,258);
addObject(new Grass_Normal_Right(),923,184);
}
private void areaTwo()
{
addObject(new Long_Grass1(),719,184);
}
private void areaThree()
{
}
