summaryrefslogtreecommitdiff
path: root/modules/multiplayer/multiplayer_spawner.h
diff options
context:
space:
mode:
Diffstat (limited to 'modules/multiplayer/multiplayer_spawner.h')
-rw-r--r--modules/multiplayer/multiplayer_spawner.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/multiplayer/multiplayer_spawner.h b/modules/multiplayer/multiplayer_spawner.h
index 3793c2d111..8a54140e32 100644
--- a/modules/multiplayer/multiplayer_spawner.h
+++ b/modules/multiplayer/multiplayer_spawner.h
@@ -71,12 +71,13 @@ private:
ObjectID spawn_node;
HashMap<ObjectID, SpawnInfo> tracked_nodes;
uint32_t spawn_limit = 0;
+ Callable spawn_function;
void _update_spawn_node();
void _track(Node *p_node, const Variant &p_argument, int p_scene_id = INVALID_ID);
void _node_added(Node *p_node);
void _node_exit(ObjectID p_id);
- void _node_ready(ObjectID p_id);
+ void _spawn_notify(ObjectID p_id);
Vector<String> _get_spawnable_scenes() const;
void _set_spawnable_scenes(const Vector<String> &p_scenes);
@@ -106,6 +107,8 @@ public:
void set_spawn_path(const NodePath &p_path);
uint32_t get_spawn_limit() const { return spawn_limit; }
void set_spawn_limit(uint32_t p_limit) { spawn_limit = p_limit; }
+ void set_spawn_function(Callable p_spawn_function) { spawn_function = p_spawn_function; }
+ Callable get_spawn_function() const { return spawn_function; }
const Variant get_spawn_argument(const ObjectID &p_id) const;
int find_spawnable_scene_index_from_object(const ObjectID &p_id) const;
@@ -114,8 +117,6 @@ public:
Node *instantiate_custom(const Variant &p_data);
Node *instantiate_scene(int p_idx);
- GDVIRTUAL1R(Node *, _spawn_custom, const Variant &);
-
MultiplayerSpawner() {}
};