// Use type `float64` for json unmarshalling of numbers.
typeDirectionstruct{
Dxint32`json:"dx,omitempty"`
Dyint32`json:"dy,omitempty"`
}
typeVec2Dstruct{
Xfloat64`json:"x,omitempty"`
Yfloat64`json:"y,omitempty"`
}
typePolygon2Dstruct{
Anchor*Vec2D`json:"-"`// This "Polygon2D.Anchor" is used to be assigned to "B2BodyDef.Position", which in turn is used as the position of the FIRST POINT of the polygon.
Points[]*Vec2D`json:"-"`
/*
Whenusedtorepresenta"polyline directly drawn in a `Tmx file`",wecaninitializeboth"Anchor"and"Points"simultaneously.
Yetwhenusedtorepresenta"polyline drawn in a `Tsx file`",wehavetofirstinitialize"Points w.r.t. center of the tile-rectangle",andthen"Anchor(initially nil) of the tile positioned in the `Tmx file`".
Refertohttps://shimo.im/docs/SmLJJhXm2C8XMzZT for more information.
*/
/*
[WARNING]Usedtocache"`TileWidth & TileHeight` of a Tsx file"only.
*/
TileWidthint
TileHeightint
/*
[WARNING]Usedtocache"`Width & TileHeight` of an object in Tmx file"only.