Files
LowPolyRPG/Assets/Plugins/RaycastPro/_Demo/_Scripts/SmartView.cs
Caleb Sandford deQuincey 715fb68744 Initial commitment
2025-06-25 11:10:11 +01:00

30 lines
716 B
C#

using System.Collections.Generic;
using RaycastPro.Detectors;
using UnityEngine;
namespace Plugins.RaycastPro.Demo.Scripts
{
public class SmartView : MonoBehaviour
{
public SightDetector _sightDetector;
public List<TargetDetector> TDs;
void Start()
{
_sightDetector.SyncDetection(TDs);
}
// Update is called once per frame
void Update()
{
foreach (var td in TDs)
{
td.CastFrom(transform.position);
if (td.DirectValue > .5f)
{
Debug.DrawRay(td.transform.position, Vector3.up, Color.blue);
}
}
}
}
}