22 lines
432 B
C#
22 lines
432 B
C#
|
|
using UnityEngine;
|
|||
|
|
|
|||
|
|
namespace NobleMuffins.LimbHacker.Examples
|
|||
|
|
{
|
|||
|
|
[RequireComponent(typeof(SwordVelocityFilter))]
|
|||
|
|
public class AttachableSlicerController : MonoBehaviour
|
|||
|
|
{
|
|||
|
|
private SwordVelocityFilter swordVelocityFilter;
|
|||
|
|
public GameObject slicer;
|
|||
|
|
|
|||
|
|
void Start()
|
|||
|
|
{
|
|||
|
|
swordVelocityFilter = GetComponent<SwordVelocityFilter>();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void Update()
|
|||
|
|
{
|
|||
|
|
slicer.SetActive(swordVelocityFilter.IsFastEnoughToCut);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|