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.
34 lines
632 B
34 lines
632 B
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class ViewWnd : MonoBehaviour
|
|
{
|
|
public Button openViewBtn;
|
|
public Button closeViewBtn;
|
|
public Animator animator;
|
|
|
|
private void Start()
|
|
{
|
|
Init();
|
|
}
|
|
|
|
public void Init()
|
|
{
|
|
openViewBtn.onClick.AddListener(OpenViewWnd);
|
|
|
|
closeViewBtn.onClick.AddListener(CloseViewWnd);
|
|
|
|
}
|
|
|
|
public void OpenViewWnd()
|
|
{
|
|
animator.CrossFade("ViewWindowOpen", 0.1f);
|
|
}
|
|
public void CloseViewWnd()
|
|
{
|
|
animator.CrossFade("ViewWindowClose", 0.1f);
|
|
}
|
|
}
|