NGUI(三)背包系统页面
2015-07-31 22:45
381 查看
NGUI(三)背包系统页面
MyDragDropItem:
using UnityEngine; using System.Collections; public class MyDragDropItem : UIDragDropItem { // Use this for initialization protected override void OnDragDropRelease(GameObject surface) { base.OnDragDropRelease(surface); if (surface.tag=="cell") { this.transform.parent = surface.transform; this.transform.localPosition = Vector3.zero; } else if(surface.tag=="MyDragDropItems") { Transform parent = surface.transform.parent; surface.transform.parent = this.transform.parent; surface.transform.localPosition = Vector3.zero; this.transform.parent = parent; this.transform.localPosition = Vector3.zero; } } }
Knapsack:
using UnityEngine; using System.Collections; public class Knapsack : MonoBehaviour { public GameObject[] cells; // Use this for initialization void Start () { } // Update is called once per frame void Update () { } }
相关文章推荐
- iOS学习(UIImageView)
- ubuntu下vagrant up经常出现Failed to upload a file to the guest VM via SCP due to a permissions error.最终解决
- hdu 5297 Y sequence(容斥)
- 黑马程序员------API(String类,StringBuffer,StringBuilder及基本数据类型包装类)
- Entityframework~Fluent Api配置数据模型与数据库结构关系
- mysql启动错误:Starting MySQL.. ERROR! The server quit without updating PID file错误
- 递归和循环---从EasyUI Tree 发现自己的硬伤
- uva11235 Frequent values(线段树区间合并)
- LTView 自定义视图 UIAlertView
- EasyUi 新组件 switchbutton 根据状态切换显示内容
- Android API Guides 阅读笔记(9)----Bound Service
- UVA1152-4 Values whose Sum is 0
- UIViewController(视图控制器)下的View切换
- UVA1605-Building for UN
- 仿Uber主界面布局,框架简单实现
- iOS-01-UILabel
- PcDuino初学分享
- BlockingQueue中add,offer,put方法区别
- cmsis-rtos v1.02支持Mail Queue问题
- [UVA11572]Unique Snowflakes[构造]