Difference between revisions of "CBlob::getPosition"

From King Arthur's Gold Wiki
Jump to: navigation, search
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
 
</onlyinclude>
 
</onlyinclude>
  
This function will give you the current Vec2f world position of the blob.  
+
This function will give you the current Vec2f position of the blob.  
 
<syntaxhighlight lang="cpp">
 
<syntaxhighlight lang="cpp">
 
Vec2f getPosition()
 
Vec2f getPosition()
Line 9: Line 9:
  
  
Example
+
Example (in this case, 'this' represents a blob):
 
<syntaxhighlight lang="cpp">
 
<syntaxhighlight lang="cpp">
Vec2f pos = this.getBlob().getPosition();
+
Vec2f pos = this.getPosition();
 
</syntaxhighlight>
 
</syntaxhighlight>
 
   
 
   

Latest revision as of 00:57, 29 September 2012

Returns a Vec2f value with current blob's position.


This function will give you the current Vec2f position of the blob.

Vec2f getPosition()


Example (in this case, 'this' represents a blob):

Vec2f pos = this.getPosition();

Object method of: CBlob