ds_priority_copy

Copies a priority queue to another.

语法:

ds_priority_copy(id, source);


参数 描述
id The id of the priority queue to copy to.
source The id of the priority queue to copy from.


返回: N/A(无返回值)


描述

This function can be used to copy the contents of one priority queue into another. Note that this does NOT remove the contents from the original priority queue, nor does it destroy the original priority queue. When using this function the priority queue being copied to must have been previously created and if it contained any items before the copy, then these will be cleared first (meaning this information will be lost).


例如:

with (instance_create_layer(x, y, "Enemies", obj_Enemy))
   {
   p_queue = ds_priority_create();
   ds_priority_copy(p_queue, other.p_queue);
   }

The above function creates a new instance and then in that instance it creates a new ds_priority and copies the contents of the priority queue in the instance running the code block, into the newly created instance priority queue.


上一页: DS Priority Queues
下一页: ds_priority_read
© Copyright YoYo Games Ltd. 2018 All Rights Reserved