Package com.csse3200.game.services
Interface OxygenLevel
- All Known Implementing Classes:
PlanetOxygenService
public interface OxygenLevel
Used to adjust and check oxygen levels.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddOxygen(float kilogramsToAdd) Add x kilograms of oxygen to the object in question.floatGets the amount of oxygen present in the object in kilos.intGets the oxygen present as a percentage of the upper limit (Float 0.0 - 100.0).voidremoveOxygen(float kilogramsToRemove) Remove x kilograms of oxygen from the object in question.voidsetOxygen(float oxygen) Sets the amount of oxygen present in the object in kilos.
-
Method Details
-
addOxygen
void addOxygen(float kilogramsToAdd) Add x kilograms of oxygen to the object in question.- Parameters:
kilogramsToAdd- the float number of kilograms to add.
-
removeOxygen
void removeOxygen(float kilogramsToRemove) Remove x kilograms of oxygen from the object in question.- Parameters:
kilogramsToRemove- the float number of kilograms to remove.
-
getOxygen
float getOxygen()Gets the amount of oxygen present in the object in kilos.- Returns:
- the amount of oxygen present in kilos.
-
setOxygen
void setOxygen(float oxygen) Sets the amount of oxygen present in the object in kilos.- Parameters:
oxygen- the float number of kilograms to set the oxygen level to.
-
getOxygenPercentage
int getOxygenPercentage()Gets the oxygen present as a percentage of the upper limit (Float 0.0 - 100.0).- Returns:
- The oxygen present as a percentage of the upper limit.
-