Asteroids
Class Asteroids

mam.agent.pluginAgentRes.Drawer
  |
  +--Asteroids.Asteroids

public class Asteroids
extends Drawer


Field Summary
 protected ProxyGLPointcamera
           
 (package private) booleandown
           
 protected GLUTFuncglut
           
 GLHeatSeekGroupheatseekers
           
 GLIPShipipShip
           
 (package private) final static StringKA_HIT
           
 GLKnowAgentsknowAgents
           
 protected longlast
           
 (package private) booleanleft
           
 (package private) float[]LightAmbient
           
 (package private) float[]LightDiffuse
           
 (package private) float[]LightPosition
           
 private Collectionm_listeners
           
 (package private) booleanmenu
           
 GLMonitorAgentsmonitorAgents
           
 (package private) longmonitorStart
           
 private intmousex
           
 private intmousey
           
 protected longnow
           
 protected intprintFps
           
 private Randomrand
           
 (package private) booleanright
           
 intscore
           
 longseekerstart
           
 (package private) final static StringSHIP_BONUS
           
 (package private) final static StringSHIP_DEATH
           
 (package private) final static StringSHIP_FIRE
           
 (package private) final static StringSHIP_SEEKER
           
 (package private) final static StringSHIP_THRUST
           
 (package private) intshipBonus
           
 (package private) Stringtext
           
 (package private) Stringtext2
           
 (package private) longtextTime
           
 (package private) booleanup
           
 (package private) booleanview
           

Fields inherited from class mam.agent.pluginAgentRes.Drawer
canvas, gl, glu, height, width

Constructor Summary
Asteroids()
          renderCanvas(int w, int h) Constructor.

Method Summary
 voidaddKnowAgent(int totalAgents, MamId mamid, String url)
           
 voidaddMonitorAgent(String url)
           
 voidaddSearch(String requestor)
           
 voidcheckKeys()
           
 voidconstruct(int w, int h, PluginGLCanvas cnvs)
           
 voiddisplay()
          void display() Draw to the canvas.
 private floatgetRandom(boolean signed, float begin, float end)
           
 voidinit()
          void init() Called just AFTER the GL-Context is created.
 voidkeyPressed(KeyEvent e)
          void keyPressed(KeyEvent e) Invoked when a key has been pressed.
 voidkeyReleased(KeyEvent e)
          void keyReleased(KeyEvent e) Invoked when a key has been released.
 voidkeyTyped(KeyEvent e)
          void keyTyped(KeyEvent e) Invoked when a key has been typed.
 voidmonitorUpdate(String updatedurl)
           
 voidmooDeath()
           
 protected voidplayTraitedEventSound(String eventSoundName)
           
 voidpreInit()
          void preInit() Called just BEFORE the GL-Context is created.
 voidremoveKnowAgent(MamId mamid)
           
 voidremoveMonitorAgent(String url)
           
 voidreshape(int width, int height)
          void reshape(int width, int height) Called after the first paint command.
 voidshowFPS()
           

Methods inherited from class mam.agent.pluginAgentRes.Drawer
addListener, fireEvent

Field Detail

camera

protected ProxyGLPoint camera

down

boolean down

glut

protected GLUTFunc glut

heatseekers

public GLHeatSeekGroup heatseekers

ipShip

public GLIPShip ipShip

KA_HIT

final static String KA_HIT

knowAgents

public GLKnowAgents knowAgents

last

protected long last

left

boolean left

LightAmbient

float[] LightAmbient

LightDiffuse

float[] LightDiffuse

LightPosition

float[] LightPosition

m_listeners

private Collection m_listeners

menu

boolean menu

monitorAgents

public GLMonitorAgents monitorAgents

monitorStart

long monitorStart

mousex

private int mousex

mousey

private int mousey

now

protected long now

printFps

protected int printFps

rand

private Random rand

right

boolean right

score

public int score

seekerstart

public long seekerstart

SHIP_BONUS

final static String SHIP_BONUS

SHIP_DEATH

final static String SHIP_DEATH

SHIP_FIRE

final static String SHIP_FIRE

SHIP_SEEKER

final static String SHIP_SEEKER

SHIP_THRUST

final static String SHIP_THRUST

shipBonus

int shipBonus

text

String text

text2

String text2

textTime

long textTime

up

boolean up

view

boolean view
Constructor Detail

Asteroids

public Asteroids()
renderCanvas(int w, int h) Constructor.
Method Detail

addKnowAgent

public void addKnowAgent(int totalAgents, MamId mamid, String url)

addMonitorAgent

public void addMonitorAgent(String url)

addSearch

public void addSearch(String requestor)

checkKeys

public void checkKeys()

construct

public void construct(int w, int h, PluginGLCanvas cnvs)

display

public void display()
void display() Draw to the canvas.

getRandom

private float getRandom(boolean signed, float begin, float end)

init

public void init()
void init() Called just AFTER the GL-Context is created.

keyPressed

public void keyPressed(KeyEvent e)
void keyPressed(KeyEvent e) Invoked when a key has been pressed.

keyReleased

public void keyReleased(KeyEvent e)
void keyReleased(KeyEvent e) Invoked when a key has been released.

keyTyped

public void keyTyped(KeyEvent e)
void keyTyped(KeyEvent e) Invoked when a key has been typed. This event occurs when a key press is followed by a key release.

monitorUpdate

public void monitorUpdate(String updatedurl)

mooDeath

public void mooDeath()

playTraitedEventSound

protected void playTraitedEventSound(String eventSoundName)

preInit

public void preInit()
void preInit() Called just BEFORE the GL-Context is created.

removeKnowAgent

public void removeKnowAgent(MamId mamid)

removeMonitorAgent

public void removeMonitorAgent(String url)

reshape

public void reshape(int width, int height)
void reshape(int width, int height) Called after the first paint command.

showFPS

public void showFPS()