翼狐角色系列全套
2023-03-29 13:42 作者:方方耍賴很優(yōu)雅 | 我要投稿
using System;using UnityEngine;/// <summary>/// 第一個(gè)自己創(chuàng)建的拖拽功能/// </summary>public class MyFirstDragDropItem:UIDragDropItem{
? ?private GameObject sourceParent;
? ?/// <summary>
? ?/// 重寫父類的拖拽開始函數(shù)
? ?/// </summary>
? ?protected override void OnDragDropStart ()
? ?{
? ? ? ?//當(dāng)拖拽開始時(shí)存儲(chǔ)原始的父對(duì)象
? ? ? ?this.sourceParent = this.transform.parent.gameObject;
? ? ? ?base.OnDragDropStart ();
? ?}
? ?/// <summary>
? ?/// 重寫父類的拖拽釋放函數(shù)
? ?/// </summary>
? ?protected override void OnDragDropRelease (GameObject su
標(biāo)簽: