pos(x: number , y: number ): PosComp

Set the position of a Game Object.

paramx- The x position to set.

paramy- The y position to set.

// This game object will draw a "bean" sprite at (100, 200)
add([
    pos(100, 200),
    sprite("bean"),
]);

returnsThe position comp.

sincev2000.0

groupComponents

pos(xy: number ): PosComp

pos(p: Vec2 ): PosComp

pos(): PosComp