public enum Race extends Enum<Race>
Race
enum is used to get information about a particular race.
For example, the default worker and supply provider UnitType
.
As you should already know, Starcraft has three races: @Terran , @Protoss , and @Zerg .
UnitType.getRace()
,
Player.getRace()
Enum Constant and Description |
---|
None |
Other |
Protoss |
Random |
Select |
Terran |
Unknown |
Unused |
Zerg |
Modifier and Type | Field and Description |
---|---|
int |
id |
Modifier and Type | Method and Description |
---|---|
UnitType |
getCenter()
Deprecated.
As of 4.2.0 due to naming inconsistency. Use #getResourceDepot instead.
See https://github.com/bwapi/bwapi/issues/621 for more information.
|
UnitType |
getRefinery()
Retrieves the default structure UnitType for this Race that is used to harvest gas from @Geysers.
|
UnitType |
getResourceDepot()
Retrieves the default resource depot
UnitType that workers of this race can
construct and return resources to. |
UnitType |
getSupplyProvider()
Retrieves the default supply provider
UnitType for this race that is used to construct
units. |
UnitType |
getTransport()
Retrieves the default transport
UnitType for this race that is used to transport ground
units across the map. |
UnitType |
getWorker()
Retrieves the default worker type for this
Race . |
static Race |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Race[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Race Zerg
public static final Race Terran
public static final Race Protoss
public static final Race Other
public static final Race Unused
public static final Race Select
public static final Race Random
public static final Race None
public static final Race Unknown
public static Race[] values()
for (Race c : Race.values()) System.out.println(c);
public static Race valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic UnitType getWorker()
Race
.
In Starcraft, workers are the units that are used to construct structures.
UnitType
of the worker that this race uses.public UnitType getResourceDepot()
UnitType
that workers of this race can
construct and return resources to.
In Starcraft, the center is the very first structure of the Race's technology tree. Also known as its base of operations or resource depot.
UnitType
of the center that this race uses.@Deprecated public UnitType getCenter()
public UnitType getRefinery()
In Starcraft, you must first construct a structure over a @Geyser in order to begin harvesting Vespene Gas.
UnitType
of the structure used to harvest gas.public UnitType getTransport()
UnitType
for this race that is used to transport ground
units across the map.
In Starcraft, transports will allow you to carry ground units over unpassable terrain.
UnitType
for transportation.public UnitType getSupplyProvider()
UnitType
for this race that is used to construct
units.
In Starcraft, training, morphing, or warping in units requires that the player has sufficient supply available for their Race.
UnitType
that provides the player with supply.Copyright © 2022. All rights reserved.