Unity3d NGUI 滑动菜单
核心脚步:
UIDraggablePanel.cs;UIDragPanelContents.cs
细节:
UIDraggablePanel脚步:
1,关联滑动的GameObject;
2,添加UIPanel.cs,并且和 “Panle”同级别;
3,设置 DragEffect 和 滑动坐标:Scale
UIDragPanelContents脚步
1,关联的GameObject加BoxCollider。
2,DraggablePanel 参数:关联UIDraggablePanel.cs的GameObject
3.UICenterOnChild,cs
1,和UIDraggablePanel.cs关联在一起。实现滑动菜单停止后Item居中对齐;
4.SpringPanel.cs控制滑动范围