quality-control/Assets/Scripts/Products/Product.cs

17 lines
363 B
C#
Raw Permalink Normal View History

2024-08-17 18:38:25 +00:00
using UnityEngine;
public class Product : MonoBehaviour
{
public ProductType Type;
public DefectType Defect;
2024-08-17 18:38:25 +00:00
public void ApplyDefect(DefectType defectType)
{
Defect = defectType;
foreach (var visualizer in GetComponents<IDefectVisualizer>())
{
visualizer.VisualizeDefect(defectType);
}
}
2024-08-17 18:38:25 +00:00
}