Okay, so I am trying to make a " Friday Night Funkin' " type of game. In it, I have different arrows that come down and when you press the key they represent they would disappear and give you a point. I tried adding a double "if"
, but it simply doesn't see the second if. I also tried using "&&" and only 1 "if" but that just removes the arrows without the keypress.
public void Catch()
{
if(Greenfoot.isKeyDown("right"))
{
if(isTouching(RightArrow.class))
removeTouching(RightArrow.class);
}
if(Greenfoot.isKeyDown("left"))
{
if(isTouching(LeftArrow.class))
removeTouching(LeftArrow.class);
}
if(Greenfoot.isKeyDown("up"))
{
if(isTouching(UpArrow.class))
removeTouching(UpArrow.class);
}
if(Greenfoot.isKeyDown("down"))
{
if(isTouching(DownArrow.class))
removeTouching(DownArrow.class);
}
}
