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.
38 lines
743 B
38 lines
743 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;
|
|
|
|
public GameObject cameraGroup;
|
|
|
|
private void Start()
|
|
{
|
|
Init();
|
|
}
|
|
|
|
public void Init()
|
|
{
|
|
openViewBtn.onClick.AddListener(OpenViewWnd);
|
|
|
|
closeViewBtn.onClick.AddListener(CloseViewWnd);
|
|
|
|
}
|
|
|
|
public void OpenViewWnd()
|
|
{
|
|
animator.CrossFade("ViewWindowOpen", 0.1f);
|
|
cameraGroup.SetActive(true);
|
|
}
|
|
public void CloseViewWnd()
|
|
{
|
|
animator.CrossFade("ViewWindowClose", 0.1f);
|
|
cameraGroup.SetActive(false);
|
|
}
|
|
}
|