i've spent a lot of time on this website and youtube, and google, in order to find help on making a floor for my platform game. This game has a rather taller character and i need the feet of the character to be colliding with a floor made above the bottom boundary of the game. its far from complete, i just would like to know how or where i can start with making this floor and how i can make it interact with my character.
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
public class jjleft extends Actor
{
private int wX;
private int wY;
public jjleft()
{
}
public void act()
{
move();
fall();
}
public void move()
{
GreenfootImage jjright = new GreenfootImage("jedijesus(right).jpg");
GreenfootImage jjleft = new GreenfootImage("jedijesus(left).jpg");
GreenfootImage jjleftdown = new GreenfootImage("jesus left sword down.jpg");
GreenfootImage jjrightdown = new GreenfootImage("jesus right sword down.jpg");
setLocation(getX() + wX, getY() + wY);
if (Greenfoot.isKeyDown("right")){
move(3);
setImage("jedijesus(right).jpg");
if (Greenfoot.isKeyDown("down")){
setImage("jesus right sword down.jpg");
}
}
if (Greenfoot.isKeyDown("left")){
move(-3);
setImage("jedijesus(left).jpg");
if (Greenfoot.isKeyDown("down")){
setImage("jesus left sword down.jpg");
}
}
}
public void fall()
{
if (
{
}
}
public void checkCollision()
{
if (getX() == 0 || getX() == getWorld().getWidth()-1){
wX = -wX;
}
if (getY() == 0) {
wY = -wY;
}
}
}


