/// <summary> /// Initialize level properties /// </summary> public void InitializeLevel() { spaceTaxibus = SpaceTaxiBus.GetBus(); spaceTaxibus.Subscribe(GameEventType.TimedEvent, this); levelManager = LevelManager.GetInstance(); //setting text sizes scoreText = new Text("", new Vec2F(0.43f, -0.26f), new Vec2F(Constants.EXTENT_X * 17, Constants.EXTENT_Y * 14)); customerDestination = new Text("", new Vec2F(0.37f, -0.30f), new Vec2F(Constants.EXTENT_X * 17, Constants.EXTENT_Y * 14)); scoreText.SetFontSize(23); scoreText.SetColor(new Vec3I(255, 255, 255)); customerDestination.SetFontSize(23); customerDestination.SetColor(new Vec3I(255, 255, 255)); background = new Entity( new StationaryShape(0.0f, 0.0f, 1f, 1f), ImageContainer.GetInstance().GetImageByName("SpaceBackground.png")); PlayerScore = 0; }
public SpaceTaxiLevelFactory() { levelLoader = new LevelLoader(); levelParser = new LevelParser(); imageContainer = ImageContainer.GetInstance(); }
public static ImageContainer GetInstance() { return(ImageContainer.instance ?? (ImageContainer.instance = new ImageContainer())); }