/// <summary> /// Draws the control. /// </summary> protected override void Draw() { ParentEditor.ZoomBox.Camera.Update(1 / 60f); if (particleEffect.Position != updatedPosition) { particleEffect.Position = updatedPosition; } particleEffect.Update(1 / 60f); _parent = Parent as ParticleEffectEditor; // if the animation was paused externally, pause it in the GUI if (particleEffect.Emitter.IsPaused == true && _parent.toolStripButtonPause.Enabled == true) { _parent.toolStripButtonPause_Click(null, EventArgs.Empty); } // if the animation was stopped externally, stop it in the GUI if (particleEffect.Emitter.IsStopped == true && _parent.toolStripButtonStop.Enabled == true) { _parent.toolStripButtonStop_Click(null, EventArgs.Empty); } if (background != null) { DrawRequest backgroundRequest = new DrawRequest(background, Vector2.Zero, false, null, 0, Vector2.One, new Vector2(0.5f), true, Color.White, false, false, null); DrawingManager.DrawOnLayer(backgroundRequest, 10, DrawingBlendingType.Alpha); } particleEffect.Draw(1f); GraphicsDevice.Clear(backgroundColor); DrawingManager.ViewPortSize = new Point(this.Width, this.Height); SquidEditorForm.SwapCameraAndRenderScene(ParentEditor.ZoomBox.Camera); ParentEditor.Update(1 / 60f); }
public void Draw(SpriteBatch sb) { if (_particleEffect != null) { _particleEffect.Draw(sb); } }
public void Draw(SpriteBatch sb) { _standingEffect.Draw(sb); _chargeEffect.Draw(sb); _explodeEffect.Draw(sb); if (_state != State.Dormant && _state != State.BeingEaten) { _sprite.Draw(sb, _position); } }
public void Draw(SpriteBatch sb) { if (_portalEffect != null) { _portalEffect.Draw(sb); } foreach (Enemy e in _enemies) { e.Draw(sb); } }
public override void Draw(SpriteBatch sb) { if (_fireParticleEffect != null) { _fireParticleEffect.Draw(sb); } _contactEffect.Draw(sb); _proximityEffect.Draw(sb); _destinationEffect.Draw(sb); foreach (Projectile p in _projectiles) { p.Draw(sb); } }
public virtual void Draw(SpriteBatch sb) { if (_lifeState == LifeState.Destroyed || _lifeState == LifeState.Dormant) { return; //dont draw destroyed or not yet spawned sprites } //special shattered drawing logic if (_lifeState == LifeState.Shattered) { float integrityFactor; for (int y = 0; y < ICE_DIVISIONS; y++) { for (int x = 0; x < ICE_DIVISIONS; x++) { integrityFactor = _fragments[y, x].Health / (FRAGMENT_HEALTH); tempRec.X = (int)(_fragments[y, x].Position.X - tempRec.Width / 2); tempRec.Y = (int)(_fragments[y, x].Position.Y - tempRec.Height / 2); tempRec.Width = (int)(_hitRect.Width * _fragments[y, x].ScaleFactor / ICE_DIVISIONS); tempRec.Height = (int)(_hitRect.Height * _fragments[y, x].ScaleFactor / ICE_DIVISIONS); _sprite.DrawFragment(sb, y, x, ICE_DIVISIONS, tempRec, _fragments[y, x].Angle, integrityFactor); _sprite.DrawIce(sb, tempRec, _fragments[y, x].Angle, integrityFactor); } } return; } if (_movementParticleEffect != null) { _movementParticleEffect.Draw(sb); } if (_lifeState != LifeState.BeingEaten && _lifeState != LifeState.Destroyed && _lifeState != LifeState.Dormant) { _burningParticleEffect.Draw(sb); } _sprite.Draw(sb, Position); if (_lifeState == LifeState.Frozen) { tempRec = HitRect; tempRec.X += (int)(HitRect.Width / 2); tempRec.Y += (int)(HitRect.Height / 2); _sprite.DrawIce(sb, tempRec, _sprite.Angle, _statusEffects.Cryo / MAX_STAT_EFFECT); } }
public void Draw(SpriteBatch sb) { _particleEffect.Draw(sb); }
public override void Draw(SpriteBatch sb) { _attackParticleEffect.Draw(sb); }