Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.rico.adventure.actions.custom
Class PickUp

    java.lang.Object
      de.rico.adventure.actions.AbstractAction
          de.rico.adventure.actions.custom.PickUp

    public class PickUp

extends AbstractAction

This game action can be used to let a playable character pick up an item from the room he is currently located in.

Author:
  Frank Bruns

Constructor Summary
`PickUp(PlayableCharacter player, Item item)` Creates a new item pick up action.
`PickUp(PlayableCharacter player, Item item, java.lang.String animName)` Creates a new item pick up action with the specified animation attached to it.

Method Summary
`void` | `draw(javax.media.opengl.GL gl)` This method renders the game action, if needed.
`void` | `finishUp()` Implementations of this method hold code that needs to be called before the game action can be removed from the queue (prematurely) without causing side effects.
`void` | `update(long elapsedTime)` This method updates the game action

Methods inherited from class de.rico.adventure.actions.AbstractAction
`getEntity`

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

Constructor Detail

### PickUp

    public PickUp(PlayableCharacter player,
                  Item item)

  Creates a new item pick up action.

  Parameters:
    `player` - player character that picks up the item
    `item` - item to pick up

### PickUp

    public PickUp(PlayableCharacter player,
                  Item item,
                  java.lang.String animName)

  Creates a new item pick up action with the specified animation attached to it.

  Parameters:
    `player` - player character that picks up the item
    `item` - item to pick up
    `animName` - name of the animation to play while the action is active

Method Detail

### update

    public void update(long elapsedTime)

  Description copied from class: `AbstractAction`
  This method updates the game action

  Specified by:
    `update` in class `AbstractAction`
  Parameters:
    `elapsedTime` - time between two frames

### draw

    public void draw(javax.media.opengl.GL gl)

  Description copied from class: `AbstractAction`
  This method renders the game action, if needed.

  Specified by:
    `draw` in class `AbstractAction`

### finishUp

    public void finishUp()

  Description copied from class: `AbstractAction`
  Implementations of this method hold code that needs to be called before the game action can be removed from the queue (prematurely) without causing side effects.

  Specified by:
    `finishUp` in class `AbstractAction`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD