pause property

ValueNotifier<bool> pause
getter/setter pair

@en: an custom vertex component constructor.

@zh: 自定义顶点组件构造器 @en: control the game pause through external means.
Suitable for creating multiple flutter_graph_widget
and keeping alive without causing the game engine to consume too much computation

@zh: 从外部决定游戏是否暂停
适用于创建了多个 flutter_graph_widget,
并且 keepAlive 的情况下,又不想让游戏引擎占用过高计算量

Implementation

// VertexComponentNew vertexComponentNew = VertexComponent.new;

/// @en: control the game pause through external means.
/// <br>Suitable for creating multiple flutter_graph_widget
/// <br>and keeping alive without causing the game engine to consume too much computation
///
/// @zh: 从外部决定游戏是否暂停
/// <br>适用于创建了多个 flutter_graph_widget,
/// <br>并且 keepAlive 的情况下,又不想让游戏引擎占用过高计算量
ValueNotifier<bool> pause = ValueNotifier(false);