22 lines
537 B
C#
22 lines
537 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class FlashlightRaycast : MonoBehaviour
|
|
{
|
|
public Transform flashlightRaycast;
|
|
public Transform flashlightCurrentCollider;
|
|
public LayerMask collisionLayer; // Set this to the layer where obstacles reside
|
|
|
|
private static FlashlightRaycast _instance;
|
|
public static FlashlightRaycast GetInstance() { return _instance; }
|
|
|
|
private void Awake()
|
|
{
|
|
if (!_instance)
|
|
{
|
|
_instance = this;
|
|
}
|
|
}
|
|
}
|