It still doesnt show up in arenaone, the players dont. I click on the characters it does go from selection to arenaone but it doesnt show the players in arenaone.
Oh i am sorry for wasting your time, i didnt know my partner finished our sprint. If i were to have any other questions (which is most likely going to happen soon) should i make a new discuss page or stick with this one?
Oh i am sorry for wasting your time, i didnt know my partner finished our sprint. If i were to have any other questions (which is most likely going to happen soon) should i make a new discuss page or stick with this one?
Unless it is about the selection process, you should start a new one.
Alright since im back to task, heres what ive done so far. I made music stop when entering world and about character selection it is still in progress, so i need help when clicking onto the character i want it to appear on arenaone but what you gave me did not work so do you have any other suggestions?
public class Arenaone extends World
{
private PlayerEntity playerone;
private PlayerEntitytwo playertwo;
private Timer timer;
GreenfootSound bm = new GreenfootSound("battleone.mp3");
// GreenfootSound punch = new GreenfootSound("ipunch.mp3");
Actor player = selection.playerone;
public Arenaone()
{
// Create a new world with 600x400 cells with a cell size of 1x1 pixels.
super(711, 400, 1);
playerone = new PlayerEntity(playerone.class);
addObject(playerone, 123, 268);
playertwo = new PlayerEntitytwo(playertwo.class);
addObject(playertwo, 545, 267);
timer = new Timer();
addObject(timer, 322, 50);
addStones();
MusicManager.stopscreen();
// MusicManager.arenaone();
}
public void addStones()
{
for(int i = 0; i < 30; i++)
{
Stone floor = new Stone();
addObject(floor, 0 + (i * floor.getImage().getWidth()) , 351);
}
}
}
public class selection extends World
{
/**
* Constructor for objects of class selection.
*
*/
Actor player = selection.playerone;
public static Actor playerone;
public Actor icons;
GreenfootSound backgroundMusic = new GreenfootSound("lockdownone.mp3");
public selection()
{
// Create a new world with 600x400 cells with a cell size of 1x1 pixels.
super(711, 400, 1);
prepare();
}
private void prepare()
{
GreenfootImage images =
{
(new ironman()).getImage(),
(new captain()).getImage(),
(new blackpanther()).getImage(),
(new hulk()).getImage()
};
icons = new Actor;
for (int i=0; i<images.length; i++)
{
icons = new SimpleActor();
icons.setImage(images);
addObject(icons, 122+155*i, 200);
//getImage().setTransparency(0);
}
}
public void act()
{
if (!Greenfoot.mouseClicked(null)) return;
int selected = -1;
for (int i=0; i<icons.length; i++)
{
if (Greenfoot.mouseClicked(icons))
{
selected = i;
break;
}
}
if (selected != -1)
{
switch (selected)
{
case 0: playerone = new ironman(); break;
case 1: playerone = new captain(); break;
case 2: playerone = new blackpanther(); break;
case 3: playerone = new hulk(); break;
}
}
Greenfoot.setWorld(new map());
}
}