/// <summary> /// calls the render method for each gameobject currently active in the game's state /// </summary> /// <param name="screen">Graphics object passed in from the Game Form</param> public void RenderAll(Graphics screen) { if (gameState != null) { foreach (RenderLayer currentLayer in Enum.GetValues(typeof(RenderLayer))) { foreach (GameObjects.IGameObject GO in gameState.GameObjectList) { if (GO.GetRenderLayer() == currentLayer) { GO.RenderSelf(screen, Screensize); } } //gameobjects loop } //renderlayers loop } } //E N D M E T H O D RenderAll