Gládio Cítrico

Ramu 0.7b doc

doc homeRamu

static Object Ramu.clickedPosition

Keys

Description

Object with the clicked/touched position on canvas. The object is emptied on the end of frame.
Note: it will return wrong values if the canvas is distorced (like with css).

let obj = new GameObj();
if (!Ramu.Utils.isEmpty(Ramu.clickedPosition)){
   obj.x = Ramu.clickedPosition.X;
   obj.y = Ramu.clickedPosition.Y;
}

See also Ramu.mousePosition.