private void LoadGameObjects() { player = GameObjectFactory.CreatePlayer(); zombie = GameObjectFactory.CreateZombie(); firstPlatform = GameObjectFactory.CreatePlatform(PlatformConstants.FIRST_PLATFORM_X, PlatformConstants.FIRST_PLATFORM_Y, PlatformConstants.PLATFORM_WIDTH, PlatformConstants.PLATFORM_HEIGHT, PlatformConstants.PLATFORM_IMAGE); secondPlatform = GameObjectFactory.CreatePlatform(PlatformConstants.SECOND_PLATFORM_X, PlatformConstants.SECOND_PLATFORM_Y, PlatformConstants.PLATFORM_WIDTH, PlatformConstants.PLATFORM_HEIGHT, PlatformConstants.PLATFORM_IMAGE); Render(firstPlatform); Render(secondPlatform); Render(player); Render(zombie); }
private void Render(GameObject.GameObject gameObject) { Controls.Add(gameObject.PictureBox); }