Reworking item spawn, adding item conversion.

This commit is contained in:
Khauvinkh
2024-08-18 14:44:44 +02:00
parent d2c3dff101
commit 683f839905
50 changed files with 2219 additions and 766 deletions

View File

@@ -14,7 +14,7 @@ public class ProductSpawner : MonoBehaviour
public struct ProductionPhase
{
public ProductionPhaseType Type;
public ProductDescription Description;
public ProductType ProductType;
[Min(1f)]
public float Duration;
[Min(1f)]
@@ -62,7 +62,7 @@ public class ProductSpawner : MonoBehaviour
_spawnTimer = currentPhase.SpawnInterval;
Instantiate(currentPhase.Description.GetRandomProduct(), transform.position, Quaternion.identity);
ProductType.SpawnProduct(currentPhase.ProductType, transform);
}
if (_remainingDuration <= 0)