<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<snippet
    attachedevent="false"
    class="scripts.Design_0_0_HealthManager"
    classname="scripts.Design_0_0_HealthManager"
    desc="The Health Manager will track the Actor&apos;s current health, as well as provide blocks for healing and damaging the Actor.  It can also send messages to other behaviors to allow for a wide range of functionality."
    description="The Health Manager will track the Actor&apos;s current health, as well as provide blocks for healing and damaging the Actor.  It can also send messages to other behaviors to allow for a wide range of functionality."
    design="true"
    drawOrder="0"
    id="0"
    name="Health Manager"
    oid="-1"
    package="scripts"
    shared="false"
    type="actor">
    <actor
        default="thisactor"
        defaultValue="thisactor"
        desc=""
        dropdown=""
        fullname="Actor"
        hidden="true"
        id="2147483647"
        name="actor"
        order="0"/>
    <number
        default="3.0"
        defaultValue="3.0"
        desc="Amount of health to start with."
        dropdown=""
        fullname="Starting Health"
        hidden="false"
        id="1"
        name="_StartingHealth"
        order="2"/>
    <number
        default="3.0"
        defaultValue="3.0"
        desc="Maximum amount of health."
        dropdown=""
        fullname="Maximum Health"
        hidden="false"
        id="2"
        name="_MaximumHealth"
        order="3"/>
    <number
        default="3.0"
        defaultValue="3.0"
        desc="HIDDEN - Tracks the current amount of health."
        dropdown=""
        fullname="Current Health"
        hidden="true"
        id="3"
        name="_CurrentHealth"
        order="1"/>
    <text
        default="Healed"
        defaultValue="Healed"
        desc="Send this message to all behaviors when the Actor is healed by any amount.  Remove value to prevent a message from being sent."
        dropdown=""
        fullname="Healed Message"
        hidden="false"
        id="4"
        name="_HealedMessage"
        order="9"/>
    <text
        default="Damaged"
        defaultValue="Damaged"
        desc="Send this message to all behaviors when the Actor is damaged by any amount.  Remove the value to prevent a message from being sent."
        dropdown=""
        fullname="Damaged Message"
        hidden="false"
        id="5"
        name="_DamagedMessage"
        order="10"/>
    <text
        default=""
        defaultValue=""
        desc="What should we do when the health reaches zero?&lt;br&gt;&#10;1. Kill Actor&lt;br&gt;&#10;2. Do Nothing&lt;br&gt;"
        dropdown="Kill Actor=Kill&#10;Do Nothing=Nothing"
        fullname="Zero Health Action"
        hidden="false"
        id="7"
        name="_ZeroHealthAction"
        order="8"/>
    <boolean
        default="false"
        defaultValue="false"
        desc=""
        dropdown=""
        fullname="Invincible?"
        hidden="true"
        id="8"
        name="_Invincible"
        order="11"/>
    <number
        default="0.5"
        defaultValue="0.5"
        desc="How long should the Actor become temporarily invincible after being damaged?"
        dropdown=""
        fullname="Delay Between Damage"
        hidden="false"
        id="9"
        name="_DelayBetweenDamage"
        order="7"/>
    <boolean
        default="true"
        defaultValue="true"
        desc=""
        dropdown=""
        fullname="Can Be Damaged?"
        hidden="true"
        id="10"
        name="_CanBeDamaged"
        order="12"/>
    <boolean
        default="false"
        defaultValue="false"
        desc="Check this box if the Actor&apos;s health should persist (stay the same) from scene to scene.  "
        dropdown=""
        fullname="Persistent Health?"
        hidden="false"
        id="11"
        name="_PersistentHealth"
        order="4"/>
    <game-attribute
        default=""
        defaultValue=""
        desc="&lt;b&gt;Note:&lt;/b&gt; This option is only used if the &lt;b&gt;Persistent Health?&lt;/b&gt; box is checked.&#10;&lt;br&gt;&lt;br&gt;&#10;Select a &lt;font color=&quot;WHITE&quot;&gt;Game Attribute&lt;/font&gt; to track the health for this Actor.  Make sure the Attribute starts with a value of 0 (zero).  Do not use the same attribute for more than one Actor."
        dropdown=""
        fullname="Health Game Attribute"
        hidden="true"
        id="12"
        name="_HealthGameAttribute"
        order="6"/>
    <text
        default=""
        defaultValue=""
        desc="INTERNAL ATTRIBUTE: The name of the game attribute created within the behaviour."
        dropdown=""
        fullname="Health Identifier"
        hidden="true"
        id="13"
        name="_HealthIdentifier"
        order="5"/>
    <sound
        default=""
        defaultValue=""
        desc="Play this sound when the Actor is damaged."
        dropdown=""
        fullname="Damage Sound"
        hidden="false"
        id="14"
        name="_DamageSound"
        order="13"/>
    <sound
        default=""
        defaultValue=""
        desc="Play this sound when the Actor is killed."
        dropdown=""
        fullname="Death Sound"
        hidden="false"
        id="15"
        name="_DeathSound"
        order="14"/>
    <sound
        default=""
        defaultValue=""
        desc="Play this sound when the Actor is healed."
        dropdown=""
        fullname="Heal Sound"
        hidden="false"
        id="16"
        name="_HealSound"
        order="15"/>
    <boolean
        default="false"
        defaultValue="false"
        desc=""
        dropdown=""
        fullname="Spawned?"
        hidden="true"
        id="17"
        name="_Spawned"
        order="22"/>
    <number
        default="0.0"
        defaultValue="0.0"
        desc="Horizontal offset of the newly spawned actor from the original Actor."
        dropdown=""
        fullname="X Offset"
        hidden="false"
        id="18"
        name="xOffset"
        order="18"/>
    <number
        default="0.0"
        defaultValue="0.0"
        desc="Vertical offset of the newly spawned actor from the original Actor."
        dropdown=""
        fullname="Y Offset"
        hidden="false"
        id="19"
        name="yOffset"
        order="19"/>
    <actor
        default=""
        defaultValue=""
        desc=""
        dropdown=""
        fullname="Spawned Actor"
        hidden="true"
        id="20"
        name="_SpawnedActor"
        order="23"/>
    <number
        default="0.0"
        defaultValue="0.0"
        desc="How long should the actor stay alive before disappearing?  Leave at 0 to prevent the Actor from being removed."
        dropdown=""
        fullname="Lifespan"
        hidden="false"
        id="22"
        name="lifespan"
        order="21"/>
    <boolean
        default="false"
        defaultValue="false"
        desc="Should the actor spawn another actor on death? Useful for death effects such as explosions."
        dropdown=""
        fullname="Spawn Actor On Death"
        hidden="false"
        id="23"
        name="_SpawnActorOnDeath"
        order="16"/>
    <actortype
        default=""
        defaultValue=""
        desc="The actor type to spawn."
        dropdown=""
        fullname="Actor Type To Spawn"
        hidden="false"
        id="24"
        name="_ActorTypeToSpawn"
        order="17"/>
    <number
        default="0.0"
        defaultValue="0.0"
        desc=""
        dropdown=""
        fullname="Percent Left"
        hidden="true"
        id="25"
        name="_PercentLeft"
        order="38"/>
    <text
        default=""
        defaultValue=""
        desc="Actor space (relative to upper left coordinate of Actor), or Screen Space (where 0,0 is upper left of screen)?"
        dropdown="Actor Space=Actor&#10;Screen Space=Screen"
        fullname="Drawing Location"
        hidden="false"
        id="26"
        name="_DrawingLocation"
        order="25"/>
    <number
        default="0.0"
        defaultValue="0.0"
        desc="Horizontal offset in pixels"
        dropdown=""
        fullname="Health Bar X Offset"
        hidden="false"
        id="27"
        name="_HealthBarXOffset"
        order="29"/>
    <number
        default="1.0"
        defaultValue="1.0"
        desc="How many pixels should the outline be?  Set to 0 to prevent an outline from drawing."
        dropdown=""
        fullname="Health Bar Outline Size"
        hidden="false"
        id="28"
        name="_HealthBarOutlineSize"
        order="31"/>
    <number
        default="0.0"
        defaultValue="0.0"
        desc="Vertical offset in pixels"
        dropdown=""
        fullname="Health Bar Y Offset"
        hidden="false"
        id="29"
        name="_HealthBarYOffset"
        order="30"/>
    <number
        default="100.0"
        defaultValue="100.0"
        desc="In pixels"
        dropdown=""
        fullname="Health Bar Width"
        hidden="false"
        id="30"
        name="_HealthBarWidth"
        order="27"/>
    <number
        default="5.0"
        defaultValue="5.0"
        desc="In pixels"
        dropdown=""
        fullname="Health Bar Height"
        hidden="false"
        id="31"
        name="_HealthBarHeight"
        order="28"/>
    <text
        default=""
        defaultValue=""
        desc="Horizontal or Vertical?"
        dropdown="Horizontal=Horizontal&#10;Vertical=Vertical"
        fullname="Health Bar Orientation"
        hidden="false"
        id="32"
        name="_HealthBarOrientation"
        order="26"/>
    <color
        default="0,0,0,255"
        defaultValue="0,0,0,255"
        desc="Enter an outline colour that will display around the background of the health bar"
        dropdown=""
        fullname="Health Bar Outline Colour"
        hidden="false"
        id="39"
        name="_HealthBarOutlineColour"
        order="32"/>
    <color
        default="0,255,0,255"
        defaultValue="0,255,0,255"
        desc="Colour of the health bar when the health is over 75%."
        dropdown=""
        fullname="Colour Over 75%"
        hidden="false"
        id="41"
        name="_ColourOver75"
        order="34"/>
    <color
        default="255,255,0,255"
        defaultValue="255,255,0,255"
        desc="Colour of the health bar when the health is over 50%."
        dropdown=""
        fullname="Colour Over 50%"
        hidden="false"
        id="42"
        name="_ColourOver50"
        order="35"/>
    <color
        default="255,153,0,255"
        defaultValue="255,153,0,255"
        desc="Colour of the health bar when the health is over 25%."
        dropdown=""
        fullname="Colour Over 25%"
        hidden="false"
        id="43"
        name="_ColourOver25"
        order="36"/>
    <color
        default="255,0,0,255"
        defaultValue="255,0,0,255"
        desc="Colour of the health bar when the health is under 25%."
        dropdown=""
        fullname="Colour Under 25%"
        hidden="false"
        id="44"
        name="_ColourUnder25"
        order="37"/>
    <color
        default="0,0,0,255"
        defaultValue="0,0,0,255"
        desc="Background colour of the health bar."
        dropdown=""
        fullname="Health Bar Background Colour"
        hidden="false"
        id="45"
        name="_HealthBarBackgroundColour"
        order="33"/>
    <boolean
        default="true"
        defaultValue="true"
        desc="Whether a health bar should be drawn or not."
        dropdown=""
        fullname="Draw Health Bar"
        hidden="false"
        id="46"
        name="_DrawHealthBar"
        order="24"/>
    <blocks>
        <receiver blockID="4" id="1"/>
        <receiver blockID="5" id="2"/>
        <receiver blockID="3" id="3"/>
        <receiver blockID="8" id="4"/>
        <receiver blockID="7" id="5"/>
        <receiver blockID="1" id="6"/>
        <receiver blockID="2" id="7"/>
        <receiver blockID="6" id="8"/>
    </blocks>
    <events>
        <event
            displayName="Created"
            enabled="true"
            id="1"
            name="init"
            order="1"
            repeats="true"/>
        <event
            displayName="Heal"
            enabled="true"
            id="5"
            name="receiver-1-18"
            order="6"
            repeats="true"/>
        <event
            displayName="Damage"
            enabled="true"
            id="6"
            name="receiver-2-20"
            order="4"
            repeats="true"/>
        <event
            displayName="FullRestore"
            enabled="true"
            id="7"
            name="receiver-3-19"
            order="7"
            repeats="true"/>
        <event
            displayName="GetCurrentHealth"
            enabled="true"
            id="8"
            name="receiver-4-15"
            order="8"
            repeats="true"/>
        <event
            displayName="GetMaxHealth"
            enabled="true"
            id="9"
            name="receiver-5-14"
            order="9"
            repeats="true"/>
        <event
            displayName="SetInvincibility"
            enabled="true"
            id="10"
            name="receiver-6-17"
            order="10"
            repeats="true"/>
        <event
            displayName="SetHealth"
            enabled="true"
            id="11"
            name="receiver-7-16"
            order="11"
            repeats="true"/>
        <event
            displayName="GetInvincibility"
            enabled="true"
            id="12"
            name="receiver-8-13"
            order="12"
            repeats="true"/>
        <event
            displayName="Updated"
            enabled="true"
            id="15"
            name="step"
            order="2"
            repeats="true"/>
        <event
            displayName="Drawing"
            enabled="true"
            id="16"
            name="draw"
            order="3"
            repeats="true"/>
        <event
            displayName="Death"
            enabled="true"
            id="18"
            name="event-custom"
            order="16"
            repeats="true"/>
        <event
            displayName="UpdateGlobalHealth"
            enabled="true"
            id="19"
            name="event-custom"
            order="14"
            repeats="true"/>
    </events>
</snippet>
