| | |
| | | [NonSerialized] |
| | | public List<Vector3Int> destroyedTiles = new List<Vector3Int>(); |
| | | public GameObject pickups; |
| | | public Tilemap fogTilemap; |
| | | public FogOfWar fogOfWar; |
| | | |
| | | private void Awake() |
| | | { |
| | |
| | | SaveDataMap mapState = SaveSystem.LoadMapState(); |
| | | if (mapState != null) |
| | | { |
| | | //fogOfWar.LoadFromSaveData(mapState.fogOfWarData); |
| | | generateTileMap.SetSettingsFromSeed(mapState.seed); |
| | | if (mapState.destroyedTiles != null && mapState.destroyedTiles.Count > 0) |
| | | { |
| | |
| | | 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); |