public void RenderState() { player.Entity.RenderEntity(); foreach (Enemy element in enemies) { element.RenderEntity(); } explosions.RenderAnimations(); score.RenderScore(); bool allDead = true; bool belowScreen = true; foreach (var iter in enemies) { if (!iter.IsDeleted()) { allDead = false; } if (iter.shape.Position.Y > -0.2f) { belowScreen = false; } } if (allDead || belowScreen) { Enemies.ClearContainer(); if (globalMove.Equals("down")) { CreateEnemiesSpot(enemyStrides); globalMove = "zigzag"; } else if (globalMove.Equals("zigzag")) { CreateEnemiesZig(enemyStrides); globalMove = "nomove"; } } else { MoveFunction(globalMove); } }