public override void DrawFrame(GameTime time, RendererPass resultPass) { _background.Render(time, resultPass); using (var sbh = new SpriteBatchHelper(SpriteSortMode.Deferred, BlendState.AlphaBlend)) { sbh.DrawStringOutlined(_font, YND.Speech[SpeechKey.ScaleInfo].Text, new Vector2(640, 60), 1200, Color.White, Color.Black, 2, 1); for (int i = 0; i < 31; i++) { float distance = 640 * (i * 2) - displayOffset; if (Math.Abs(distance) > 1000) continue; float scale = (distance / 1000.0f) + 1; //if (scale < 0) continue; sbh.Draw(pictures[i], new Vector2(640, 360), new Vector2(850, 470), Color.Lerp(Color.Transparent, Color.White, 1 - Math.Abs(scale - 1)), 0, MathHelper.Clamp(scale, 0, 5), true); } } //using (var sbh = new SpriteBatchHelper()) //{ // sbh.DrawStringOutlined(_font, YND.Speech[SpeechKey.ScaleInfo].Text, new Vector2(640, 60), 1200, Color.White, Color.Black, 2, 1); // for (int i = 0; i < 31; i++) sbh.Draw(pictures[i], new Vector2(640 * (i * 2 + 1) - displayOffset, 360), new Vector2(850, 470), Color.White); //} _backButton.Render(time, resultPass); }
public override void Draw(GameTime time, Renderer renderer) { base.Draw(time, renderer); //LIGHT PASS var lightMapPass = renderer.ApplyPass(RenderType.DarknessMask, Color.Black); PrepareCeletialsForDrawing(); DrawPlanetsOrdered(time, lightMapPass); using (var sbh = new SpriteBatchHelper()) { sbh.DrawString(_fontBig, "Episodes", new Vector2(640, 360), 0, new Color(30, 30, 50, 255)); } DrawStarsOrdered(time, lightMapPass); //MAIN PASS var resultPass = renderer.ApplyPass(RenderType.Final, Color.Black); _background.Render(time, resultPass); DrawCelestialsOrdered(time, resultPass); _backButton.Render(time, resultPass); _buttons.Each((b) => b.Render(time, resultPass)); using (var sbh = new SpriteBatchHelper()) { sbh.DrawStringOutlined(_fontBig, "Episodes", new Vector2(640, 360), 0, new Color(30, 30, 50, 255), Color.White, 2); } }
public override void Draw(GameTime time, Renderer renderer) { base.Draw(time, renderer); //LIGHT PASS var lightMapPass = renderer.ApplyPass(RenderType.DarknessMask, Color.Black); DrawCelestialsOrdered(time, lightMapPass); //MAIN PASS var resultPass = renderer.ApplyPass(RenderType.Final, Color.Black); _background.Render(time, resultPass); DrawCelestialsOrdered(time, resultPass); _backButton.Render(time, resultPass); using (var sbh = new SpriteBatchHelper()) { String txt = "External resources used in project:"; txt += "\n\nTextures:\n\tNASA, ESA, and the Hubble SM4 ERO Team \n\tUsed NASA materials are in the public domain\n\tand are not copyrighted."; txt += "\n\nFont:\n\t\"Orbitron\" available under OFL licence."; txt += "\n\nMusic:\n\tQuiet Noise (Soft String mix) by Brendan J. Boyd\n\tAvailable under CC BY-NC-SA 3.0 licence."; txt += "\n\nArticles:\n\tParts of wikipedia articles.\n\tAvailable under CC BY SA 3.0 licence."; txt += "\n\nLibraries:\n\tKinect Toolbox\n\tAvailable under Microsoft Public License."; sbh.DrawStringOutlined(_fontSmall, txt, new Vector2(930, 300), 0, new Color(30, 30, 50, 255), Color.White); } }
public void Render(GameTime time, RendererPass rendererPass) { using (var sbh = new SpriteBatchHelper()) { sbh.Draw(_texture, _position, Vector2.One * _size, Color.White, _rotation); sbh.DrawStringOutlined(_font, _caption, _position, 0, Color.White, Color.Black, 2); } }
public override void DrawFrame(GameTime time, RendererPass resultPass) { _background.Render(time, resultPass); using (var sbh = new SpriteBatchHelper()) { sbh.DrawStringOutlined(_font, YND.Speech[voices[currentSlot]].Text, new Vector2(640, 60), 1200, Color.White, Color.Black, 2, 1); for (int i = 0; i < 5; i++) sbh.Draw(pictures[i], new Vector2(640 * (i * 2 + 1) - displayOffset, 360), new Vector2(756, 471), Color.White); } }
public override void Draw(GameTime time, Renderer renderer) { _frames[_currentFrame].Stage.Draw(time, renderer); _backButton.Render(time,renderer.CurrentPass); if (_frames[_currentFrame].Narration != null) { using (var sbh = new SpriteBatchHelper()) { sbh.DrawStringOutlined(_font, YND.Speech[_frames[_currentFrame].Narration.Value].Text, new Vector2(640, 650), 1200, Color.White, Color.Black, 2, 1); } } }
public override void Draw(GameTime time, Renderer renderer) { base.Draw(time, renderer); //LIGHT PASS var lightMapPass = renderer.ApplyPass(RenderType.DarknessMask, Color.Black); DrawCelestialsOrdered(time, lightMapPass); //MAIN PASS var resultPass = renderer.ApplyPass(RenderType.Final, Color.Black); _background.Render(time, resultPass); DrawCelestialsOrdered(time, resultPass); _backButton.Render(time, resultPass); _externalButton.Render(time,resultPass); using (var sbh = new SpriteBatchHelper()) { sbh.DrawStringOutlined(_fontBig, " Imagine Cup 2013\n\n\nYellow Noodle Dog Team:\n Bartosz Jankowski\n Tomasz Gieniusz", new Vector2(930, 200), 0, new Color(30,30,50, 255), Color.White); } }