point (x, y)
Problem it solves
Several blocks in this extension (like `move to` or `place angle from`) need a plain location, not a sprite, but Arcade doesn't have a simple built-in "point" value.
What this block does
Creates a reusable point value at the given x, y coordinates.
The block
Block ID: spriteutilpoint
Parameters
| Name | Type | Default | Meaning |
|---|---|---|---|
| x | number | — | X coordinate |
| y | number | — | Y coordinate |
Returns
util.Point — A point that can be used anywhere a location is expected.
Example
let target = spriteutils.point(80, 60) console.log(target.x)
Add the extension
Add github:jwunderl/arcade-sprite-util to your project, or open: Import arcade-sprite-util.