summaryrefslogtreecommitdiff
path: root/modules/visual_script/visual_script_yield_nodes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/visual_script/visual_script_yield_nodes.cpp')
-rw-r--r--modules/visual_script/visual_script_yield_nodes.cpp28
1 files changed, 21 insertions, 7 deletions
diff --git a/modules/visual_script/visual_script_yield_nodes.cpp b/modules/visual_script/visual_script_yield_nodes.cpp
index b300aec385..2296745ad0 100644
--- a/modules/visual_script/visual_script_yield_nodes.cpp
+++ b/modules/visual_script/visual_script_yield_nodes.cpp
@@ -81,10 +81,18 @@ String VisualScriptYield::get_caption() const {
String VisualScriptYield::get_text() const {
switch (yield_mode) {
- case YIELD_RETURN: return ""; break;
- case YIELD_FRAME: return "Next Frame"; break;
- case YIELD_PHYSICS_FRAME: return "Next Physics Frame"; break;
- case YIELD_WAIT: return rtos(wait_time) + " sec(s)"; break;
+ case YIELD_RETURN:
+ return "";
+ break;
+ case YIELD_FRAME:
+ return "Next Frame";
+ break;
+ case YIELD_PHYSICS_FRAME:
+ return "Next Physics Frame";
+ break;
+ case YIELD_WAIT:
+ return rtos(wait_time) + " sec(s)";
+ break;
}
return String();
@@ -122,9 +130,15 @@ public:
case VisualScriptYield::YIELD_RETURN:
ret = STEP_EXIT_FUNCTION_BIT;
break; //return the yield
- case VisualScriptYield::YIELD_FRAME: state->connect_to_signal(tree, "idle_frame", Array()); break;
- case VisualScriptYield::YIELD_PHYSICS_FRAME: state->connect_to_signal(tree, "physics_frame", Array()); break;
- case VisualScriptYield::YIELD_WAIT: state->connect_to_signal(tree->create_timer(wait_time).ptr(), "timeout", Array()); break;
+ case VisualScriptYield::YIELD_FRAME:
+ state->connect_to_signal(tree, "idle_frame", Array());
+ break;
+ case VisualScriptYield::YIELD_PHYSICS_FRAME:
+ state->connect_to_signal(tree, "physics_frame", Array());
+ break;
+ case VisualScriptYield::YIELD_WAIT:
+ state->connect_to_signal(tree->create_timer(wait_time).ptr(), "timeout", Array());
+ break;
}
*p_working_mem = state;