UnityEssentials
Small but useful tools and features for Unity
Public Member Functions | Public Attributes | Private Attributes | List of all members
UnityEngine.FlipFlop Class Reference

Allows you to alternate between the execution of two events with each call of the Invoke method. More...

Collaboration diagram for UnityEngine.FlipFlop:
Collaboration graph

Public Member Functions

 FlipFlop (UnityAction firstAction, UnityAction secondAction)
 
 FlipFlop (UnityEvent firstEvent, UnityEvent secondEvent)
 
void Invoke ()
 Invokes the firstEvent or the secondEvent alternating. More...
 

Public Attributes

UnityEvent firstEvent
 A set of events to execute together. More...
 
UnityEvent secondEvent
 A set of events to execute together. More...
 

Private Attributes

UnityEvent nextEvent = null
 The next UnityEvent to be executed. If null, firstEvent is going to be executed next . More...
 

Detailed Description

Allows you to alternate between the execution of two events with each call of the Invoke method.

Definition at line 10 of file FlipFlop.cs.

Constructor & Destructor Documentation

◆ FlipFlop() [1/2]

UnityEngine.FlipFlop.FlipFlop ( UnityAction  firstAction,
UnityAction  secondAction 
)

Definition at line 27 of file FlipFlop.cs.

◆ FlipFlop() [2/2]

UnityEngine.FlipFlop.FlipFlop ( UnityEvent  firstEvent,
UnityEvent  secondEvent 
)

Definition at line 39 of file FlipFlop.cs.

Member Function Documentation

◆ Invoke()

void UnityEngine.FlipFlop.Invoke ( )

Invokes the firstEvent or the secondEvent alternating.

Definition at line 48 of file FlipFlop.cs.

Member Data Documentation

◆ firstEvent

UnityEvent UnityEngine.FlipFlop.firstEvent

A set of events to execute together.

Definition at line 16 of file FlipFlop.cs.

◆ nextEvent

UnityEvent UnityEngine.FlipFlop.nextEvent = null
private

The next UnityEvent to be executed. If null, firstEvent is going to be executed next .

Definition at line 25 of file FlipFlop.cs.

◆ secondEvent

UnityEvent UnityEngine.FlipFlop.secondEvent

A set of events to execute together.

Definition at line 21 of file FlipFlop.cs.


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