31 lines
645 B
C#
31 lines
645 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using BITKit;
|
|
using UnityEngine;
|
|
|
|
namespace BITFALL.Props
|
|
{
|
|
public class Prop_ScopeDataComponent : MonoBehaviour
|
|
{
|
|
public static readonly CacheList<Prop_ScopeDataComponent> List = new();
|
|
|
|
public float Radius;
|
|
|
|
[SerializeField] private Vector3 rotationOffset;
|
|
public Vector3 Position => _transform.position;
|
|
public Quaternion Rotation => _transform.rotation * Quaternion.Euler(rotationOffset);
|
|
|
|
private Transform _transform;
|
|
private void OnEnable()
|
|
{
|
|
_transform = transform;
|
|
List.Add(this);
|
|
}
|
|
private void OnDisable()
|
|
{
|
|
List.Remove(this);
|
|
}
|
|
}
|
|
|
|
}
|