Template¶
-
public abstract class
Template
<T> implements Serializable, DeepEquatable¶ Signifies that an implementing class provides generic details about a specific object. Also provides a means for creating factory methods for specific kinds of game objects.
Author: Tim
Parameters: - <T> –
Fields¶
Methods¶
addBuildPrerequisite¶
addUpgradePrerequisite¶
getBuildPrerequisites¶
-
public Set<Integer>
getBuildPrerequisites
()¶ Get the set of template ids of buildings (or units in general) that are required before this template can be made. This list is mutable, changing it will alter the things needed to make this template.
Returns: A set of template ids for prerequisite buildings/units
getUpgradePrerequisites¶
getView¶
-
public abstract TemplateView
getView
()¶
produceInstance¶
-
public abstract T
produceInstance
(IDDistributer idsource)¶ A factory method that produces copies of a “default” object