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); }
void OnPreRender() { if (!isStart) { return; } video.Update(); }
public virtual void Update(float deltaTime) { videoPlayer?.Update(); if (activeObjectives != null) { for (int i = 0; i < activeObjectives.Count; i++) { CheckActiveObjectives(activeObjectives[i], deltaTime); } } }
/// <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(); } }
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); } }
public void Update() { _videoPlayer.Update(); }