Difference between revisions of "GetPlayingBlob"
From King Arthur's Gold Wiki
Shadlington (Talk | contribs) |
Shadlington (Talk | contribs) |
||
Line 1: | Line 1: | ||
<onlyinclude> | <onlyinclude> | ||
− | Returns a reference to the [[CBlob]] with the given index in the list of blobs that | + | Returns a reference to the [[CBlob]] with the given index in the list of blobs that are currently active - i.e. not settled map blocks or in inventories. |
</onlyinclude> | </onlyinclude> | ||
<syntaxhighlight lang="cpp">[[CBlob]]@ getPlayingBlob(u32 index)</syntaxhighlight> | <syntaxhighlight lang="cpp">[[CBlob]]@ getPlayingBlob(u32 index)</syntaxhighlight> | ||
− | Similar to [[getBlob]], but | + | Similar to [[getBlob]], but only for active [[CBlob]]s. |
− | + | Usage example: | |
− | + | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
for ( int i = 0; i < [[getPlayingBlobsSize]](); i++ ) | for ( int i = 0; i < [[getPlayingBlobsSize]](); i++ ) | ||
{ | { | ||
[[CBlob]]@ blob = getPlayingBlob(i); | [[CBlob]]@ blob = getPlayingBlob(i); | ||
− | // Do something to this | + | // Do something to this blob |
} | } | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 14:22, 15 August 2012
Returns a reference to the CBlob with the given index in the list of blobs that are currently active - i.e. not settled map blocks or in inventories.
[[CBlob]]@ getPlayingBlob(u32 index)
Similar to getBlob, but only for active CBlobs. Usage example:
for ( int i = 0; i < [[getPlayingBlobsSize]](); i++ ) { [[CBlob]]@ blob = getPlayingBlob(i); // Do something to this blob }