public void Draw(GameTime gameTime) { UpdateVisualWater(); _waterVisual.Draw(gameTime, Color.LightSeaGreen); _wave1.Draw(gameTime); _wave2.Draw(gameTime); }
public void Draw(GameTime gameTime) { if (StaticData.GameSessionMode == SessionMode.DesignMode && StaticData.IsNotification) { if (_notifications.Count > 0) { if (lastNotificationStartTimeStamp != 0) { if (_y < 0) { _y += 0.5f; } int startX = 150; Visual2D vis = new Visual2D(new Vector3(startX, (int)_y, 0), 600, 40, _notifications[0]); vis.Draw(gameTime); //var spriteBatch = StaticData.EngineManager.Game1.SpriteBatch; //spriteBatch.Begin(); //spriteBatch.DrawString(StaticData.EngineManager.Game1.Font, // _notifications[0], // new Vector2(startX + 20, 5), Color.White); //spriteBatch.End(); } else { lastNotificationStartTimeStamp = gameTime.TotalGameTime.Seconds; } } } }
private void DrawRing(GameTime gameTime) { //SetPinRing(); ring.Draw(gameTime); //pin.Draw(gameTime); //Visual2D vis = new Visual2D(this.Masses[0].PositionXNACenter, 5, 5, TextureType.White); //vis.Draw(new GameTime()); }
public void Draw(GameTime gameTime) { for (int i = 0; i < _comps.Count; i++) { Visual2D vis = _comps[i]; var newRect = new Rectangle(vis.RectangleArea.X - 10, vis.RectangleArea.Y - 10, vis.RectangleArea.Width + 20, vis.RectangleArea.Height + 20); Visual2D visBorder = new Visual2D(newRect, TextureType.Border); Color newColor = _colorProvider.ColorifyDrawing(gameTime); visBorder.Draw(gameTime, newColor); } }
//private void KillFinishedThreads() //{ // if (_threads.Count > 1) // { // int kkk = 0; // } // _threadsToKill.Clear(); // foreach (Thread thread in _threads) // { // if (!thread.IsAlive) // _threadsToKill.Add(thread); // } // foreach (Thread thread in _threadsToKill) // { // thread.Abort(); // _threads.Remove(thread); // } //} //private void KillOverloadedThreads() //{ // if (_threads.Count > 3) // { // for (int i = 0; i < _threads.Count - 2; i++) // { // _threads.RemoveAt(0); // } // } //} public void Draw(GameTime gameTime) { UpdateUI(); if (_bitmapToDraw != null) { var texToDraw = GetTexture2DFromBitmap(StaticData.EngineManager.Game1.GraphicsDevice, _bitmapToDraw); Visual2D vis = new Visual2D(new Rectangle(0, 0, StaticData.LevelFarWidth, StaticData.LevelFarHeight), texToDraw); vis.Draw(gameTime); } }
public void Draw(GameTime gameTime) { background.Draw(gameTime); if (marker != null) { marker.Draw(gameTime); } foreach (var notification in Notifications) { notification.Draw(gameTime); } }
public void Draw(GameTime gameTime) { if (_bitmapPath != null) { _texToDraw = EntraManager.GetTexture2DFromBitmap(StaticData.EngineManager.Game1.GraphicsDevice, _bitmapPath); Visual2D vis = new Visual2D(new Rectangle(0, 0, StaticData.LevelFarWidth, StaticData.LevelFarHeight), _texToDraw); vis.Draw(gameTime); } }