Difference between revisions of "GetGameTime"

From King Arthur's Gold Wiki
Jump to: navigation, search
(Created page with "<onlyinclude> Returns the game time (number of ticks) as an int. </onlyinclude> <syntaxhighlight lang="cpp"> int getGameTime() </syntaxhighlight> Example from Entities/Character...")
(No difference)

Revision as of 19:40, 22 August 2012

Returns the game time (number of ticks) as an int.

int getGameTime()

Example from Entities/Characters/Scripts/BuilderAnim.as:

Vec2f p = this.getBlob().getPosition() + Vec2f(0.0f, -this.getBlob().getHeight() * 2.0f);
position2di pos = getDriver().getScreenPosFromWorldPos( p );
pos.X -= 16;
pos.Y += -3 + Maths::FastSin(getGameTime()/4.5f)*3.0f;GUI::DrawIcon( "GUI/PartyIndicator.png", 2, dimension2di(16, 16), pos, getCamera().targetDistance );