Protected
constructor!
export default class ExampleBehaviour extends AirshipBehaviour {
textComponent!: TMP_Text;
Awake() {
this.textComponent = this.gameObject.GetComponent<TMP_Text>();
}
}
Readonly
binA bin that is cleaned when the entity despawns.
Readonly
gameThe GameObject
this behaviour is attached to.
Readonly
transformThe Transform
this behaviour is attached to.
Sets 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.
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.