Update() public method

public Update ( ) : void
return void
        public override bool Draw(float backgroundFadeAlpha)
        {
            if (base.Draw(backgroundFadeAlpha) == false)
            {
                return(false);
            }

            if (m_videoPlayer != null)
            {
                m_videoPlayer.Update();

                Texture texture = m_videoPlayer.OutputFrame;

                Vector4 color = m_colorMultiplier * m_transitionAlpha;

                Rectangle videoRect;
                MyGuiManager.GetSafeAspectRatioFullScreenPictureSize(new MyMwcVector2Int(texture.GetLevelDescription(0).Width, texture.GetLevelDescription(0).Height), out videoRect);

                MyGuiManager.DrawSpriteBatch(texture, videoRect, new Color(color));

                if (m_subtitleToDraw != null)
                {
                    MyGuiManager.DrawStringCentered(MyGuiManager.GetFontMinerWarsWhite(), m_subtitleToDraw,
                                                    new Vector2(0.5f, 0.85f), 1.6f, Color.White, MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_BOTTOM);
                }
            }

            return(true);
        }
Example #2
0
 void OnPreRender()
 {
     if (!isStart)
     {
         return;
     }
     video.Update();
 }
Example #3
0
        public virtual void Update(float deltaTime)
        {
            videoPlayer?.Update();

            if (activeObjectives != null)
            {
                for (int i = 0; i < activeObjectives.Count; i++)
                {
                    CheckActiveObjectives(activeObjectives[i], deltaTime);
                }
            }
        }
Example #4
0
        /// <summary>
        /// Update the movie runner, inserting new frames into the buffer.
        /// </summary>
        public void Update()
        {
            if (player != null && Playing && !Paused)
            {
                if (RewindFlag)
                {
                    RewindFlag = false;
                    player.Rewind();
                }

                player.Update();
            }
        }
Example #5
0
        public override void Update(float deltaTime)
        {
            if (videoPlayer != null)
            {
                videoPlayer.Update();
            }

            if (infoBox != null)
            {
                if (PlayerInput.KeyHit(Keys.Enter) || PlayerInput.KeyHit(Keys.Escape))
                {
                    CloseInfoFrame(null, null);
                }
            }

            if (!started || ContentRunning)
            {
                return;
            }

            deltaTime *= 0.5f;

            for (int i = 0; i < segments.Count; i++)
            {
                if (segments[i].IsTriggered || activeObjectives.Contains(segments[i]))
                {
                    continue;
                }
                if (CheckContextualTutorials(i, deltaTime)) // Found a relevant tutorial, halt finding new ones
                {
                    break;
                }
            }

            for (int i = 0; i < activeObjectives.Count; i++)
            {
                CheckActiveObjectives(activeObjectives[i], deltaTime);
            }
        }
Example #6
0
 public void Update()
 {
     _videoPlayer.Update();
 }