Example #1
0
        /// <summary> Fires when one of my ObjectsToGet is released. </summary>
        /// <remarks> Should only be subscribed to when  </remarks>
        /// <param name="source"></param>
        /// <param name="args"></param>
        private void Grabable_InteractionEnded(object source, SG_InteractArgs args)
        {
            SG_Grabable grabable = (SG_Grabable)source;

            grabable.InteractionEnded -= Grabable_InteractionEnded; //unsubscribe from the method.
            this.AttachObject(grabable);
        }
Example #2
0
        // Event Handlers

        /// <summary> Fires when an object is picked up from the Sense Glove. Disconnect it from this SnapZone. </summary>
        /// <param name="source"></param>
        /// <param name="args"></param>
        private void Grabable_InteractionBegun(object source, SG_InteractArgs args)
        {
            SG_Grabable grabable = (SG_Grabable)source;

            grabable.InteractionBegun -= Grabable_InteractionBegun; //unsibscribe regardless.
            this.RemoveObject(grabable);
        }