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

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

Inheritance diagram for PlatformerPro.UIActionBarButton:
PlatformerPro.UIActionBarButton_Activation PlatformerPro.UIActionBarButton_Attack PlatformerPro.UIActionBarButton_ConsumeItem PlatformerPro.UIActionBarButton_EquipItem

Public Member Functions

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)
 

Protected Member Functions

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 GetCharacter ()
 Gets a character ref or defers to loader event. More...
 
virtual void GetItemManager ()
 Get item manager reference and register listerns. More...
 
virtual void UpdateItemCount ()
 
virtual void HandleItemChanged (object sender, ItemEventArgs e)
 
virtual void HandleCharacterLoaded (object sender, CharacterEventArgs e)
 Handles the character being loaded. More...
 
virtual void DoPointerClick ()
 Does the pointer click. Override to implement. More...
 

Protected Attributes

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

virtual Character Character [get]
 Gets the character reference. More...
 

Events

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. Sub classes can be used for switching wepaons, consuming items, or just as a standard ActionButton.

Member Function Documentation

◆ Activate()

virtual void PlatformerPro.UIActionBarButton.Activate ( )
virtual

Call to activate instance.

◆ Deactivate()

virtual void PlatformerPro.UIActionBarButton.Deactivate ( )
virtual

Call to activate instance.

◆ Disable()

virtual void PlatformerPro.UIActionBarButton.Disable ( )
virtual

Call to disable intance.

◆ DoDestroy()

virtual void PlatformerPro.UIActionBarButton.DoDestroy ( )
protectedvirtual

Do the destroy actions (remove event listeners).

Reimplemented in PlatformerPro.UIActionBarButton_EquipItem, and PlatformerPro.UIActionBarButton_Activation.

◆ DoPointerClick()

virtual void PlatformerPro.UIActionBarButton.DoPointerClick ( )
protectedvirtual

◆ Enable()

virtual void PlatformerPro.UIActionBarButton.Enable ( )
virtual

call to enable instance.

◆ GetCharacter()

virtual void PlatformerPro.UIActionBarButton.GetCharacter ( )
protectedvirtual

Gets a character ref or defers to loader event.

Reimplemented in PlatformerPro.UIActionBarButton_Attack, and PlatformerPro.UIActionBarButton_Activation.

◆ GetItemManager()

virtual void PlatformerPro.UIActionBarButton.GetItemManager ( )
protectedvirtual

Get item manager reference and register listerns.

Reimplemented in PlatformerPro.UIActionBarButton_EquipItem.

◆ HandleCharacterLoaded()

virtual void PlatformerPro.UIActionBarButton.HandleCharacterLoaded ( object  sender,
CharacterEventArgs  e 
)
protectedvirtual

Handles the character being loaded.

Parameters
senderSender.
eE.

Reimplemented in PlatformerPro.UIActionBarButton_Attack, and PlatformerPro.UIActionBarButton_Activation.

◆ HandleItemChanged()

virtual void PlatformerPro.UIActionBarButton.HandleItemChanged ( object  sender,
ItemEventArgs  e 
)
protectedvirtual

◆ Init()

virtual void PlatformerPro.UIActionBarButton.Init ( )
protectedvirtual

◆ OnActivated()

virtual void PlatformerPro.UIActionBarButton.OnActivated ( )
protectedvirtual

Raises the activated event.

◆ OnPointerClick()

virtual void PlatformerPro.UIActionBarButton.OnPointerClick ( PointerEventData  eventData)
virtual

◆ OnPointerDown()

virtual void PlatformerPro.UIActionBarButton.OnPointerDown ( PointerEventData  eventData)
virtual

◆ UpdateItemCount()

virtual void PlatformerPro.UIActionBarButton.UpdateItemCount ( )
protectedvirtual

Member Data Documentation

◆ actionButton

int PlatformerPro.UIActionBarButton.actionButton
protected

◆ activeContent

GameObject PlatformerPro.UIActionBarButton.activeContent
protected

Content to show when this object is active.

◆ allowDeactivate

bool PlatformerPro.UIActionBarButton.allowDeactivate
protected

◆ canClickWhenPaused

bool PlatformerPro.UIActionBarButton.canClickWhenPaused
protected

◆ character

Character PlatformerPro.UIActionBarButton.character
protected

Character reference, looked up using CharacterLoader (falling back to Find) if null.

◆ characterLoader

PlatformerProGameManager PlatformerPro.UIActionBarButton.characterLoader
protected

The character loader.

◆ disabledContent

GameObject PlatformerPro.UIActionBarButton.disabledContent
protected

Content to show when this object is disabled.

◆ displayOnly

bool PlatformerPro.UIActionBarButton.displayOnly
protected

◆ enabledContent

GameObject PlatformerPro.UIActionBarButton.enabledContent
protected

Content to show when this object is enabled.

◆ isActive

bool PlatformerPro.UIActionBarButton.isActive
protected

Track if we are active or not.

◆ itemCountText

Text PlatformerPro.UIActionBarButton.itemCountText
protected

text for item count if this button is connected to an item.

◆ itemId

string PlatformerPro.UIActionBarButton.itemId
protected

Cached item ID

◆ itemManager

ItemManager PlatformerPro.UIActionBarButton.itemManager
protected

Cached item manager reference

Property Documentation

◆ Character

virtual Character PlatformerPro.UIActionBarButton.Character
get

Gets the character reference.

The character.

Event Documentation

◆ Activated

System.EventHandler<System.EventArgs> PlatformerPro.UIActionBarButton.Activated

Occurs when button pressed/clicked and state is ready for activation.


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