Difference between revisions of "GetTicksASecond"
From King Arthur's Gold Wiki
Shadlington (Talk | contribs) (Created page with "<onlyinclude> Returns the number of ticks per second. </onlyinclude> This method is part of the Kernel namespace so you need to prefix calls to it with 'Kernel::'. <syntaxhighli...") |
(No difference)
|
Latest revision as of 19:48, 22 August 2012
Returns the number of ticks per second.
This method is part of the Kernel namespace so you need to prefix calls to it with 'Kernel::'.
int Kernel::getTicksASecond()
Example from Entities/Natural/Scripts/FlowerLogic.as:
if ( canGrowAt(getMap(),(this.getPosition() + Vec2f(0.0f,6.0f) )) && isNotPickedUp( this ) ) { if ( Random(10) == 0 ) { f32 rate = 0.5f / Kernel::getTicksASecond(); heal(this, rate); } }