Пример #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;
        }