Summary
A centralised group of references to the common parts of a character and a
PlatformerGameKit.Characters.Character.StateMachine
for their
actions.
- Assembly
- PlatformerGameKit
.dll - Namespace
- PlatformerGameKit
.Characters - Base Types
-
- MonoBehaviour
graph BT
Type-->Base0["MonoBehaviour"]
Type["Character"]
class Type type-node
Syntax
[AddComponentMenu(MenuPrefix + "Character")]
[HelpURL(APIDocumentation + nameof(Character))]
[SelectionBase]
public class Character : MonoBehaviour
Remarks
Documentation: Character Component
Attributes
Type | Description |
---|---|
AddComponentMenu | |
HelpURLAttribute | |
Selection |
Fields
Name | Constant Value | Summary |
---|---|---|
APIDocumentation | https://kybernetik.com.au/platformer/api/PlatformerGameKit.Characters/ |
The URL of the website where the
PlatformerGameKit.Characters API documentation is hosted.static
|
MenuPrefix | Platformer Game Kit/Characters/ |
The menu prefix for
UnityEngine.AddComponentMenu .static
|
StateMachine |
The Finite State Machine that manages the actions of this character.
|
Properties
Name | Value | Summary |
---|---|---|
Animancer | Character |
|
Body | CharacterBody2D | |
Health | Health | |
Idle | CharacterState | |
MovementDirection | Vector2 |
The direction this character wants to move.
|
MovementDirectionX | float |
The horizontal direction this character wants to move.
|
MovementDirectionY | float |
The vertical direction this character wants to move.
|
Run | bool |
Does this character currently want to run?
|
Methods
Name | Value | Summary |
---|---|---|
Awake |
void |
Initializes this character.
|
OnValidate |
void |
[Editor-Only] Ensures that all fields have valid values and finds missing components nearby.
|