예제 #1
0
 public static void EnqueueLookMovement(SplineMovement nextLookMovement)
 {
     if (CurrentLookMovement == null)
     {
         AssignNextLookMovement(nextLookMovement);
     }
     else
     {
         WaitingLookMovements.Enqueue(nextLookMovement);
     }
 }
예제 #2
0
        private static void ConcludeLookMovement(SplineMovement currentLookMovement)
        {
            PriorLookPoint   = CurrentLookPoint;
            CurrentLookPoint = currentLookMovement.TargetTransform;

            if (WaitingLookMovements.Any())
            {
                AssignNextLookMovement(WaitingLookMovements.Dequeue());
            }
            else
            {
                CurrentLookMovement = null;
            }
        }
예제 #3
0
        private static void AssignNextLookMovement(SplineMovement nextLookMovement)
        {
            CurrentLookMovement = nextLookMovement;

            // if (AwaitingStartLookPosition)
            // {
            //     PriorLookPoint = CurrentLookMovement.TargetTransform;
            //     CurrentLookPoint = CurrentLookMovement.TargetTransform;
            //     AwaitingStartLookPosition = false;
            // }

            NextLookPoint = CurrentLookMovement.TargetTransform;
            CurrentLookMovement.OnMovementCompleted += HandleLookMovementCompleted;

            SwitchingLookMovements = true;
        }
예제 #4
0
        private static void AssignNextMovement(SplineMovement nextMovement)
        {
            CurrentMovement = nextMovement;

            if (AwaitingStartPosition)
            {
                PriorPoint            = CurrentMovement.TargetTransform;
                CurrentPoint          = CurrentMovement.TargetTransform;
                AwaitingStartPosition = false;
            }

            NextPoint = CurrentMovement.TargetTransform;
            CurrentMovement.OnMovementCompleted += HandleMovementCompleted;

            SwitchingMovements = true;
        }