Advertisement
FlyingFrog

DialoguePanelController

Dec 26th, 2023
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. using UnityEngine;
  2.  
  3. public class DialoguePanelController : MonoBehaviour
  4. {
  5. [SerializeField] private CanvasGroup _dialoguePanel;
  6.  
  7. private void Start()
  8. {
  9. DisablePanel();
  10. }
  11.  
  12. public void EnablePanel()
  13. {
  14. _dialoguePanel.alpha = 1;
  15. _dialoguePanel.interactable = true;
  16. _dialoguePanel.blocksRaycasts = true;
  17. }
  18.  
  19. public void DisablePanel()
  20. {
  21. _dialoguePanel.alpha = 0;
  22. _dialoguePanel.interactable = false;
  23. _dialoguePanel.blocksRaycasts = false;
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement