Add to a GameObject to make it targetable by PlayerController2D. More...
Public Member Functions | |
void | Target () |
void | Untarget () |
void | Attack () |
void | Die () |
void | Polymorph () |
void | PlayAudio (AudioClip audioClip) |
void | Interact () |
void | Apply (int itemIndex) |
Public Attributes | |
GameObject[] | deathPrefabs |
GameObject | polymorphInto |
AudioClip | polymorphAudioClip |
UnityEvent | onTarget = new UnityEvent() |
UnityEvent | onUntarget = new UnityEvent() |
UnityEvent | onAttack = new UnityEvent() |
UnityEvent | onInteract = new UnityEvent() |
IntUnityEvent | onApply = new IntUnityEvent() |
Add to a GameObject to make it targetable by PlayerController2D.
It can invoke events when targeted/untargeted, attacked, interacted, or when an item is applied to it. This script is fairly specific to the demo scene, although you may be able to adapt it for other uses, too.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
GameObject [] PixelCrushers.QuestMachine.Demo.Targetable.deathPrefabs |
IntUnityEvent PixelCrushers.QuestMachine.Demo.Targetable.onApply = new IntUnityEvent() |
UnityEvent PixelCrushers.QuestMachine.Demo.Targetable.onAttack = new UnityEvent() |
UnityEvent PixelCrushers.QuestMachine.Demo.Targetable.onInteract = new UnityEvent() |
UnityEvent PixelCrushers.QuestMachine.Demo.Targetable.onTarget = new UnityEvent() |
UnityEvent PixelCrushers.QuestMachine.Demo.Targetable.onUntarget = new UnityEvent() |
AudioClip PixelCrushers.QuestMachine.Demo.Targetable.polymorphAudioClip |
GameObject PixelCrushers.QuestMachine.Demo.Targetable.polymorphInto |