mirror of
https://github.com/nothke/quality-control.git
synced 2025-08-30 07:23:43 +00:00
Reworking item spawn, adding item conversion.
This commit is contained in:
@@ -19,16 +19,19 @@ public class ProductReceiver : MonoBehaviour
|
||||
}
|
||||
|
||||
//enteredBodies.Add(rb);
|
||||
|
||||
if (rb.GetComponent<DefectiveProduct>())
|
||||
|
||||
if (rb.TryGetComponent(out Product product))
|
||||
{
|
||||
defectiveProductCount++;
|
||||
}
|
||||
else
|
||||
{
|
||||
normalProductCount++;
|
||||
}
|
||||
if (product.Defect != DefectType.None)
|
||||
{
|
||||
defectiveProductCount++;
|
||||
}
|
||||
else
|
||||
{
|
||||
normalProductCount++;
|
||||
}
|
||||
|
||||
Destroy(rb.gameObject);
|
||||
Destroy(rb.gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user