Files
ichni_Official/Assets/Scripts/Game/Components/BMEditorSubmodules/SelectSubmodule.cs
SoulliesOfficial 7580c4d87c 大更
2026-03-14 03:13:10 -04:00

27 lines
842 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
namespace Ichni.RhythmGame
{
public class SelectSubmodule : SubmoduleBase
{
private GameElement elementToSelect;
public SelectSubmodule(GameElement attachedGameElement, GameElement elementToSelect = null) : base(attachedGameElement)
{
if (attachedGameElement is IHaveSelectSubmodule host)
{
host.selectSubmodule = this;
attachedGameElement.gameObject.layer = LayerMask.NameToLayer("Selectable");
this.elementToSelect = elementToSelect == null ? attachedGameElement : elementToSelect;
}
}
}
public interface IHaveSelectSubmodule
{
public SelectSubmodule selectSubmodule { get; set; }
}
}