org.deken.game.movement.actions
Class TimeMovementAction

java.lang.Object
  extended by org.deken.game.movement.actions.TimeMovementAction

public class TimeMovementAction
extends java.lang.Object

Title: TimeMovementAction

Description: The object holds a GameVector and a time duration, to be used with TimeMovement. The GameVector is the direction the object is to move, and the time is how long it moves in that direction.

Copyright: Copyright (c) 2005

Version:
1.0
Author:
Gary Deken

Constructor Summary
TimeMovementAction(GameVector gameVector, int timeInSeconds)
          TimeMovementAction Constructor that takes the GameVector and the int value of the time in seconds.
TimeMovementAction(GameVector gameVector, long timeInMilliseconds)
          TimeMovementAction Constructor that takes the GameVector and the long value of the time in milliseconds.
 
Method Summary
 GameVector getGameVector()
          getGameVector This retrieve the GameVector.
 long getTimeInMilliseconds()
          getTimeInMilliseconds This retrieve the long value of the time in milliseconds.
 int getTimeInSeconds()
          getTimeInSeconds This returns the int value of the time in seconds, rounded down.
 void setGameVector(GameVector gameVector)
          setGameVector Sets the GameVector.
 void setTimeInMilliseconds(long timeInMilliseconds)
          setTimeInMilliseconds Sets the long value of the time in milliseconds.
 void setTimeInSeconds(int timeInSeconds)
          setTimeInSeconds This sets the int value of the time in seconds.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeMovementAction

public TimeMovementAction(GameVector gameVector,
                          long timeInMilliseconds)
TimeMovementAction Constructor that takes the GameVector and the long value of the time in milliseconds.

Parameters:
gameVector - GameVector
timeInMilliseconds - long

TimeMovementAction

public TimeMovementAction(GameVector gameVector,
                          int timeInSeconds)
TimeMovementAction Constructor that takes the GameVector and the int value of the time in seconds.

Parameters:
gameVector - GameVector
timeInSeconds - int
Method Detail

setGameVector

public void setGameVector(GameVector gameVector)
setGameVector Sets the GameVector.

Parameters:
gameVector - GameVector

setTimeInMilliseconds

public void setTimeInMilliseconds(long timeInMilliseconds)
setTimeInMilliseconds Sets the long value of the time in milliseconds.

Parameters:
timeInMilliseconds - long

setTimeInSeconds

public void setTimeInSeconds(int timeInSeconds)
setTimeInSeconds This sets the int value of the time in seconds.

Parameters:
timeInSeconds - int

getGameVector

public GameVector getGameVector()
getGameVector This retrieve the GameVector.

Returns:
GameVector

getTimeInMilliseconds

public long getTimeInMilliseconds()
getTimeInMilliseconds This retrieve the long value of the time in milliseconds.

Returns:
long

getTimeInSeconds

public int getTimeInSeconds()
getTimeInSeconds This returns the int value of the time in seconds, rounded down.

Returns:
int