|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectrlgamekit.demo.walkaround.MapControl
public class MapControl
Controller class for map altering actions.
| Constructor Summary | |
|---|---|
MapControl(javax.swing.JFrame parent,
MapDisplay mapDisplay)
|
|
| Method Summary | |
|---|---|
void |
doBump(Player player,
int feature,
int color,
int mapX,
int mapY)
Handle event if player bumped into something. |
void |
doClose(Player player,
int mapX,
int mapY)
Do a close type action. |
void |
doDropItem(Player player)
Drop an item from the players inventory. |
void |
makeNewMap(Player player)
Create a new map and set the display up with the new map data. |
void |
playerMoved(Player player)
Call this after player move to update the field of view. |
Item |
selectItemFromInventory(Player player)
Select an item from the players inventory. |
void |
setMessageDisplayArea(MessageDisplayArea messageDisplayArea)
Set message area to display game messages. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MapControl(javax.swing.JFrame parent,
MapDisplay mapDisplay)
| Method Detail |
|---|
public void doBump(Player player,
int feature,
int color,
int mapX,
int mapY)
feature - What was there?color - The color of the feature.mapX - X coordinate of the feature.mapY - Y coordinate of the feature.
public void doClose(Player player,
int mapX,
int mapY)
public void doDropItem(Player player)
player - The player.public Item selectItemFromInventory(Player player)
player - The player.
public void playerMoved(Player player)
player - The player to update.public void makeNewMap(Player player)
public void setMessageDisplayArea(MessageDisplayArea messageDisplayArea)
messageDisplayArea - Message are for gam,e messages. Pass null
to trun message display off.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||