|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectch.aplu.nxt.NxtContext
public class NxtContext
Dummy class to make NxtJLib source compatible with NxtSim. All methods are empty.
| Field Summary | |
|---|---|
static Obstacle |
box
Box obstacle. |
static Obstacle |
channel
Channel obstacle. |
| Method Summary | |
|---|---|
static void |
setLocation(int x,
int y)
Sets the location of the playground (pixel coordinates of the upper left vertex). |
static void |
setStartDirection(double direction)
Sets the Nxt starting direction (zero to EAST). |
static void |
setStartPosition(int x,
int y)
Sets the Nxt starting position (x-y-coordinates 0..500, origin at upper left). |
static void |
showNavigationBar()
Shows the navigation bar of the GameGrid and runs the simulation immediately. |
static void |
showNavigationBar(boolean doRun)
Shows the navigation bar of the GameGrid. |
static void |
useBackground(java.lang.String filename)
Use the give image as background (playground size 501 x 501). |
static void |
useObstacle(Obstacle obstacle)
Uses the given obstacle at the center of the playground. |
static void |
useObstacle(java.lang.String filename,
int x,
int y)
Defines the give images as an obstacle. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static Obstacle box
public static Obstacle channel
| Method Detail |
|---|
public static void useBackground(java.lang.String filename)
filename - the image file to use as background.
public static void setStartPosition(int x,
int y)
x - the x-coordinate of the starting positiony - the y-coordinate of the starting positionpublic static void setStartDirection(double direction)
direction - the starting direction in degrees)
public static void setLocation(int x,
int y)
x - the x-pixel-coordinate of the upper left vertex (positive to the right)y - the y-pixel-coordinate of the upper left vertex (positive to the bottom)
public static void useObstacle(java.lang.String filename,
int x,
int y)
filename - the image file of the obstaclex - the x-coordinate of the image centery - the y-coordinate of the image centerpublic static void useObstacle(Obstacle obstacle)
obstacle - the obstacle to use.public static void showNavigationBar(boolean doRun)
doRun - if true, runs the simulation immediatetly; otherwise the start
button must be hit to run the simulationpublic static void showNavigationBar()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||