This site requires JavaScript, please enable it in your browser!
Greenfoot back
omgxoxo
omgxoxo wrote ...

2016/2/16

addCameraFollower and Scrolling world

omgxoxo omgxoxo

2016/2/16

#
import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * Write a description of class MyWorld here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class MyWorld extends ScrollWorld
{

    /**
     * Constructor for objects of class MyWorld.
     * 
     */
    public MyWorld()
    {    
        
        // Create a new world with 600x400 cells with a cell size of 1x1 pixels.
        super(1120, 550, 1); 
        
       baymax b = new baymax();
        boss bs = new boss();
        
        // add actors
       addCameraFollower(b, 105, getHeight()/2);
        addObject(bs, 1000, getHeight()/2);
        
}
    
    
}
theres an error in 'addCameraFollower' code. it said that it cannot find the symbol. and I also want to make the world to be the subclass of 'ScrollingWorld' but it doenst work. How can fix this? help!
danpost danpost

2016/2/16

#
You need to specify where you got your ScrollWorld class or post it code here.
You need to login to post a reply.