Add Stop pause mode implementation

This commit is contained in:
marynate 2014-12-28 00:28:02 +08:00
parent 530d717a67
commit 61fcca7111
1 changed files with 5 additions and 0 deletions

View File

@ -382,6 +382,8 @@ bool Node::can_process() const {
if (get_tree()->is_paused()) { if (get_tree()->is_paused()) {
if (data.pause_mode==PAUSE_MODE_STOP)
return false;
if (data.pause_mode==PAUSE_MODE_PROCESS) if (data.pause_mode==PAUSE_MODE_PROCESS)
return true; return true;
if (data.pause_mode==PAUSE_MODE_INHERIT) { if (data.pause_mode==PAUSE_MODE_INHERIT) {
@ -391,6 +393,9 @@ bool Node::can_process() const {
if (data.pause_owner->data.pause_mode==PAUSE_MODE_PROCESS) if (data.pause_owner->data.pause_mode==PAUSE_MODE_PROCESS)
return true; return true;
if (data.pause_owner->data.pause_mode==PAUSE_MODE_STOP)
return false;
} }
} }