Newer
Older
HoloAnatomy / Assets / HoloToolkit-Examples / GazeRuler / Scripts / DeleteLine.cs
SURFACEBOOK2\jackwynne on 25 May 2018 630 bytes v1
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

using UnityEngine;
using System.Collections;

namespace HoloToolkit.Examples.GazeRuler
{
    public class DeleteLine : MonoBehaviour
    {
        /// <summary>
        /// when tip text is tapped, destroy this tip and relative objects.
        /// </summary>
        public void OnSelect()
        {
            var parent = gameObject.transform.parent.gameObject;
            if (parent != null)
            {
                Destroy(parent);
            }
        }
    }
}