mirror of
https://github.com/nothke/quality-control.git
synced 2024-11-10 12:53:43 +00:00
19 lines
426 B
C#
19 lines
426 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class ProductReceiver : MonoBehaviour
|
|
{
|
|
private void OnTriggerEnter(Collider otherCollider)
|
|
{
|
|
var product = otherCollider.GetComponentInParent<Product>();
|
|
|
|
if (product != null)
|
|
{
|
|
Scoreboard.Instance.ScoreProduct(product);
|
|
|
|
Destroy(product.gameObject);
|
|
}
|
|
}
|
|
}
|