public override string ErrorCheck()
 {
     if (GestureUtils.GetGesture <Gesture>(Fsm, GameObject, Gesture, Component, false) == null)
     {
         return("Gesture is missing");
     }
     return(null);
 }
Beispiel #2
0
        public override void OnEnter()
        {
            gesture = GestureUtils.GetGesture <PressGesture>(Fsm, GameObject, Component, true);
            if (gesture == null)
            {
                LogError("Gesture is missing");
                return;
            }

            gesture.Pressed += gesturePressedHandler;
        }
        public override void OnEnter()
        {
            gesture = GestureUtils.GetGesture <Gesture>(Fsm, GameObject, Gesture, Component, false);
            if (gesture == null)
            {
                LogError("Gesture is missing");
                return;
            }

            gesture.StateChanged += gestureStateChangedHandler;
        }
Beispiel #4
0
        public override void OnEnter()
        {
            gesture = GestureUtils.GetGesture <SimplePanGesture>(Fsm, GameObject, Component, true);
            if (gesture == null)
            {
                LogError("Gesture is missing");
                return;
            }

            gesture.PanStarted   += gesturePanStartedHandler;
            gesture.Panned       += gesturePannedHandler;
            gesture.PanCompleted += gesturePanCompletedHandler;
        }
Beispiel #5
0
        public override void OnEnter()
        {
            gesture = GestureUtils.GetGesture <Gesture>(Fsm, GameObject, Gesture, Component, false);
            if (gesture == null)
            {
                LogError("Gesture is missing");
                return;
            }

            ITouchHit hit;

            gesture.GetTargetHitResult(out hit);
            var hit3d = hit as ITouchHit3D;

            if (hit3d == null)
            {
                return;
            }

            if (Collider != null)
            {
                Collider.Value = hit3d.Collider;
            }
            if (RigidBody != null)
            {
                RigidBody.Value = hit3d.Rigidbody;
            }
            if (Normal != null)
            {
                Normal.Value = hit3d.Normal;
            }
            if (Point != null)
            {
                Point.Value = hit3d.Point;
            }

            Finish();
        }