|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Car
Car represents a basic railcar, which may either be a loadable (cargo type) or not. The Car class contains a registry for tracking a Car's location, as well as information on its appearance and characteristics.
Field Summary | |
---|---|
static Distance |
CAR_WIDTH
The width of a car. |
static Distance |
DIST_BETWEEN_CARS
The distance between cars (shown as empty space). |
Method Summary | |
---|---|
boolean |
canUserCreate()
Indicates if this car should appear in any user creation selection window. |
java.awt.Color |
color()
Return the Car's color. |
boolean |
isEngine()
Indicates if this car provides power. |
boolean |
isLoadable()
Determine if the current Car can be loaded and unloaded; that is, does it carry cargo. |
Distance |
length()
Returns the length of this Car. |
void |
load()
Loads the current Car. |
boolean |
loaded()
Indicates if the Car is currently loaded. |
java.awt.Color |
midColor()
Indicates what the middle line (loaded) color should be. |
java.util.Set<RailSegment> |
segs()
For the current Car, returns the segments that the Car occupies, if any. |
java.lang.String |
show()
Gives a human-readable word for the Car. |
void |
unload()
Unloads the current Car. |
int |
weight()
Returns the weight of this Car (taking load/unload into account, if necessary) in US Tons. |
Methods inherited from interface net.kolls.railworld.io.SaveLoad |
---|
load, newInstance, save, toString |
Field Detail |
---|
static final Distance DIST_BETWEEN_CARS
static final Distance CAR_WIDTH
Method Detail |
---|
boolean loaded()
true
if the car is loadable and is currently loaded.void load()
void unload()
boolean isLoadable()
true
if the Car may be loaded and unloaded. Defaults to true
.java.util.Set<RailSegment> segs()
Set
of RailSegment
s.java.awt.Color color()
Color
of the current Car.java.awt.Color midColor()
TrainPainter
.
Color
of the middle line in the carjava.lang.String show()
String
indicating type of Car.int weight()
int
representing weight in tons.Distance length()
Distance
indicating the length of the Car.boolean canUserCreate()
boolean isEngine()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |