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

## simogl.resource
Class Food

    java.lang.Object
      simogl.resource.AbstractResource
          simogl.resource.Food

    public class Food

extends AbstractResource

Represents the resource "food"

Author:
  Frank Bruns

Constructor Summary
`Food(int amount, long intervall)` Creates an object of the resource food with the specified initial amount

Method Summary
`void` | `update(long elapsedTime)` Recalculates the available amount of the resource

Methods inherited from class simogl.resource.AbstractResource
`decrease, getCurrentAmount, getUpdateIntervall, increase, setCurrentAmount, setUpdateIntervall`

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

Constructor Detail

### Food

    public Food(int amount,
                long intervall)

  Creates an object of the resource food with the specified initial amount

  Parameters:
    `amount` - initial amount of food
    `intervall` - intervall of time in miliseconds in which calculations on resources will be performed, effecting the amount of the player's resources

Method Detail

### update

    public void update(long elapsedTime)

  Description copied from class: `AbstractResource`
  Recalculates the available amount of the resource

  Specified by:
    `update` in class `AbstractResource`
  Parameters:
    `elapsedTime` - time between two calls of the updater thread

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