Platformer Pro  2.3.2
A platform game kit for Unity.
PlatformerPro.UIActionBarButton_Attack Class Reference

A button on an action bar. Can be used for switching wepaons, consuming items, or just as a standard ActionButton. More...

Inheritance diagram for PlatformerPro.UIActionBarButton_Attack:
PlatformerPro.UIActionBarButton

Public Attributes

BasicAttacks attack
 
string attackName
 

Protected Member Functions

override void GetCharacter ()
 Gets a character ref or defers to loader event. Here we wait an extra frame to give group time to load. More...
 
override void HandleCharacterLoaded (object sender, CharacterEventArgs e)
 Handles the character being loaded. More...
 
virtual void UpdateFromAttackData ()
 
override void DoPointerClick ()
 Handles the click event. More...
 
- Protected Member Functions inherited from PlatformerPro.UIActionBarButton
virtual void OnActivated ()
 Raises the activated event. More...
 
virtual void DoDestroy ()
 Do the destroy actions (remove event listeners). More...
 
virtual void Init ()
 Init this instance. More...
 
virtual void GetItemManager ()
 Get item manager reference and register listerns. More...
 
virtual void UpdateItemCount ()
 
virtual void HandleItemChanged (object sender, ItemEventArgs e)
 

Protected Attributes

int attackIndex = -1
 Index of the attack. More...
 
- Protected Attributes inherited from PlatformerPro.UIActionBarButton
GameObject disabledContent
 Content to show when this object is disabled. More...
 
GameObject enabledContent
 Content to show when this object is enabled. More...
 
GameObject activeContent
 Content to show when this object is active. More...
 
Text itemCountText
 text for item count if this button is connected to an item. More...
 
Character character
 Character reference, looked up using CharacterLoader (falling back to Find) if null. More...
 
PlatformerProGameManager characterLoader
 The character loader. More...
 
bool allowDeactivate
 
int actionButton
 
bool displayOnly
 
bool canClickWhenPaused
 
ItemManager itemManager
 Cached item manager reference More...
 
string itemId
 Cached item ID More...
 
bool isActive
 Track if we are active or not. More...
 

Properties

override Character Character [get]
 Gets the character reference. More...
 
- Properties inherited from PlatformerPro.UIActionBarButton
virtual Character Character [get]
 Gets the character reference. More...
 

Additional Inherited Members

- Public Member Functions inherited from PlatformerPro.UIActionBarButton
virtual void Disable ()
 Call to disable intance. More...
 
virtual void Enable ()
 call to enable instance. More...
 
virtual void Activate ()
 Call to activate instance. More...
 
virtual void Deactivate ()
 Call to activate instance. More...
 
virtual void OnPointerClick (PointerEventData eventData)
 
virtual void OnPointerDown (PointerEventData eventData)
 
- Events inherited from PlatformerPro.UIActionBarButton
System.EventHandler< System.EventArgs > Activated
 Occurs when button pressed/clicked and state is ready for activation. More...
 

Detailed Description

A button on an action bar. Can be used for switching wepaons, consuming items, or just as a standard ActionButton.

Member Function Documentation

◆ DoPointerClick()

override void PlatformerPro.UIActionBarButton_Attack.DoPointerClick ( )
protectedvirtual

Handles the click event.

Reimplemented from PlatformerPro.UIActionBarButton.

◆ GetCharacter()

override void PlatformerPro.UIActionBarButton_Attack.GetCharacter ( )
protectedvirtual

Gets a character ref or defers to loader event. Here we wait an extra frame to give group time to load.

Reimplemented from PlatformerPro.UIActionBarButton.

◆ HandleCharacterLoaded()

override void PlatformerPro.UIActionBarButton_Attack.HandleCharacterLoaded ( object  sender,
CharacterEventArgs  e 
)
protectedvirtual

Handles the character being loaded.

Parameters
senderSender.
eE.

Reimplemented from PlatformerPro.UIActionBarButton.

◆ UpdateFromAttackData()

virtual void PlatformerPro.UIActionBarButton_Attack.UpdateFromAttackData ( )
protectedvirtual

Member Data Documentation

◆ attack

BasicAttacks PlatformerPro.UIActionBarButton_Attack.attack

◆ attackIndex

int PlatformerPro.UIActionBarButton_Attack.attackIndex = -1
protected

Index of the attack.

◆ attackName

string PlatformerPro.UIActionBarButton_Attack.attackName

Property Documentation

◆ Character

override Character PlatformerPro.UIActionBarButton_Attack.Character
get

Gets the character reference.

The character.


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