public void GetImageByNameReturnsIfIMageExists() { //all images used in short-n-sweet.txt var images = new List <string>() { "white-square.png", "ironstone-square.png", "neptune-square.png", "green-square.png", "yellow-stick.png", "purple-circle.png", "green-upper-left.png", "green-upper-right.png", "green-lower-left.png", "green-lower-right.png", "ironstone-upper-left.png", "ironstone-upper-right.png", "ironstone-lower-left.png", "ironstone-lower-right.png", "neptune-upper-left.png", "neptune-upper-right.png", "neptune-lower-left.png", "neptune-lower-right.png", "white-upper-left.png", "white-upper-right.png", "white-lower-left.png", "white-lower-right.png", }; foreach (string imagename in images) { imageContainer.GetImageByName(imagename); } }
public void InitializeGameState() { eventBus = SpaceTaxiBus.GetBus(); imageContainer = ImageContainer.GetInstance(); backgroundImg = new Entity(new StationaryShape(0, 0, 1, 1), imageContainer.GetImageByName("SpaceBackground.png")); pausedText = new Text( "Game paused. \n\nPress P to continue \nPress ESC to quit", new Vec2F(0.23f, 0.1f), new Vec2F(0.6f, 0.6f)); pausedText.SetColor(Color.White); pausedText.SetFontSize(40); }
public void InitializeGameState() { spaceTaxiBus = SpaceTaxiBus.GetBus(); imageContainer = ImageContainer.GetInstance(); backgroundImage = new Entity( new StationaryShape(0.0f, 0.0f, 1f, 1f), imageContainer.GetImageByName("SpaceBackground.png")); gameOverText = new Text("GAME OVER", new Vec2F(0.31f, 0.4f), new Vec2F(0.4f, 0.3f)); gameOverText.SetColor(Color.White); tryAgainButton = new Text("Press ENTER to try again", new Vec2F(0.25f, 0.0f), new Vec2F(0.7f, 0.5f)); tryAgainButton.SetColor(Color.White); tryAgainButton.SetFontSize(20); }