Introduction Gum screens which are part of a FlatRedBall project generate a custom class. This custom class provides access to all contained objects within the screen. While it is possible to also interact with the elements in a general way (by name), using the typed properties in a screen is usually safer and more convenient.[…]
Introduction You may want to reset a screen under certain situations. For example when the player loses all of his or her lives then the screen may need to reset to its original state so the player can start the game over. Code To reset a screen, see the MoveToScreen page.
Introduction The Set as StartUp Screen menu option allows you to specify the first screen in your game. The StartUp screen will automatically load when the game is run, and it will be highlighted in red in Glue.
Introduction If you have a screen which seems to take a long time to load then this can be the cause of either long load times in generated code or a slow CustomInitialize function. The first step in fixing the problem is to identify whether it is custom or generated code. Measuring time in CustomInitialize[…]
Introduction The ContentManagerName property returns the Screen’s ContentManagerName. For more information on ContentManagers, see the ContentManager page. Code Example ContentManagerName can be used when manually loading files. For example, assuming that “Content/MyGraphic.png” is part of your project, you can load it as follows: // Assuming “this” is a screen (the code is in the Screen’s[…]
Introduction Now that we have an empty Gum project set up, let’s look at how we use screens. Screens in Gum are very similar to Screens in Glue, and we recommend that you create one screen in Gum for every screen in Glue. In fact, the Gum plugin automatically creates Gum screens for us whenever we create a[…]
Introduction Buttons are a common way to allow the user to navigate between Screens in your game. For this tutorial we will be creating a Button Entity, and two Screens. Creating a Button Entity For simplicity, we’ll create an Entity with an AxisAlignedRectangle for the button. To make the Entity: Right-click on “Entities” Select “Add[…]
Introduction Every Glue project must have at least one screen. To create a new screen: Right-click on the “Screens” item in Glue Select “Add Screen” Enter the name for the new screen Click OK Tutorial For information on how to create a new screen, see this page in the Beefball tutorial.
Introduction CustomLoadStaticContent is a code that is part of the default generated code file for every Screen and Entity created by Glue. CustomLoadStaticContent is called once when a Screen is first instantiated, and once for every Entity type when it is instantiated in a Screen. This method is called per Entity if it hasn’t been[…]