Esempio n. 1
0
        /// <summary>
        /// Override this method to associate each hand pose with your game logic.
        /// </summary>
        /// <param name="sender">Sender of this event.</param>
        /// <param name="args">Contains the updated hand pose.</param>
        protected override void HandPoseChangedHandler(object sender, HandPoseChangedEventArgs args)
        {
            base.HandPoseChangedHandler(sender, args);
            switch (HandPose)
            {
            case HandPoseType.Normal:
                Debug.Log("Hand pose back to normal.");
                break;

            case HandPoseType.SpidermanReady:
                Debug.Log("Spider ready pose.");
                break;

            case HandPoseType.SpidermanShoot:
                Debug.Log("Spiderman shoot pose.");
                TeleportationStart();
                break;

            case HandPoseType.SpidermanReset:
                Debug.Log("Spiderman pose reset.");
                break;
            }
        }
Esempio n. 2
0
        private void OnPoseChanged()
        {
            HandPoseChangedEventArgs args = new HandPoseChangedEventArgs(Pose);

            Miscellaneous.InvokeEvent(HandPoseChanged, this, args);
        }
 protected virtual void HandPoseChangedHandler(object sender, HandPoseChangedEventArgs args)
 {
     HandPose = args.Pose;
 }