This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
专业(SIM)
UnigineEditor
界面概述
资源工作流程
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
Containers
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
创建内容
内容优化
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine::Signal Class

Header: #include <UnigineSignal.h>
Read More

Signal Class

Members


static SignalPtr create ( ) #

static SignalPtr create ( const Signal& ) #

Arguments

  • const Signal&

static SignalPtr create ( Signal&& ) #

Arguments

  • Signal&&

void * add ( CallbackBase* callback ) #

Adds a callback function to be fired when the signal is invoked (subscription for the signal). Callback functions can be used to determine specific actions to be performed when the signal is invoked.

Arguments

  • CallbackBase* callback

Return value

ID of the added callback, if the callback was added successfully; otherwise, nullptr. This ID can be used to remove this callback when necessary.

bool remove ( void* id ) #

Removes the specified callback from the list of callbacks associated with the signal. Callback functions can be used to determine specific actions to be performed when the signal is invoked.

Arguments

  • void* id - Callback ID obtained when adding it.

Return value

true if the callback with the given ID was removed successfully; otherwise false.

void clear ( ) #

Clears the list of callbacks subscribed for the signal (all subscriptions are removed).

bool empty ( ) const#

Returns a value indicating if the list of subscriptions for the signal is empty.

Return value

true if the list of subscriptions for the signal is empty otherwise false.

int size ( ) const#

Returns the total number of callback functions subscribed for the signal.

Return value

Number of subscriptions for the signal.

template<typename ... Ts> invoke ( Ts&& args ) #

Invokes the signal. Callback functions subscribed for this signal are executed according to their order in the list.

Arguments

  • Ts&& args

void swap ( Signal& first, Signal& second ) #

Swaps the two specified signals.

Arguments

  • Signal& first - First signal.
  • Signal& second - Second signal.
Last update: 2022-10-10
Build: ()