Health Class

Summary

Keeps track of the health of an object.
Assembly
PlatformerGameKit.dll
Namespace
PlatformerGameKit
Interfaces
Base Types
  • MonoBehaviour
graph BT Type-->Base0["MonoBehaviour"] Type-.->Interface0["ITeam"] click Interface0 "/platformer/api/PlatformerGameKit/ITeam" Type-.->Interface1["Hit.ITarget"] click Interface1 "/platformer/api/PlatformerGameKit/ITarget" Type-.->Interface2["ISerializationCallbackReceiver"] Type["Health"] class Type type-node

Syntax

[AddComponentMenu(Strings.MenuPrefix + "Health")]
[PlatformerHelpUrl(typeof(Health))]
[DefaultExecutionOrder(DefaultExecutionOrder)]
public class Health : MonoBehaviour, ITeam, Hit.ITarget, ISerializationCallbackReceiver

Remarks

Documentation: Hits

Attributes

Type Description
AddComponentMenu
PlatformerHelpUrlAttribute [Assert-Conditional] A UnityEngine.HelpURLAttribute which points to Platformer Game Kit's documentation.
DefaultExecutionOrder

Events

Fields

Name Constant Value Summary
DefaultExecutionOrder -5000
Initialize the PlatformerGameKit.Health.CurrentHealth earlier than anything else will use it.
static

Properties

Name Value Summary
CurrentHealth int
MaximumHealth int
Team Team
[PlatformerGameKit.ITeam] The Platformer.Team this object is on.

Methods

Name Value Summary
SetMaximumHealth(int, Health.HealthChangeMode) void
Sets the PlatformerGameKit.Health.MaximumHealth and then adjusts the PlatformerGameKit.Health.CurrentHealth based on the `mode`.