Protected
constructor!
export default class ExampleBehaviour extends AirshipBehaviour {
textComponent!: TMP_Text;
Awake() {
this.textComponent = this.gameObject.GetComponent<TMP_Text>();
}
}
Signals when a new input command is begin generated. Use AddCustomInputData() to add custom data to the command being generated.
This signal does not fire for observers.
Signals when a new snapshot of the current movement state is being generated. Use AddCustomStateData() to add custom data to the snapshot being generated.
This signal does not fire for observers.
Signals that two snapshots are being compared. Use SetComparisonResult() in this signals callbacks to modify the result of the comparison.
This signal only fires when the local client needs to compare it's predicted state (first parameter), to the server's authoritative state (second parameter).
Signals that the movement system is displaying a character that has just reached the snapshot provided. This fires during fixed update, but may not fire every fixed update. This only fires for characters being observed. Will fire on the server for client authoritative characters.
Signals that the movement system is displaying a character interpolating between the two provided snapshots. This signal is fired every frame. This only fires for characters being observed. Does not fire on the server, but may in the future.
Signals that the movement system is being reset to a past snapshot. This will happen during re-simulation on clients, and during lag compensation on the server. This signal will fire for an observed character if the local client is replaying.
Allows you to process custom move data attached to character input before the move function is executed.
This signal does not fire for observers.
Allows you to process custom move data attached to character input after the move function is executed.
This signal does not fire for observers.
Fires before a new command is created on the client. Use this signal to create anything that will need to connect to OnAddCustomInputData for the tick about to be processed. Only fires for the local character.
Fires before command processing.
This signal does not fire for observers.
Readonly
binA bin that is cleaned when the entity despawns.
Readonly
gameThe GameObject
this behaviour is attached to.
Can be undefined if the Inventory component is removed from Character prefab.
Readonly
onUsed to cancel changing held item slots.
Readonly
transformThe Transform
this behaviour is attached to.
The enabled state of this component
Protected
Optional
FixedUsed to check if the character is owned by the Game.localPlayer
Must be called after the character has finished initializing. You can use () to wait for initialized.
true if the character is owned by the Game.localPlayer
Protected
Optional
OnProtected
Optional
OnProtected
Optional
OnProtected
Optional
OnProtected
Optional
OnProtected
Optional
OnProtected
Optional
OnProtected
Optional
OnProtected
Optional
OnProtected
Optional
OnProtected
Optional
OnProtected
Optional
OnProtected
Optional
OnSets a characters health to a certain value. If the health is <= 0, the character will die.
The new health value.
Optional
dontInflictDeath: booleanIf true, a death event will not be fired if the character's new health is less than or equal to zero. This is useful when you want to broadcast a custom death event with Airship.Damage.BroadcastDeath.
Private
SetupProtected
Optional
StartProtected
Optional
Update
A character is a (typically human) object in the scene. It controls movement and default animation. Typically a game would spawn a character for each player. If using the default character it would be dressed with their customized outfit.
To spawn a character use Player.SpawnCharacter. To control your game's default character see CharacterConfigSetup.