Difference between revisions of "Vec2f"
From King Arthur's Gold Wiki
m |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<onlyinclude> | <onlyinclude> | ||
− | The Vec2f type is mainly used in the blob for positioning and getting the mouse coordinates. | + | The Vec2f type is mainly used in the blob for positioning and getting the mouse coordinates. |
+ | </onlyinclude> | ||
Vec2f contains two variables '''x''' and '''y'''. | Vec2f contains two variables '''x''' and '''y'''. | ||
Line 14: | Line 15: | ||
pos = this.getPosition(); | pos = this.getPosition(); | ||
pos+50; | pos+50; | ||
− | this. | + | this.setPosition(pos); //previously there was "SetPosition(pos)" but it don't work |
</syntaxhighlight> | </syntaxhighlight> | ||
+ | |||
+ | [[Category:Scripting]] |
Latest revision as of 18:50, 30 May 2013
The Vec2f type is mainly used in the blob for positioning and getting the mouse coordinates.
Vec2f contains two variables x and y.
Vec2f pos ( f32, f32 )
Example
Vec2f pos; pos = this.getPosition(); pos+50; this.setPosition(pos); //previously there was "SetPosition(pos)" but it don't work