package com.sparkyland.wickedbattle;
import com.sparkyland.spartique.common.DebugLog;
import com.sparkyland.spartique.common.ResourceLoader;
import java.applet.*;
import java.awt.*;
import java.io.*;
import java.net.URL;
import java.net.MalformedURLException;
/**----------------------------------------------------------------------------
Class WickedBattle is the main Applet for WICKED BATTLE.
@version 1 4/22/2003
@author Jess M. Lilly
-----------------------------------------------------------------------------*/
public class WickedBattle extends Applet
{
protected URL pwd;
protected ScreenManager screenManager;
public void init()
{
String debug = this.getParameter( "debug" );
DebugLog.out.println( "Debug: " + debug );
DebugLog.setDebug( debug );
DebugLog.println("init()");
setFont( new Font( "SansSerif", Font.PLAIN, 11 ) );
String temp = getCodeBase().toString();
String slash = File.separator;
temp = temp + "com" + slash +
"sparkyland" + slash +
"wickedbattle" + slash;
DebugLog.println(temp);
try
{
pwd = new URL(temp);
}
catch (MalformedURLException e)
{
}
DebugLog.println(pwd);
this.setLayout(new BorderLayout());
ResourceLoader.init( this, pwd );
CSVParser.init( this, pwd );
}
public void start()
{
DebugLog.println("start()");
screenManager = new ScreenManager( this );
screenManager.showScreen( new MainScreen( this, screenManager ) );
}
public GameScreen getGameScreen() { return (GameScreen)screenManager.getCurrentScreen(); }
public ScreenManager getScreenManager() { return screenManager; }
public URL getPwd() { return pwd; }
}
|