From 918a82646a5fe9a036863caf1a6200f275c0cef2 Mon Sep 17 00:00:00 2001 From: Ahmet Affan Date: Wed, 13 Nov 2024 20:11:41 +0300 Subject: [PATCH] Update README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 39735cf..d6bd8d0 100644 --- a/README.md +++ b/README.md @@ -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 + + +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