graphics
Class Buddy

java.lang.Object
  extended by graphics.Buddy

public class Buddy
extends Object

Represent the state and performs the rendering of the avatar in Elimination mode.

Author:
Terje

Field Summary
private  int blinkOffset
           
private  boolean doneDrawing
           
(package private)  boolean isKilled
           
(package private)  String name
           
private  int personality
           
private  float rot
           
private  int xpos
           
private  int ypos
           
 
Constructor Summary
Buddy(String name)
           
 
Method Summary
 boolean checkBlink()
          The returned value indicates wether the avatar is currently blinking.
 void display(javax.media.opengl.GL gl, com.sun.opengl.util.j2d.TextRenderer textRenderer)
          Renders the avatar on the gl object.
 Dimension getGridXY()
          Returns the coordiantes of the avatar in the on-screen grid of avatars.
 String getName()
           
 boolean isKilled()
           
 void kill()
          initiates the killing of the avatar.
 void setGridXY(int x, int y)
          Sets the position of the avatar in the on-screen grid of avatars.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

String name

isKilled

boolean isKilled

xpos

private int xpos

ypos

private int ypos

blinkOffset

private int blinkOffset

doneDrawing

private boolean doneDrawing

rot

private float rot

personality

private int personality
Constructor Detail

Buddy

public Buddy(String name)
Method Detail

kill

public void kill()
initiates the killing of the avatar.


checkBlink

public boolean checkBlink()
The returned value indicates wether the avatar is currently blinking.

Returns:

isKilled

public boolean isKilled()

display

public void display(javax.media.opengl.GL gl,
                    com.sun.opengl.util.j2d.TextRenderer textRenderer)
Renders the avatar on the gl object.

Parameters:
gl -
textRenderer -

setGridXY

public void setGridXY(int x,
                      int y)
Sets the position of the avatar in the on-screen grid of avatars.

Parameters:
x -
y -

getGridXY

public Dimension getGridXY()
Returns the coordiantes of the avatar in the on-screen grid of avatars.

Returns:

getName

public String getName()