public interface Extractor extends Trait, Updatable
Modifier and Type | Method and Description |
---|---|
void |
addListener(ExtractorListener listener)
Add an extractor listener.
|
double |
getDropOffPerSecond()
Get the drop off unit per second.
|
int |
getExtractionCapacity()
Get the extraction capacity in unit (the maximum number of unit extractible per extraction).
|
double |
getExtractionPerSecond()
Get the extraction unit per second.
|
Tiled |
getResourceLocation()
Get the resource location in tile.
|
Enum<?> |
getResourceType()
Get resource type.
|
boolean |
isExtracting()
Check if extractor is currently working on extraction.
|
void |
setCapacity(int capacity)
Set the maximum extractible unit number.
|
void |
setDropOffPerSecond(double speed)
Set the drop off unit per second.
|
void |
setExtractionPerSecond(double speed)
Set the extraction unit per second.
|
void |
setResource(Enum<?> type,
int tx,
int ty,
int tw,
int th)
Set the resources location in tile.
|
void |
setResource(Extractable extractable)
Set the resources location.
|
void |
startExtraction()
Start extraction.
|
void |
stopExtraction()
Stop any action related to extraction.
|
void addListener(ExtractorListener listener)
listener
- The extractor listener to add.void setResource(Extractable extractable)
extractable
- The extractable resource.void setExtractionPerSecond(double speed)
speed
- The extraction unit per second.void setDropOffPerSecond(double speed)
speed
- The drop off unit per second.void setCapacity(int capacity)
capacity
- The extraction capacity.void setResource(Enum<?> type, int tx, int ty, int tw, int th)
type
- The resource type to extract.tx
- The horizontal tile.ty
- The vertical tile.tw
- The width in tile.th
- The height in tile.void startExtraction()
void stopExtraction()
int getExtractionCapacity()
double getExtractionPerSecond()
double getDropOffPerSecond()
Tiled getResourceLocation()
Enum<?> getResourceType()
boolean isExtracting()
true
if extracting, false
else.Copyright © 2016 Byron 3D Games Studio. All rights reserved.