Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## MyGame
Class clsCanvas

    java.lang.Object
      javax.microedition.lcdui.Displayable
          javax.microedition.lcdui.Canvas
              javax.microedition.lcdui.game.GameCanvas
                  MyGame.clsCanvas

All Implemented Interfaces:
  java.lang.Runnable

    public class clsCanvas

extends javax.microedition.lcdui.game.GameCanvas
implements java.lang.Runnable

Implementa el juego.

Author:
  IntelligentSoft

Field Summary
`static int` | `fireKey`
`static int` | `keyDelay`

Fields inherited from class javax.microedition.lcdui.game.GameCanvas
`DOWN_PRESSED, FIRE_PRESSED, GAME_A_PRESSED, GAME_B_PRESSED, GAME_C_PRESSED, GAME_D_PRESSED, LEFT_PRESSED, RIGHT_PRESSED, UP_PRESSED`

Fields inherited from class javax.microedition.lcdui.Canvas
`DOWN, FIRE, GAME_A, GAME_B, GAME_C, GAME_D, KEY_NUM0, KEY_NUM1, KEY_NUM2, KEY_NUM3, KEY_NUM4, KEY_NUM5, KEY_NUM6, KEY_NUM7, KEY_NUM8, KEY_NUM9, KEY_POUND, KEY_STAR, LEFT, RIGHT, UP`

Constructor Summary
`clsCanvas(midMain m)` Constructor

Method Summary
`void` | `checkKeys(int iKey, long currTick)` Comprueba qué teclas estan presionadas
`void` | `load(int nivel)` Codigo de inicializacion del juego Carga las imagenes que conformaran los personajes y el mapa
`void` | `loadBlockMap(int nivel)` Carga el mapa del nivel
`void` | `loadRoadMap()` Carga el los gráficos del nivel (piso)
`void` | `run()` Contiene el loop principal y la mayoria del código del juego
`void` | `start()` Inicia el thread o hilo
`void` | `unload()` Asegura la destruccion de los objeto

Methods inherited from class javax.microedition.lcdui.game.GameCanvas
`flushGraphics, flushGraphics, getGraphics, getKeyStates, paint`

Methods inherited from class javax.microedition.lcdui.Canvas
`getGameAction, getKeyCode, getKeyName, hasPointerEvents, hasPointerMotionEvents, hasRepeatEvents, hideNotify, isDoubleBuffered, keyPressed, keyReleased, keyRepeated, pointerDragged, pointerPressed, pointerReleased, repaint, repaint, serviceRepaints, setFullScreenMode, showNotify, sizeChanged`

Methods inherited from class javax.microedition.lcdui.Displayable
`addCommand, getHeight, getTicker, getTitle, getWidth, isShown, removeCommand, setCommandListener, setTicker, setTitle`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### keyDelay

    public static final int keyDelay

See Also:
  Constant Field Values

### fireKey

    public static final int fireKey

See Also:
  Constant Field Values

Constructor Detail

### clsCanvas

    public clsCanvas(midMain m)

  Constructor

  Parameters:
    `m` - clase principal que crea el midlet

Method Detail

### start

    public void start()

  Inicia el thread o hilo

### loadRoadMap

    public void loadRoadMap()

  Carga el los gráficos del nivel (piso)

### loadBlockMap

    public void loadBlockMap(int nivel)

  Carga el mapa del nivel

  Parameters:
    `nivel` - nivel a cargar

### load

    public void load(int nivel)

  Codigo de inicializacion del juego Carga las imagenes que conformaran los personajes y el mapa

  Parameters:
    `nivel` - el nivel que se desea cargar

### unload

    public void unload()

  Asegura la destruccion de los objeto

### checkKeys

    public void checkKeys(int iKey,
                          long currTick)

  Comprueba qué teclas estan presionadas

  Parameters:
    `iKey` - estado de teclas
    `currTick` - timepo actual

### run

    public void run()

  Contiene el loop principal y la mayoria del código del juego

  Specified by:
    `run` in interface `java.lang.Runnable`

Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD