91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 2KB
    文件類型: .cs
    金幣: 1
    下載: 0 次
    發布日期: 2021-05-13
  • 語言: C#
  • 標簽: Unity??

資源簡介

UI界面處理過渡 比如 點擊開始游戲按鈕 界面就滑動離開讓其他界面上來

資源截圖

代碼片段和文件信息

using?System.Collections;
using?System.Collections.Generic;
using?UnityEngine;

public?class?SwitchClick?:?MonoBehaviour
{
????///?
????///?自身的坐標
????///?

????private?RectTransform?_Rect;
????///?
????///?判斷開啟
????///?

????private?bool?IsClick?=?false;
????///?
????///?左右判斷
????///?

????private?bool?ToOrOut?=?true;
????///?
????///?速度
????///?

????private?int?Speed;
????///?
????///?距離
????///?

????private?int?Distance;
????void?Start()
????{
????????Init();
????}


????void?Update()
????{
????????Click();
????}


????///?
????///?初始化
????///?

????public?void?Init()
????{
????????_Rect?=?transform.GetComponent();
????????Speed?=?50;
????????Distance?=?100;
????}


????///?
????///?進入
????///?

????public?void?GetInto()///從右邊到左邊
????{
????????_Rect.anchoredPosition?=?new?Vector2(Distance?0);
????????IsClick?=?true;
????????ToOrOut?=?true;
????}

??

評論

共有 條評論