Beispiel #1
0
        private IEnumerator WaitThenPlayDownAnimationCoroutine()
        {
            yield return(new WaitForSeconds(notificationStayDuration));

            if (IS_NOT_NULL(animLerp_Down))
            {
                animLerp_Down.StartAnimation();
            }
        }
Beispiel #2
0
        private void On_UI_FocusedFrameUpdated(BEHandle <BFrame> bEHandle)
        {
            BFrame bFrame = bEHandle.Arg1;

            if (cameraTransforms.ContainsKey(bFrame))
            {
                BFrameCameraTransform newCameraTransform = cameraTransforms[bFrame];
                cameraTransformLerp.StartValue   = lastCameraTransform.transform;
                cameraTransformLerp.EndValue     = newCameraTransform.transform;
                cameraTransformLerp.PlayDuration = newCameraTransform.TransitionTime;
                cameraTransformLerp.StartAnimation();

                lastCameraTransform = newCameraTransform;
            }
        }
Beispiel #3
0
        private void SetNotification(string text)
        {
            if (IS_NOT_NULL(bText))
            {
                // Resize the panel image according to the given text size
                string textToShow   = "";
                int    linesCount   = 1;
                int    lettersCount = 0;
                for (int i = 0; i < text.Length; i++)
                {
                    if (lettersCount == lettersPerLine)
                    {
                        if (linesCount + 1 > maxNumberOfLines)
                        {
                            textToShow  = textToShow.Remove(textToShow.Length - 3);
                            textToShow += "...";
                            break;
                        }
                        else
                        {
                            linesCount++;
                            textToShow += "\n";
                        }
                        lettersCount = 0;
                    }
                    textToShow += text[i];
                    lettersCount++;
                }
                ExtendPanel(linesCount);

                // Set text with spaces
                bText.SetText(textToShow);

                // Start animation
                isNotificationRunning = true;
                animLerp_Up.StartAnimation();

                // Play notification sound
                if (notificationSound)
                {
                    AudioManager.Instance.SpawnSoundObject(notificationSound);
                }
            }
        }
Beispiel #4
0
 public void StartAnimationTransform()
 {
     animationLerpTrasmform.StartAnimation(transform);
 }