vooga.engine.control
Class KeyboardControl

java.lang.Object
  extended by vooga.engine.control.Control
      extended by vooga.engine.control.KeyboardControl
Direct Known Subclasses:
PlayerControl

public class KeyboardControl
extends Control

Built-in example of how to extend Control class properly. Also a usable keyboard Controller creator.


Field Summary
 
Fields inherited from class vooga.engine.control.Control
entities, key, methodMap, methodParamMap, myGame, paramMap, paramTypes
 
Constructor Summary
KeyboardControl()
          Default KeyboardControl constructor.
KeyboardControl(Game game)
          Constructor creates a KeyboardControl object for a specific Game
KeyboardControl(java.util.List<java.lang.Object> entities, Game game)
          Creates a KeyboardControl object with a number of objects which it controls.
KeyboardControl(java.lang.Object entity, Game game)
          Creates a KeyboardControl object with a Game and a single Object which it controls.
 
Method Summary
 void update()
           
 
Methods inherited from class vooga.engine.control.Control
addInput, changeKey, initializeMappings, setParams, setParams, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyboardControl

public KeyboardControl()
Default KeyboardControl constructor. Initializes a KeyboardControl object with no data.


KeyboardControl

public KeyboardControl(Game game)
Constructor creates a KeyboardControl object for a specific Game

Parameters:
game - the Game to be controlled by this object

KeyboardControl

public KeyboardControl(java.lang.Object entity,
                       Game game)
Creates a KeyboardControl object with a Game and a single Object which it controls.

Parameters:
initialEntity - the Object to be controlled
game - the Game to which the Object belongs

KeyboardControl

public KeyboardControl(java.util.List<java.lang.Object> entities,
                       Game game)
Creates a KeyboardControl object with a number of objects which it controls.

Parameters:
initialEntities - the Objects to be controlled
game - the Game to which the Objects belong
Method Detail

update

public void update()
Overrides:
update in class Control