You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
616 B
33 lines
616 B
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class ChatManager : MonoBehaviour
|
|
{
|
|
[SerializeField] private GameObject chatPanel;
|
|
[SerializeField] private Animator chatAnimator;
|
|
|
|
private bool open;
|
|
|
|
public GameObject ChatPanel => chatPanel;
|
|
|
|
private void SetOpen(bool open)
|
|
{
|
|
this.open = open;
|
|
UpdateAnimator();
|
|
}
|
|
|
|
public void UpdateAnimator()
|
|
{
|
|
chatAnimator.SetBool("Open", open);
|
|
}
|
|
public void ToggleChat()
|
|
{
|
|
SetOpen(!open);
|
|
}
|
|
|
|
public void Close()
|
|
{
|
|
SetOpen(false);
|
|
}
|
|
}
|
|
|