Brunot
Loading...
Searching...
No Matches
BroadcastMessageAction Class Reference

An action that broadcasts a message once it has finished executing. More...

#include <BroadcastMessageAction.h>

Inheritance diagram for BroadcastMessageAction:
[legend]
Collaboration diagram for BroadcastMessageAction:
[legend]

Public Member Functions

 BroadcastMessageAction ()=default
 BroadcastMessageAction (const BroadcastMessageAction &)
auto operator= (const BroadcastMessageAction &) -> BroadcastMessageAction &
 ~BroadcastMessageAction () override=default
 BroadcastMessageAction (BroadcastMessageAction &&other) noexcept=default
auto operator= (BroadcastMessageAction &&other) noexcept -> BroadcastMessageAction &=default
 BroadcastMessageAction (std::string eventToBroadcast, std::unique_ptr< Message > messageToBroadcast)
 BroadcastMessageAction (std::string eventToBroadcast, std::unique_ptr< Message > messageToBroadcast, float duration)
 BroadcastMessageAction (std::string eventToBroadcast, std::unique_ptr< Message > messageToBroadcast, float duration, const th::Bezier &easingFunction, float initialDelay, float endingDelay)
auto init () -> void override
 Virtual function that is called once, when the Action is first starting up.
auto execute () -> void override
 Virtual function that is called every frame to change a game object.
auto end () -> void override
 Virtual function that is called once, when an Action is finished executing.
auto ActionShowMenu () -> void override
 Displays a window in imgui.
auto render () const -> void override
 Function used to draw things to screen, useful for things such as debug drawing.
Public Member Functions inherited from Action
 Action ()=default
 Action (const Action &)=default
auto operator= (const Action &) -> Action &=default
virtual ~Action ()=default
 Action (Action &&other) noexcept=default
auto operator= (Action &&other) noexcept -> Action &=default
auto operator== (const Action &other) const -> bool
 Action (std::string name)
 Action (std::string name, float duration)
 Action (std::string name, float duration, const th::Bezier &bezierCurve, float initialDelay, float endingDelay)
auto update (float dt) -> void
 Universal update function that handles calling init, update, and end at the right time.
auto shouldRemove () const -> bool
auto getOwner () const -> Entity *
auto setOwner (Entity *newObject) -> void
auto getHasInitialized () const -> bool
auto getHasExecuted () const -> bool
auto getHasEnded () const -> bool
auto isPaused () const -> bool
auto setPaused (bool newState) -> void
auto isBlocking () const -> bool
auto setBlocking (bool newState) -> void
auto setInitialDelay (float delay) -> void
auto setEndingDelay (float delay) -> void
auto getName () -> std::string
 Function used for displaying info about what an Action does.
auto getCompletionPercentage () const -> float
 Function used to see how much the action has completed.

Private Attributes

std::string eventToBroadcast
std::unique_ptr< MessagemessageToBroadcast = std::make_unique<Message>()

Additional Inherited Members

Protected Member Functions inherited from Action
auto percentageComplete () const -> float
template<typename T>
auto lerpBasedOnTime (const T &start, const T &end) -> T
Protected Attributes inherited from Action
EntitychangingObject = nullptr
std::string actionName = "BaseAction"

Detailed Description

An action that broadcasts a message once it has finished executing.

@BroadcastMessageAction.h

Constructor & Destructor Documentation

◆ BroadcastMessageAction() [1/6]

BroadcastMessageAction::BroadcastMessageAction ( )
default
Here is the call graph for this function:
Here is the caller graph for this function:

◆ BroadcastMessageAction() [2/6]

BroadcastMessageAction::BroadcastMessageAction ( const BroadcastMessageAction & other)
Here is the call graph for this function:

◆ ~BroadcastMessageAction()

BroadcastMessageAction::~BroadcastMessageAction ( )
overridedefault

◆ BroadcastMessageAction() [3/6]

BroadcastMessageAction::BroadcastMessageAction ( BroadcastMessageAction && other)
defaultnoexcept
Here is the call graph for this function:

◆ BroadcastMessageAction() [4/6]

BroadcastMessageAction::BroadcastMessageAction ( std::string eventToBroadcast,
std::unique_ptr< Message > messageToBroadcast )
Here is the call graph for this function:

◆ BroadcastMessageAction() [5/6]

BroadcastMessageAction::BroadcastMessageAction ( std::string eventToBroadcast,
std::unique_ptr< Message > messageToBroadcast,
float duration )
Here is the call graph for this function:

◆ BroadcastMessageAction() [6/6]

BroadcastMessageAction::BroadcastMessageAction ( std::string eventToBroadcast,
std::unique_ptr< Message > messageToBroadcast,
float duration,
const th::Bezier & easingFunction,
float initialDelay,
float endingDelay )
Here is the call graph for this function:

Member Function Documentation

◆ ActionShowMenu()

void BroadcastMessageAction::ActionShowMenu ( ) ->void
overridevirtual

Displays a window in imgui.

Reimplemented from Action.

◆ end()

auto BroadcastMessageAction::end ( ) ->void
overridevirtual

Virtual function that is called once, when an Action is finished executing.

Reimplemented from Action.

Here is the call graph for this function:

◆ execute()

auto BroadcastMessageAction::execute ( ) ->void
overridevirtual

Virtual function that is called every frame to change a game object.

Reimplemented from Action.

◆ init()

auto BroadcastMessageAction::init ( ) ->void
overridevirtual

Virtual function that is called once, when the Action is first starting up.

Reimplemented from Action.

◆ operator=() [1/2]

auto BroadcastMessageAction::operator= ( BroadcastMessageAction && other) ->BroadcastMessageAction &=default
defaultnoexcept
Here is the call graph for this function:

◆ operator=() [2/2]

auto BroadcastMessageAction::operator= ( const BroadcastMessageAction & other) ->BroadcastMessageAction &
Here is the call graph for this function:

◆ render()

void BroadcastMessageAction::render ( ) const->void
overridevirtual

Function used to draw things to screen, useful for things such as debug drawing.

Reimplemented from Action.

Member Data Documentation

◆ eventToBroadcast

std::string BroadcastMessageAction::eventToBroadcast
private

◆ messageToBroadcast

std::unique_ptr<Message> BroadcastMessageAction::messageToBroadcast = std::make_unique<Message>()
private

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