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")]
[PlatformerHelpUrl(typeof(Character))]
[SelectionBase]
public class Character : MonoBehaviour
Remarks
Documentation:
Character Component
Attributes
Type | Description |
---|---|
AddComponentMenu | |
Platformer |
[Assert-Conditional]
A UnityEngine.HelpURLAttribute which points to Platformer Game Kit's documentation.
|
Selection |
Fields
Name | Constant Value | Summary |
---|---|---|
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.
|