Returns the number of values stored in the given priority queue.



参数 描述
id The id of the data structure to check.

返回: Real(实数)


This function will return the "size" of the priority queue, ie: the number of items that have been prioritized in it.


if !ds_priority_empty(control_priority)
   num = ds_priority_size(control_priority);

The above code checks a ds_priority queue to see if it is empty or not, and if it is not, it gets the number of items that it contains and stores the value in a variable.

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