diff options
Diffstat (limited to 'scene/main/node.h')
| -rw-r--r-- | scene/main/node.h | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/scene/main/node.h b/scene/main/node.h index 4d05dd381..5c6147d64 100644 --- a/scene/main/node.h +++ b/scene/main/node.h @@ -43,7 +43,7 @@ class Node : public Object { OBJ_TYPE( Node, Object ); OBJ_CATEGORY("Nodes"); - + public: enum PauseMode { @@ -59,16 +59,16 @@ public: bool operator()(const Node* p_a, const Node* p_b) const { return p_b->is_greater_than(p_a); } }; -private: - +private: + struct GroupData { - - bool persistent; + + bool persistent; GroupData() { persistent=false; } }; - + struct Data { - + String filename; Ref<SceneState> instance_state; Ref<SceneState> inherited_state; @@ -90,11 +90,11 @@ private: Viewport *viewport; - + HashMap< StringName, GroupData,StringNameHasher> grouped; List<Node*>::Element *OW; // owned element List<Node*> owned; - + PauseMode pause_mode; Node *pause_owner; // variables used to properly sort the node when processing, ignored otherwise @@ -112,10 +112,10 @@ private: } data; - - void _print_tree(const Node *p_node); - + + void _print_tree(const Node *p_node); + virtual bool _use_builtin_script() const { return true; } Node *_get_node(const NodePath& p_path) const; Node *_get_child_by_name(const StringName& p_name) const; @@ -124,7 +124,7 @@ private: void _validate_child_name(Node *p_name, bool p_force_human_readable=false); - void _propagate_reverse_notification(int p_notification); + void _propagate_reverse_notification(int p_notification); void _propagate_deferred_notification(int p_notification, bool p_reverse); void _propagate_enter_tree(); void _propagate_ready(); @@ -147,15 +147,15 @@ protected: void _block() { data.blocked++; } void _unblock() { data.blocked--; } - void _notification(int p_notification); - + void _notification(int p_notification); + virtual void add_child_notify(Node *p_child); virtual void remove_child_notify(Node *p_child); virtual void move_child_notify(Node *p_child); //void remove_and_delete_child(Node *p_child); - - void _propagate_replace_owner(Node *p_owner,Node* p_by_owner); - + + void _propagate_replace_owner(Node *p_owner,Node* p_by_owner); + static void _bind_methods(); friend class SceneState; @@ -181,15 +181,15 @@ public: NOTIFICATION_UNPARENTED=19, NOTIFICATION_INSTANCED=20, }; - - /* NODE/TREE */ - + + /* NODE/TREE */ + StringName get_name() const; void set_name(const String& p_name); - + void add_child(Node *p_child,bool p_legible_unique_name=false); void remove_child(Node *p_child); - + int get_child_count() const; Node *get_child(int p_index) const; bool has_node(const NodePath& p_path) const; @@ -197,43 +197,43 @@ public: Node* find_node(const String& p_mask,bool p_recursive=true,bool p_owned=true) const; bool has_node_and_resource(const NodePath& p_path) const; Node *get_node_and_resource(const NodePath& p_path,RES& r_res) const; - + Node *get_parent() const; _FORCE_INLINE_ SceneTree *get_tree() const { ERR_FAIL_COND_V( !data.tree, NULL ); return data.tree; } _FORCE_INLINE_ bool is_inside_tree() const { return data.inside_tree; } - + bool is_a_parent_of(const Node *p_node) const; bool is_greater_than(const Node *p_node) const; - + NodePath get_path() const; NodePath get_path_to(const Node *p_node) const; - + void add_to_group(const StringName& p_identifier,bool p_persistent=false); void remove_from_group(const StringName& p_identifier); bool is_in_group(const StringName& p_identifier) const; - + struct GroupInfo { - + StringName name; bool persistent; }; - + void get_groups(List<GroupInfo> *p_groups) const; - + void move_child(Node *p_child,int p_pos); void raise(); - + void set_owner(Node *p_owner); Node *get_owner() const; void get_owned_by(Node *p_by,List<Node*> *p_owned); - + void remove_and_skip(); int get_index() const; - + void print_tree(); - + void set_filename(const String& p_filename); String get_filename() const; @@ -242,9 +242,9 @@ public: /* NOTIFICATIONS */ - + void propagate_notification(int p_notification); - + /* PROCESSING */ void set_fixed_process(bool p_process); float get_fixed_process_delta_time() const; |
