Loading...
Searching...
No Matches
PixelCrushers.QuestMachine.Demo.Targetable Class Reference

Add to a GameObject to make it targetable by PlayerController2D. More...

Inheritance diagram for PixelCrushers.QuestMachine.Demo.Targetable:
Collaboration diagram for PixelCrushers.QuestMachine.Demo.Targetable:

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()
 

Detailed Description

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.

Member Function Documentation

◆ Apply()

void PixelCrushers.QuestMachine.Demo.Targetable.Apply ( int  itemIndex)
inline

◆ Attack()

void PixelCrushers.QuestMachine.Demo.Targetable.Attack ( )
inline

◆ Die()

void PixelCrushers.QuestMachine.Demo.Targetable.Die ( )
inline

◆ Interact()

void PixelCrushers.QuestMachine.Demo.Targetable.Interact ( )
inline

◆ PlayAudio()

void PixelCrushers.QuestMachine.Demo.Targetable.PlayAudio ( AudioClip  audioClip)
inline

◆ Polymorph()

void PixelCrushers.QuestMachine.Demo.Targetable.Polymorph ( )
inline

◆ Target()

void PixelCrushers.QuestMachine.Demo.Targetable.Target ( )
inline

◆ Untarget()

void PixelCrushers.QuestMachine.Demo.Targetable.Untarget ( )
inline

Member Data Documentation

◆ deathPrefabs

GameObject [] PixelCrushers.QuestMachine.Demo.Targetable.deathPrefabs

◆ onApply

IntUnityEvent PixelCrushers.QuestMachine.Demo.Targetable.onApply = new IntUnityEvent()

◆ onAttack

UnityEvent PixelCrushers.QuestMachine.Demo.Targetable.onAttack = new UnityEvent()

◆ onInteract

UnityEvent PixelCrushers.QuestMachine.Demo.Targetable.onInteract = new UnityEvent()

◆ onTarget

UnityEvent PixelCrushers.QuestMachine.Demo.Targetable.onTarget = new UnityEvent()

◆ onUntarget

UnityEvent PixelCrushers.QuestMachine.Demo.Targetable.onUntarget = new UnityEvent()

◆ polymorphAudioClip

AudioClip PixelCrushers.QuestMachine.Demo.Targetable.polymorphAudioClip

◆ polymorphInto

GameObject PixelCrushers.QuestMachine.Demo.Targetable.polymorphInto

The documentation for this class was generated from the following file: