Difference between revisions of "CBlob::isOnGround"

From King Arthur's Gold Wiki
Jump to: navigation, search
 
Line 3: Line 3:
 
</onlyinclude>
 
</onlyinclude>
  
This function is most simple way to determine if given blob is in air or on the ground.
+
This function is the most simple way to determine if given blob is in air or on the ground.
 
(Example, if player is jumping or walking on the ground)
 
(Example, if player is jumping or walking on the ground)
  

Latest revision as of 22:31, 1 October 2012

Returns true if blob is on ground, false if blob is in air.


This function is the most simple way to determine if given blob is in air or on the ground. (Example, if player is jumping or walking on the ground)

bool isOnGround()


Example:

if( blob.isOnGround() )
{
     ...
     /*
          Insert any logic here, which you only want to use if blob is currently on ground
     */
}

Object method of: CBlob