mirror of
https://github.com/nothke/quality-control.git
synced 2024-11-14 14:43:43 +00:00
25 lines
540 B
C#
25 lines
540 B
C#
|
using Nothke.Interaction;
|
|||
|
using Nothke.Interaction.Items;
|
|||
|
using UnityEngine;
|
|||
|
|
|||
|
public class HammerRepair: Interactable
|
|||
|
{
|
|||
|
public override void Use(InteractionController im)
|
|||
|
{
|
|||
|
if (im.hands.item == null)
|
|||
|
{
|
|||
|
base.Use(im);
|
|||
|
return;
|
|||
|
}
|
|||
|
|
|||
|
var product = GetComponentInChildren<Product>();
|
|||
|
|
|||
|
if (!product)
|
|||
|
{
|
|||
|
return;
|
|||
|
}
|
|||
|
|
|||
|
var clip = product.Type.SelectClip(product.Defect != DefectType.None);
|
|||
|
NAudio.Play(clip, transform.position);
|
|||
|
}
|
|||
|
}
|