Files
BITFALL/Assets/BITKit/Unity/Scripts/Selection/Selectable.cs
CortexCore 45913c6b3e 1
2023-08-23 01:59:40 +08:00

26 lines
688 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace BITKit
{
public class Selectable : MonoBehaviour, ISelectable
{
public Transform GetTransform() => transform;
ISelectableComponent[] components;
void Start()
{
components = GetComponentsInChildren<ISelectableComponent>(true);
foreach (var x in components)
{
x.SetSelectionState(0);
}
}
public void SetSelectionState(SelectionState state)
{
foreach (var x in components)
{
x.SetSelectionState(state);
}
}
}
}