Cute_demon_attacks/meng_yao/Assets/script/JumpScene/Lock_Btn.cs

28 lines
750 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using DG.Tweening;
using UnityEngine.SceneManagement;
public class Lock_Btn : MonoBehaviour
{
public GameObject gotoscene;
public GameObject nowScene;
public Camera lockcamera;
public void OnMouseDown()
{
//SceneManager.LoadScene(JumpScene.cultivation_Jinsha_mine_slices);
transform.DOScale(new Vector3(0.5f, 0.5f, 0.5f), 0.3f).SetEase(Ease.OutBack);
StartCoroutine("Magnify");
}
IEnumerator Magnify()
{
transform.DOScale(Vector3.one, 0.5f).SetEase(Ease.OutBack);
gotoscene.SetActive(true);
nowScene.SetActive(false);
lockcamera.orthographicSize = 12;
return null;
}
}