ProfessionSkill<T>
An abstract class in Root.Township, the global namespace.
Base for a skill that is a single asset, giving static access to it through Instance and quick checks of whether a player has it.
- Listed in Global namespace: P
- Inherits or implements
ProfessionSkill - Derived types
BlockingCharge,Garnisher,SureHands - Documented in Skills and unlocks
Constructors
| Member | What it is |
|---|---|
protected ProfessionSkill() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Properties
| Member | What it is |
|---|---|
static T Instance { get; private set; } | The skill asset, set the first time any player unlocks it. Null before then, so the checks return false or 0. |
Methods
| Member | What it is |
|---|---|
static int PlayerLevel(Player targetPlayer) | The player's level in this skill, or 0 if Instance isn't set yet. |
static int PlayerLevel(PlayerProgressionManager targetPlayer) | The player's level in this skill, or 0 if Instance isn't set yet. |
static bool PlayerUnlocked(Player targetPlayer) | Whether the player has this skill unlocked. False if Instance isn't set yet. |
static bool PlayerUnlocked(PlayerProgressionManager targetPlayer) | Whether the player has this skill unlocked. False if Instance isn't set yet. |
override void Unlock(PlayerProgressionManager player) | Stores this asset as Instance and runs the base unlock. |