41 lines
666 B
C#
41 lines
666 B
C#
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);
|
|
}
|
|
}
|