// 아이템은 특정한 턴에 생성 된다. public void ItemSpawn() { if (tileMapManager.currentItems.Count >= maximumItem) { return; } if (itemIndex < generateTurn.Length && GameManager.Instance.TurnCount >= generateTurn[itemIndex]) { Vector3 spawnPosition = tileMapManager.GetRandomNomalTilePosition(); Coordinates spawnCoordinates = tileMapManager.GetCoordFromPosition(spawnPosition); ItemObject item = Instantiate(itemPrefab, spawnPosition + Vector3.up, Quaternion.Euler(90, 0, 0)); item.coordinates = spawnCoordinates; tileMapManager.currentItems.Add(spawnCoordinates, item); tileMapManager.currentObject.Add(spawnCoordinates, TileMapManager.ObjectType.item); itemIndex++; } }