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.
37 lines
746 B
37 lines
746 B
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using DG.Tweening;
|
|
|
|
public class ViewWnd : MonoBehaviour
|
|
{
|
|
private bool isOpen = true;
|
|
private RectTransform rect;
|
|
public Transform jiantou;
|
|
|
|
|
|
private void Start()
|
|
{
|
|
rect = this.GetComponent<RectTransform>();
|
|
Debug.Log(transform.localPosition.x);
|
|
|
|
}
|
|
public void ChangeState()
|
|
{
|
|
|
|
if (isOpen)
|
|
{
|
|
rect.DOLocalMoveX(1235, 1f);
|
|
jiantou.localScale = new Vector3(-1, 1, 1);
|
|
isOpen = false;
|
|
}
|
|
else
|
|
{
|
|
isOpen = true;
|
|
jiantou.localScale = new Vector3(1, 1, 1);
|
|
rect.DOLocalMoveX(652, 1f);
|
|
}
|
|
|
|
}
|
|
}
|