//---------------------------------------------------------------------- public void EmitterUpdate(bool alive) { if (!IsActive || _updatePush) { return; } #if DEBUG if (InputExt.OnePressed(Keys.R) && InputExt.Pressed(Keys.LeftShift) || _StartSizeChange) { SizeChange(GraphicsExt.GetDeviceWidth, GraphicsExt.GetDeviceHeight, ((float)GraphicsExt.GetDeviceWidth) / 1920f); _StartSizeChange = false; } #endif IsAllAlive = alive; if (alive) { AliveUpdate(); for (int i = 0; i < _Child.Count; i++) { _Child[i].EmitterUpdate(alive); } } else { IdleUpdate(); } }
public static bool PressedSprite(SimpleCamera camera, Sprite sprite) { return(InputExt.Pressed(MouseButtons.Left) && sprite.Bounds.Contains(camera.ScreenToWorldMouse())); }