From 2dfa4588b3b5bba2a84dab239d62b1c285478870 Mon Sep 17 00:00:00 2001 From: miepzerino <o.skotnik@gmail.com> Date: Wed, 02 Apr 2025 22:31:45 +0000 Subject: [PATCH] inventory scrollbar autohide --- Assets/Scripts/Managers/GameManager.cs | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Assets/Scripts/Managers/GameManager.cs b/Assets/Scripts/Managers/GameManager.cs index 41e5ace..524a68a 100644 --- a/Assets/Scripts/Managers/GameManager.cs +++ b/Assets/Scripts/Managers/GameManager.cs @@ -25,6 +25,8 @@ [NonSerialized] public List<Vector3Int> destroyedTiles = new List<Vector3Int>(); public GameObject pickups; + public Tilemap fogTilemap; + public FogOfWar fogOfWar; private void Awake() { @@ -52,6 +54,7 @@ SaveDataMap mapState = SaveSystem.LoadMapState(); if (mapState != null) { + //fogOfWar.LoadFromSaveData(mapState.fogOfWarData); generateTileMap.SetSettingsFromSeed(mapState.seed); if (mapState.destroyedTiles != null && mapState.destroyedTiles.Count > 0) { @@ -165,10 +168,9 @@ if (playerInventory != null) { Item item = dropable.dropable; - playerInventory.AddItem(item, dropable.dropAmount); - Debug.Log("CellWorldPosition: " + cellWorldPosition); - Debug.Log("TileGameObjectPosition: " + tileGameObject.transform.position); - CharacterLootObtained(tileGameObject.transform.position, item, dropable.dropAmount); + int dropAmount = dropable.GetRandomDropAmount(); + playerInventory.AddItem(item, dropAmount); + CharacterLootObtained(tileGameObject.transform.position, item, dropAmount); } } tilemap.SetTile(cellCoord, null); -- Gitblit v1.9.3