コード例 #1
0
 /// <summary>
 /// Sets the handle.
 /// </summary>
 /// <param name="value">Value.</param>
 protected virtual void SetHandle(GameObject value)
 {
     if (handle)
     {
         Destroy(handleScript);
     }
     handle       = value;
     handleScript = handle.AddComponent <DraggableHandle>();
     handleScript.Drag(gameObject.transform as RectTransform);
 }
コード例 #2
0
ファイル: Draggable.cs プロジェクト: RockfFestival/Rock
 /// <summary>
 /// Sets the handle.
 /// </summary>
 /// <param name="value">Value.</param>
 protected virtual void SetHandle(GameObject value)
 {
     if (handle != null)
     {
         Destroy(handleScript);
     }
     handle       = value;
     handleScript = Utilites.GetOrAddComponent <DraggableHandle>(handle);
     handleScript.Drag(gameObject.transform as RectTransform);
 }