40 lines
961 B
C#
40 lines
961 B
C#
using DG.Tweening;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
public class PlayerMovePos : MonoBehaviour
|
|
{
|
|
|
|
public Transform StartPos;
|
|
public Transform CurrentPos;
|
|
public int StartIndex;
|
|
|
|
public bool HadChoise;//是否选择房间
|
|
public Transform Parent;
|
|
public bool IsReturn;
|
|
|
|
public Animator PlayAni;
|
|
public bool IsLeft;//是否面向左边
|
|
public int HouseId;//进的房间编号
|
|
|
|
private Vector3 originalScale;
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
|
|
originalScale=transform.localScale;
|
|
}
|
|
|
|
public void Zoomout()//缩小
|
|
{
|
|
Image image = GetComponent<Image>();
|
|
image.rectTransform.DOScale(0.9f, 0.5f).SetEase(Ease.Linear);
|
|
}
|
|
public void ReplySize()//恢复大小
|
|
{
|
|
Image image = GetComponent<Image>();
|
|
image.rectTransform.DOScale(originalScale, 0.5f).SetEase(Ease.Linear);
|
|
}
|
|
}
|