Class CharacterTemplateBaseSO<TCharacterType, TCharacter>
- Namespace
- BlazerTech.CharacterManagement.Characters
- Assembly
- Assembly-CSharp.dll
Base class for all Character Templates.
public abstract class CharacterTemplateBaseSO<TCharacterType, TCharacter> : ScriptableObject, IValidatable where TCharacterType : CharacterTypeBaseSO
Type Parameters
TCharacterType
TCharacter
- Inheritance
-
ObjectScriptableObjectCharacterTemplateBaseSO<TCharacterType, TCharacter>
- Implements
- Derived
Fields
isValid
protected bool isValid
Field Value
Properties
CharacterDisplayName
public string CharacterDisplayName { get; }
Property Value
CharacterName
public string CharacterName { get; }
Property Value
CharacterType
public TCharacterType CharacterType { get; }
Property Value
- TCharacterType
IsValid
Gets a value indicating whether the object is currently valid.
This value should be updated when PerformValidationCheck() is called.
public bool IsValid { get; }
Property Value
Methods
CreateNewCharacter()
protected abstract TCharacter CreateNewCharacter()
Returns
- TCharacter
GetOrCreateCharacter()
Create a new character or return the already creted one if it exists.
public TCharacter GetOrCreateCharacter()
Returns
- TCharacter
PerformValidationCheck()
Checks/Rechecks if the object is valid and updates IsValid accordingly.
public virtual bool PerformValidationCheck()
Returns
- bool
true if the object is valid after the check; otherwise, false.