Skip to content

COP_pool_receiver_object_template

Kamran Wali edited this page Dec 2, 2024 · 7 revisions

Inherits: Node

Node template script for creating, or converting existing script, new scripts that will receive pool objects from the pool object manager..

Description

COP_pool_receiver_object_template is a Node template sceript. You can use this template script to create new scripts/objects that will receive pool objects from the pool object manager.. You can also add these methods and properties to your existing script to make your script into a pool object receiver. It is the methods and properties that makes a script to a pool object receiver. Note: The pool object receiver MUST be a child of Node script or any child that is also a child of Node.

Tutorial

Properties

Type Name Default Value
COP_PoolHelper pool_manager

Methods

Return Type Name
void _receive_pool_object( Node object )
bool _is_pool_receiver()

Property Descriptions

COP_PoolHelper pool_manager

This is the resource reference to the pool object manager. This property will be used by this script for requesting pool objects. See the method _receive_pool_object() for more details.


Method Descriptions

void _receive_pool_object ( Node object )

This is the method that will receive the pool object from the pool object manager.. When the pool object manager. sends a pool object then this is the method that will receive it. Note: If the type of the receive object is known then you can change the type of the parameter to that one.


bool _is_pool_receiver ()

This method checks if the object is a pool object receiver, which it is, and always returns true. This method is needed for duck typing check and should NOT be overridden or chagned.


Clone this wiki locally