private void Launch() { BadGuy sapin = null; if (RandomMachine.GetRandomFloat(0, 1) > 0.79f) { sapin = new TGPA.Game.Entities.BackgroundActiveElement.Sapin2(new Vector2(TGPAContext.Instance.ScreenWidth + 1, TGPAContext.Instance.ScreenHeight - 31), RandomMachine.GetRandomFloat(0.5f, 1f)); } else { sapin = new TGPA.Game.Entities.BackgroundActiveElement.Sapin(new Vector2(TGPAContext.Instance.ScreenWidth + 1, TGPAContext.Instance.ScreenHeight - 31), RandomMachine.GetRandomFloat(0.5f, 1f)); } Vector2 loc = sapin.Location; loc.Y -= sapin.DstRect.Height; sapin.Location = loc; TGPAContext.Instance.AddEnemy(sapin); }