Class SkillFactory
- Namespace
- GrindFest
- Assembly
- GrindFest.dll
Creates skill instances by CLR type. Skills are plain classes now, so "learning" a skill is a
new — the type is what a save / drop table / book stores.
Type names are resolved against every loaded assembly once, so both the simple name
("Fireball") and the full name ("GrindFest.Fireball") work without an assembly
qualifier — the failure mode the previous attempt hit with Type.GetType.
public static class SkillFactory
- Inheritance
-
objectSkillFactory
Properties
- AllTypes
All skill types that exist, in a stable order (used by tools and tests).
Methods
- Create(string)
Creates a skill instance by simple or full name. Null when the name is unknown — and then it is reported (once per distinct reference), because a caller that built data naming a skill is broken whether or not it happens to check for null.
- Create(Type)
Creates a skill instance by type. Null when the type is not a skill.
- Resolve(string)
Resolves a skill type by simple or full name. Null when unknown.
- ResolveReference(string)
Resolves a skill from whatever a save, drop table or old prefab field happens to hold: a type name (
Fireball), a full name, or a prefab/asset address such asAssets/_GrindFest/Prefabs/Skill Prefabs/Spells/Mass Transmute Into Gold.prefab.