Class GameSettings

java.lang.Object
model.GameSettings
All Implemented Interfaces:
Serializable

public class GameSettings extends Object implements Serializable

Title: Misc

Description:

Copyright: Copyright (c) 2005

Company: TAFE SA

See Also:
  • Field Details

  • Constructor Details

    • GameSettings

      public GameSettings()

      no-arg GameSettings constructor

    • GameSettings

      public GameSettings(double moveSpeed, int firingInterval)

      two arg GameSettings constructor

      Parameters:
      moveSpeed - the speed that the player will move
      firingInterval - how fast the player can shoot
  • Method Details

    • getMoveSpeed

      public double getMoveSpeed()
      Returns:
      the move speed
    • getFiringInterval

      public int getFiringInterval()
      Returns:
      the firing interval that is set
    • setMoveSpeed

      public void setMoveSpeed(double moveSpeed)
      Parameters:
      moveSpeed - the multiplier for the player's movement speed
    • setFiringInterval

      public void setFiringInterval(int firingInterval)
      Parameters:
      firingInterval - the number of which the player will fire at
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
      Parameters:
      o - an instance of the GameSettings class
      Returns:
      true or false if both objects are equal
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      values for the GameSettings class
    • saveData

      public void saveData(UserDetails user) throws Exception
      Parameters:
      user - an instance of the UserDetails object
      Throws:
      Exception
    • loadData

      public void loadData(UserDetails user) throws Exception
      Parameters:
      user - an instance of the UserDetails object
      Throws:
      Exception