2024-11-15 11:23:25 +08:00
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using System;
|
|
|
|
|
using DG.Tweening;
|
2024-11-19 16:48:27 +08:00
|
|
|
|
|
2024-11-15 11:23:25 +08:00
|
|
|
|
public class GameSceneBtn : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
public static Action OnSceneMouseBTN;
|
2024-11-19 16:48:27 +08:00
|
|
|
|
private SceneSpriteAniationPro aniationPro;
|
|
|
|
|
float time;
|
2024-11-15 11:23:25 +08:00
|
|
|
|
// Start is called before the first frame update
|
|
|
|
|
void Start()
|
|
|
|
|
{
|
|
|
|
|
OnSceneMouseBTN += JUmpScem;
|
2024-11-19 16:48:27 +08:00
|
|
|
|
aniationPro = GetComponent<SceneSpriteAniationPro>();
|
2024-11-15 11:23:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void OnMouseDown()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
OnSceneMouseBTN();
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void JUmpScem()
|
|
|
|
|
{
|
|
|
|
|
Debug.Log("====");
|
|
|
|
|
Promptmgr.Instance.PromptBubble("<22><>δ<EFBFBD><CEB4><EFBFBD><EFBFBD>");
|
|
|
|
|
}
|
2024-11-19 16:48:27 +08:00
|
|
|
|
|
|
|
|
|
private void Update()
|
|
|
|
|
{
|
|
|
|
|
time += Time.deltaTime;
|
|
|
|
|
if (time > 3)
|
|
|
|
|
{
|
|
|
|
|
time = 0;
|
|
|
|
|
aniationPro.SetAni(UnityEngine.Random.Range(0,5));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2024-11-15 11:23:25 +08:00
|
|
|
|
}
|