33 lines
1.1 KiB
C#
33 lines
1.1 KiB
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace Octopus.Simulator {
|
|
public class Panel_LogicStatus : MonoBehaviour
|
|
{
|
|
RectTransform rect;
|
|
Panel_LogicData panel_LogicData;
|
|
Panel_PlacedObject panel_PlacedObject;
|
|
Panel_ConnectedObject panel_ConnectedObject;
|
|
|
|
public Panel_PlacedObject Panel_PlacedObject { get { return panel_PlacedObject; } }
|
|
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
|
void Awake()
|
|
{
|
|
rect = gameObject.GetComponent<RectTransform>();
|
|
}
|
|
|
|
private void Start()
|
|
{
|
|
panel_LogicData = GetComponentInChildren<Panel_LogicData>(true);
|
|
panel_PlacedObject = GetComponentInChildren<Panel_PlacedObject>(true);
|
|
panel_ConnectedObject = GetComponentInChildren<Panel_ConnectedObject>(true);
|
|
panel_LogicData.onPanelUpdated += PanelUpdate;
|
|
panel_ConnectedObject.onPanelUpdated += PanelUpdate;
|
|
}
|
|
|
|
void PanelUpdate()
|
|
{
|
|
LayoutRebuilder.ForceRebuildLayoutImmediate(rect);
|
|
}
|
|
}
|
|
} |