Soldato
- Joined
- 14 Jul 2005
- Posts
- 17,616
- Location
- Bristol
I'm creating a game for an assignment for uni which is meant to run on a mobile phone. This means I have to use netbeans with MIDlets and Wireless ToolKit etc. - That's fine.
I have created a simple asteroids style game, but I need to implement levels into it, now I figure the easiest way is to create multiple classes, one per level to stop making a big mess of the main class.
This is proving problematic, as far as I can tell, I've set up the new class to extend the previous one (will put a menu on 1st class, then levels on the following ones).
So when 'MyGameCanvas' gets to a certain point it calls up LevelTwo.
That's all I have in the second class for now as I want to get it able to be used before I start inserting more code.
The error I'm getting from Netbeans is;
I'm sure it's something simple that I've missed out. It appears to be I'm missing something from 'MyGameCanvas', but I don't know what. I've set up the call for 'LevelTwo' in 'MyGameCanvas' and I'm sure when I've done things like this before it's been fine...although I don't normally use Netbeans (but it having phone emulators etc. means I have to use it really).
Any help greatly appreciated.
InvG
I have created a simple asteroids style game, but I need to implement levels into it, now I figure the easiest way is to create multiple classes, one per level to stop making a big mess of the main class.
This is proving problematic, as far as I can tell, I've set up the new class to extend the previous one (will put a menu on 1st class, then levels on the following ones).
So when 'MyGameCanvas' gets to a certain point it calls up LevelTwo.
Code:
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package GameCanvas;
import javax.microedition.lcdui.*;
import javax.microedition.lcdui.game.*;
import java.util.*;
import java.io.*;
import javax.microedition.media.*;
import javax.microedition.media.Control.*;
/**
*
* @author rob
*/
public class LevelTwo extends MyGameCanvas implements Runnable
{
public LevelTwo()
{
}
public void start()
{
}
}
That's all I have in the second class for now as I want to get it able to be used before I start inserting more code.
The error I'm getting from Netbeans is;
Netbeans said:cannont find symbol
symbol : constructor MyGameCanvas(boolean)
location: class GameCanvas.MyGameCanvas
I'm sure it's something simple that I've missed out. It appears to be I'm missing something from 'MyGameCanvas', but I don't know what. I've set up the call for 'LevelTwo' in 'MyGameCanvas' and I'm sure when I've done things like this before it's been fine...although I don't normally use Netbeans (but it having phone emulators etc. means I have to use it really).
Any help greatly appreciated.
InvG