summaryrefslogtreecommitdiff
path: root/scene/main/node.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/main/node.cpp')
-rwxr-xr-xscene/main/node.cpp76
1 files changed, 38 insertions, 38 deletions
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index 658701dcc7..c2a31b4a8b 100755
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -54,13 +54,13 @@ void Node::_notification(int p_notification) {
get_script_instance()->call_multilevel(SceneStringNames::get_singleton()->_process, ptr, 1);
}
} break;
- case NOTIFICATION_FIXED_PROCESS: {
+ case NOTIFICATION_PHYSICS_PROCESS: {
if (get_script_instance()) {
- Variant time = get_fixed_process_delta_time();
+ Variant time = get_physics_process_delta_time();
const Variant *ptr[1] = { &time };
- get_script_instance()->call_multilevel(SceneStringNames::get_singleton()->_fixed_process, ptr, 1);
+ get_script_instance()->call_multilevel(SceneStringNames::get_singleton()->_physics_process, ptr, 1);
}
} break;
@@ -129,8 +129,8 @@ void Node::_notification(int p_notification) {
set_process(true);
}
- if (get_script_instance()->has_method(SceneStringNames::get_singleton()->_fixed_process)) {
- set_fixed_process(true);
+ if (get_script_instance()->has_method(SceneStringNames::get_singleton()->_physics_process)) {
+ set_physics_process(true);
}
get_script_instance()->call_multilevel_reversed(SceneStringNames::get_singleton()->_ready, NULL, 0);
@@ -367,46 +367,46 @@ void Node::move_child_notify(Node *p_child) {
// to be used when not wanted
}
-void Node::set_fixed_process(bool p_process) {
+void Node::set_physics_process(bool p_process) {
- if (data.fixed_process == p_process)
+ if (data.physics_process == p_process)
return;
- data.fixed_process = p_process;
+ data.physics_process = p_process;
- if (data.fixed_process)
- add_to_group("fixed_process", false);
+ if (data.physics_process)
+ add_to_group("physics_process", false);
else
- remove_from_group("fixed_process");
+ remove_from_group("physics_process");
- data.fixed_process = p_process;
- _change_notify("fixed_process");
+ data.physics_process = p_process;
+ _change_notify("physics_process");
}
-bool Node::is_fixed_processing() const {
+bool Node::is_physics_processing() const {
- return data.fixed_process;
+ return data.physics_process;
}
-void Node::set_fixed_process_internal(bool p_process_internal) {
+void Node::set_physics_process_internal(bool p_process_internal) {
- if (data.fixed_process_internal == p_process_internal)
+ if (data.physics_process_internal == p_process_internal)
return;
- data.fixed_process_internal = p_process_internal;
+ data.physics_process_internal = p_process_internal;
- if (data.fixed_process_internal)
- add_to_group("fixed_process_internal", false);
+ if (data.physics_process_internal)
+ add_to_group("physics_process_internal", false);
else
- remove_from_group("fixed_process_internal");
+ remove_from_group("physics_process_internal");
- data.fixed_process_internal = p_process_internal;
- _change_notify("fixed_process_internal");
+ data.physics_process_internal = p_process_internal;
+ _change_notify("physics_process_internal");
}
-bool Node::is_fixed_processing_internal() const {
+bool Node::is_physics_processing_internal() const {
- return data.fixed_process_internal;
+ return data.physics_process_internal;
}
void Node::set_pause_mode(PauseMode p_mode) {
@@ -1010,10 +1010,10 @@ bool Node::can_process() const {
return true;
}
-float Node::get_fixed_process_delta_time() const {
+float Node::get_physics_process_delta_time() const {
if (data.tree)
- return data.tree->get_fixed_process_time();
+ return data.tree->get_physics_process_time();
else
return 0;
}
@@ -2719,9 +2719,9 @@ void Node::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_filename"), &Node::get_filename);
ClassDB::bind_method(D_METHOD("propagate_notification", "what"), &Node::propagate_notification);
ClassDB::bind_method(D_METHOD("propagate_call", "method", "args", "parent_first"), &Node::propagate_call, DEFVAL(Array()), DEFVAL(false));
- ClassDB::bind_method(D_METHOD("set_fixed_process", "enable"), &Node::set_fixed_process);
- ClassDB::bind_method(D_METHOD("get_fixed_process_delta_time"), &Node::get_fixed_process_delta_time);
- ClassDB::bind_method(D_METHOD("is_fixed_processing"), &Node::is_fixed_processing);
+ ClassDB::bind_method(D_METHOD("set_physics_process", "enable"), &Node::set_physics_process);
+ ClassDB::bind_method(D_METHOD("get_physics_process_delta_time"), &Node::get_physics_process_delta_time);
+ ClassDB::bind_method(D_METHOD("is_physics_processing"), &Node::is_physics_processing);
ClassDB::bind_method(D_METHOD("get_process_delta_time"), &Node::get_process_delta_time);
ClassDB::bind_method(D_METHOD("set_process", "enable"), &Node::set_process);
ClassDB::bind_method(D_METHOD("is_processing"), &Node::is_processing);
@@ -2742,8 +2742,8 @@ void Node::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_process_internal", "enable"), &Node::set_process_internal);
ClassDB::bind_method(D_METHOD("is_processing_internal"), &Node::is_processing_internal);
- ClassDB::bind_method(D_METHOD("set_fixed_process_internal", "enable"), &Node::set_fixed_process_internal);
- ClassDB::bind_method(D_METHOD("is_fixed_processing_internal"), &Node::is_fixed_processing_internal);
+ ClassDB::bind_method(D_METHOD("set_physics_process_internal", "enable"), &Node::set_physics_process_internal);
+ ClassDB::bind_method(D_METHOD("is_physics_processing_internal"), &Node::is_physics_processing_internal);
ClassDB::bind_method(D_METHOD("get_tree"), &Node::get_tree);
@@ -2801,7 +2801,7 @@ void Node::_bind_methods() {
BIND_CONSTANT(NOTIFICATION_EXIT_TREE);
BIND_CONSTANT(NOTIFICATION_MOVED_IN_PARENT);
BIND_CONSTANT(NOTIFICATION_READY);
- BIND_CONSTANT(NOTIFICATION_FIXED_PROCESS);
+ BIND_CONSTANT(NOTIFICATION_PHYSICS_PROCESS);
BIND_CONSTANT(NOTIFICATION_PROCESS);
BIND_CONSTANT(NOTIFICATION_PARENTED);
BIND_CONSTANT(NOTIFICATION_UNPARENTED);
@@ -2813,7 +2813,7 @@ void Node::_bind_methods() {
BIND_CONSTANT(NOTIFICATION_PATH_CHANGED);
BIND_CONSTANT(NOTIFICATION_TRANSLATION_CHANGED);
BIND_CONSTANT(NOTIFICATION_INTERNAL_PROCESS);
- BIND_CONSTANT(NOTIFICATION_INTERNAL_FIXED_PROCESS);
+ BIND_CONSTANT(NOTIFICATION_INTERNAL_PHYSICS_PROCESS);
BIND_ENUM_CONSTANT(RPC_MODE_DISABLED);
BIND_ENUM_CONSTANT(RPC_MODE_REMOTE);
@@ -2835,7 +2835,7 @@ void Node::_bind_methods() {
ADD_SIGNAL(MethodInfo("tree_exited"));
//ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "process/process" ),"set_process","is_processing") ;
- //ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "process/fixed_process" ), "set_fixed_process","is_fixed_processing") ;
+ //ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "process/physics_process" ), "set_physics_process","is_physics_processing") ;
//ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "process/input" ), "set_process_input","is_processing_input" ) ;
//ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "process/unhandled_input" ), "set_process_unhandled_input","is_processing_unhandled_input" ) ;
ADD_GROUP("Pause", "pause_");
@@ -2843,7 +2843,7 @@ void Node::_bind_methods() {
ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "editor/display_folded", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_display_folded", "is_displayed_folded");
BIND_VMETHOD(MethodInfo("_process", PropertyInfo(Variant::REAL, "delta")));
- BIND_VMETHOD(MethodInfo("_fixed_process", PropertyInfo(Variant::REAL, "delta")));
+ BIND_VMETHOD(MethodInfo("_physics_process", PropertyInfo(Variant::REAL, "delta")));
BIND_VMETHOD(MethodInfo("_enter_tree"));
BIND_VMETHOD(MethodInfo("_exit_tree"));
BIND_VMETHOD(MethodInfo("_ready"));
@@ -2872,9 +2872,9 @@ Node::Node() {
data.blocked = 0;
data.parent = NULL;
data.tree = NULL;
- data.fixed_process = false;
+ data.physics_process = false;
data.idle_process = false;
- data.fixed_process_internal = false;
+ data.physics_process_internal = false;
data.idle_process_internal = false;
data.inside_tree = false;
data.ready_notified = false;