Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
temidaradev authored Nov 13, 2024
1 parent d4b402a commit 918a826
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ Here is an example: `var Idle = esset.GetAsset(assets, "path/to/your/asset.png")

## GetMultipleAssets

Important thing is create a folder and put every single tile item (.png) like this ![Resource](./resources/image.png) and then you can use that function easily like this: `var Tile = esset.GetMultipleAssets(assets, "path/to/your/*.png")` Because of you are selecting more than 1 image our `*ebiten.Image` is a slice you can select by index like this: `TileComponent := assets.Tile[0]` or if you need to get random asset from that folder you can do like this: `TileRandom := assets.Tile[rand.Intn(len(assets.Tile))]`
Important thing is create a folder and put every single tile item (.png) like this

<img src="resources/image.png" height="400">
and then you can use that function easily like this: `var Tile = esset.GetMultipleAssets(assets, "path/to/your/*.png")` Because of you are selecting more than 1 image our `*ebiten.Image` is a slice you can select by index like this: `TileComponent := assets.Tile[0]` or if you need to get random asset from that folder you can do like this: `TileRandom := assets.Tile[rand.Intn(len(assets.Tile))]`

## UseFont

Expand Down

0 comments on commit 918a826

Please sign in to comment.