Difference between revisions of "CBlob::setPosition"

From King Arthur's Gold Wiki
Jump to: navigation, search
(Created page with "<onlyinclude> </onlyinclude> <syntaxhighlight lang="cpp"> void setPosition( Vec2f pos ) </syntaxhighlight> Object method of: CBlob Category:Scripting [[Category...")
 
Line 1: Line 1:
 
<onlyinclude>
 
<onlyinclude>
+
Sets a new position for the blob.
 
</onlyinclude>
 
</onlyinclude>
+
 
 +
This function will set the new position for the blob.
 +
 
 
<syntaxhighlight lang="cpp">
 
<syntaxhighlight lang="cpp">
 
   
 
   
Line 8: Line 10:
 
   
 
   
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
Example, which would stop physical movement of given blob:
 +
<syntaxhighlight lang="cpp">
 +
this.setVelocity(Vec2f(0,0));
 +
</syntaxhighlight>
 +
 
   
 
   
 
Object method of: [[CBlob]]
 
Object method of: [[CBlob]]
 
[[Category:Scripting]]
 
[[Category:Scripting]]
 
[[Category:Object Methods]]
 
[[Category:Object Methods]]

Revision as of 00:52, 29 September 2012

Sets a new position for the blob.


This function will set the new position for the blob.

 
void setPosition( Vec2f pos )

Example, which would stop physical movement of given blob:

this.setVelocity(Vec2f(0,0));


Object method of: CBlob