Package com.prineside.tdi2
Class Ability.Factory<T extends Ability>
java.lang.Object
com.prineside.tdi2.Ability.Factory<T>
- Type Parameters:
T
- type of ability
- All Implemented Interfaces:
EntityFactory
- Direct Known Subclasses:
BallLightningAbility.BallLightningAbilityFactory
,BlizzardAbility.BlizzardAbilityFactory
,BulletWallAbility.BulletWallAbilityFactory
,FireballAbility.FireballAbilityFactory
,FirestormAbility.FirestormAbilityFactory
,LoicAbility.LoicAbilityFactory
,LoopAbility.RepeatAbilityFactory
,MagnetAbility.MagnetAbilityFactory
,NukeAbility.NukeAbilityFactory
,OverloadAbility.OverloadAbilityFactory
,SmokeBombAbility.SmokeBombAbilityFactory
,ThunderAbility.ThunderAbilityFactory
,WindstormAbility.WindstormAbilityFactory
- Enclosing class:
- Ability
public abstract static class Ability.Factory<T extends Ability>
extends Object
implements EntityFactory
Ability type factory is responsible for creation of abilities and provides some
additional info for some particular type of ability (such as ability name and color).
Factory singletons can be accessed through
AbilityManager.F
or AbilityManager.getFactory(AbilityType)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract T
create()
abstract Color
getColor()
abstract Color
abstract TextureRegionDrawable
int
getPriceInGreenPapers
(int currentCount) int
getPriceInResources
(ResourceType resourceType, int currentCount) getTitle()
abstract boolean
void
setup()
Normally called by the ability manager once other managers are created and are accessible.void
-
Field Details
-
abilityType
-
-
Constructor Details
-
Factory
Create a factory for an ability type- Parameters:
type
- ability type enum
-
-
Method Details
-
setup
public void setup()Normally called by the ability manager once other managers are created and are accessible. This method prepares the factory before some of its methods can be used. -
setupAssets
public void setupAssets() -
create
-
requiresMapPointing
public abstract boolean requiresMapPointing() -
getColor
-
getDarkerColor
-
getTitle
-
getFancyTitle
-
getDescription
-
getIconDrawable
-
getPriceInGreenPapers
public int getPriceInGreenPapers(int currentCount) -
getPriceInResources
-