rabidus-test/Assets/PreviewModule.cs

41 lines
666 B
C#
Raw Normal View History

2023-07-28 11:48:57 +03:00
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PreviewModule : MonoBehaviour
{
[SerializeField]
private GameObject _previewPanel;
private bool _isShow = false;
private void Start()
{
TogglePanel(false);
}
public void TogglePanel(bool value)
{
_isShow = value;
if (_isShow)
{
ShowPanel();
}
else
{
HidePanel();
}
}
private void ShowPanel()
{
_previewPanel.SetActive(true);
}
private void HidePanel()
{
_previewPanel.SetActive(false);
}
}