Table of Contents

Class CharacterTypeBaseSO

Namespace
BlazerTech.CharacterManagement.Characters
Assembly
Assembly-CSharp.dll

bass Scriptable Object for all Character Types.

public abstract class CharacterTypeBaseSO : ScriptableObject, IValidatable
Inheritance
Object
ScriptableObject
CharacterTypeBaseSO
Implements
Derived

Properties

BaseSpritesheet

Defines the required base sprite sheet for the character type.
Set this spritesheets Sprite Mode to Multiple and slice it. Whenever this character is used the sprites in the BaseSpritesheet will be used and a shader will then override them with the finalized character. Character spritesheets with mismatched dimensions will be rejected when validated.

public Texture2D BaseSpritesheet { get; }

Property Value

Texture2D

CharacterController

The animator controller asset assigned to characters of this type.
Animations inside this controller should use sprites in the BaseSpritesheet.

public RuntimeAnimatorController CharacterController { get; }

Property Value

RuntimeAnimatorController

CharacterTypeID

A unique identifier used to reference this character type. Must be unique across all character types.

public string CharacterTypeID { get; }

Property Value

string

IsValid

Gets a value indicating whether the object is currently valid.
This value should be updated when PerformValidationCheck() is called.

public bool IsValid { get; protected set; }

Property Value

bool

Methods

IsValidCharacterSpriteSheet(Sprite)

Returns true if the sprite fits the conditions for the Character Type.

public virtual bool IsValidCharacterSpriteSheet(Sprite sprite)

Parameters

sprite Sprite

Returns

bool

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.