Esempio n. 1
0
        public void FlushAppear(JourneyPosition upToJourneyPos)
        {
            //Debug.Log("FLUSH TO " + upToJourneyPos);
            int upToPosIndex = StageMapsManager.GetPosIndexFromJourneyPosition(this, upToJourneyPos);

            foreach (var pin in playPins)
            {
                // Stop when we find locked pins
                if (pin.isLocked)
                {
                    break;
                }

                if (pin.pinIndex > upToPosIndex)
                {
                    break;
                }

                // First the dots
                foreach (var dot in pin.dots)
                {
                    dot.FlushAppear();
                }

                // Then the pin itself
                pin.FlushAppear();
            }
        }
Esempio n. 2
0
        private IEnumerator AppearCO(JourneyPosition fromPos, JourneyPosition toPos)
        {
            if (hasAppeared)
            {
                yield break;
            }

            hasAppeared = true;

            //Debug.Log("Animating from " + fromPos + " to " + toPos);

            // First, let all the available dots appear, up to FROM
            FlushAppear(fromPos);

            // Then, let the remaining ones appear in order, up to TO
            int   upToPosIndex = StageMapsManager.GetPosIndexFromJourneyPosition(this, toPos);
            float duration     = startAppearDuration;

            foreach (var pin in playPins)
            {
                // Then the pins
                if (!pin.Appeared && pin.pinIndex <= upToPosIndex)
                {
                    // First the dots that connect the pins
                    foreach (var dot in pin.dots)
                    {
                        if (!dot.Appeared)
                        {
                            dot.Appear(0.0f, duration);
                            yield return(new WaitForSeconds(duration));

                            duration *= appearSpeedupMultiplier;
                            if (duration <= minAppearDuration)
                            {
                                duration = minAppearDuration;
                            }
                        }
                    }

                    pin.Appear(pinAppearDuration);
                    yield return(new WaitForSeconds(pinAppearDuration));

                    duration *= appearSpeedupMultiplier;
                    if (duration <= minAppearDuration)
                    {
                        duration = minAppearDuration;
                    }
                }
            }
        }
Esempio n. 3
0
        public void ForceToJourneyPosition(JourneyPosition journeyPosition, bool justVisuals = false)
        {
            int posIndex = StageMapsManager.GetPosIndexFromJourneyPosition(currentStageMap, journeyPosition);

            ForceToPin(posIndex, justVisuals);
        }
Esempio n. 4
0
 public void MoveToJourneyPosition(JourneyPosition journeyPosition, StageMap stageMap)
 {
     MoveToPin(StageMapsManager.GetPosIndexFromJourneyPosition(stageMap, journeyPosition), stageMap.stageNumber);
 }