gameaction
Class AbstractGameAction

java.lang.Object
  extended by gameaction.AbstractGameAction
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ChangeHotspotImage, CutSceneStart, CutSceneStop, Delay, Leave, Pick, PlaySound, RunAnimation, ShowIntermissionScreen, Talk, Use, Walk

public abstract class AbstractGameAction
extends java.lang.Object
implements java.io.Serializable

An abstract game action that contains everything which all derived specialized game actions have in common

Author:
Frank Bruns
See Also:
Serialized Form

Constructor Summary
AbstractGameAction(AbstractCharacterSprite c)
          Creates a new game action
 
Method Summary
 AbstractCharacterSprite getCharacter()
          Returns the character that performs the game action
 boolean isSecondMethodCall()
          Determines, if the update() method of this game action has been called more than once
abstract  void update(long elapsedTime)
          Updates the game action
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractGameAction

public AbstractGameAction(AbstractCharacterSprite c)
Creates a new game action

Parameters:
c - character that performs the game action
Method Detail

getCharacter

public AbstractCharacterSprite getCharacter()
Returns the character that performs the game action

Returns:
character that performs the game action

isSecondMethodCall

public boolean isSecondMethodCall()
Determines, if the update() method of this game action has been called more than once

Returns:
at least second call of update()? --> true=yes, false=no

update

public abstract void update(long elapsedTime)
Updates the game action

Parameters:
elapsedTime - time between two frames