simogl.resource
Class Food

java.lang.Object
  extended by simogl.resource.AbstractResource
      extended by 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