NGUI 实现对UISprite 的拖拽

来源:互联网 发布:罗马之子优化 编辑:程序博客网 时间:2024/05/29 15:52
using UnityEngine;using System.Collections;public class MyDragandDropItem : UIDragDropItem {protected override void OnDragDropRelease(GameObject surface)<span style="white-space:pre"></span>//拖拽释放事件    {        base.OnDragDropRelease(surface);        //print(surface);        if (surface != null)        {            this.transform.parent = surface.transform;            this.transform.localPosition = Vector3.zero;        }           }}

0 0
原创粉丝点击