Summary
Keeps track of the health of an object.
- Assembly
- PlatformerGameKit
.dll - Namespace
- PlatformerGameKit
- Interfaces
-
- ITeam
- Hit
.ITarget - I
Serialization Callback Receiver
- 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 | |
Platformer |
[Assert-Conditional]
A UnityEngine.HelpURLAttribute which points to Platformer Game Kit's documentation.
|
Default |
Events
Name | Type | Summary |
---|---|---|
On |
ValueChangeEvent |
|
OnHitReceived | Action |
|
On |
ValueChangeEvent |
Fields
Name | Constant Value | Summary |
---|---|---|
Default |
-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 |
void |
Sets the
PlatformerGameKit.Health.MaximumHealth and then adjusts the PlatformerGameKit.Health.CurrentHealth based on the `mode`.
|