Ejemplo n.º 1
0
        bool TryHighfive(CuddleEvent ev)
        {
            if (ev.ColliderName != Constants.ObjectNames.HighFiveCollider)
            {
                return(false);
            }

            HighFive();
            return(true);
        }
Ejemplo n.º 2
0
 void TryInteract(CuddleEvent ev)
 {
     if (_totalMovement <= PokeThreshold && ev.Touch.Phase == TouchPhase.Ended)
     {
         Poke();
     }
     else if (_totalMovement > PokeThreshold)
     {
         if (ev.Touch.Phase == TouchPhase.Ended)
         {
             EndStroking();
             FinishGesture();
         }
         else
         {
             Stroke();
         }
     }
 }
Ejemplo n.º 3
0
        InteractionContinuation HandleRessiTouch(CuddleEvent ev)
        {
            if (ev.Touch.Phase == TouchPhase.Began)
            {
                StartCuddling(ev.Ressi);
                TryHighfive(ev);
                return(InteractionContinuation.End());
            }

            if (!_interactionInProgress)
            {
                return(InteractionContinuation.Next());
            }

            AppendMovementDelta(ev.Touch);
            TryInteract(ev);

            return(InteractionContinuation.End());
        }