FlatRedBall Content Manager:Multiple Content Managers

Introduction FlatRedBall supports having any number of ContentManagers living concurrently. This section will explain some situations where multiple content managers may be useful. Overlapping content Multiple content managers may be used if two content managers can exist at the same time, usually for async or time-sliced loading. For example, consider a game where the user[…]


Introduction The LoadFromGlobalIfExists is a static variable in the ContentManager class which controls whether FlatRedBall will search in the Global content manager for content even if a file is being loaded from a non-global content manager. The default value is true.


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:


Introduction The GlobalContentManager is a value which can be used to load content using a “global” content manager. Not only is this content manager available globally, but it is never unloaded. Therefore, any content loaded using GlobalContentManager will not be unloaded until the game exits. Using a GlobalContentManager is useful for content which appears frequently[…]


Introduction The AddUnloadMethod allows you add custom logic to be executed when a ContentManager is unloaded. This is most often used to null-out static references to content contained in a particular ContentMangaer. This functionality is used heavily in Glue generated code, but it can also be used to null-out static objects in custom code. Code[…]


Introduction Content managers provide functionality for organizing and caching game assets. They can be thought of as a “bucket of assets”. When you create an asset through the Content Manager, you give it a name (usually its file name) and decide which Content Manager it goes into. Later if the same name appears, the FlatRedBall[…]

FlatRedBall.Forms 1.2 Released

Introduction The latest release of FlatRedBall, Gum, and Gum plugin in Glue includes support for FlatRedBall.Forms version 1.2. This version adds the following functionality: New StackPanel control New AddChild method for all FrameworkElements (allowing parent/child relationship to be created without accessing the Visual object) Support for same-named Gum runtime objects in different folders with the[…]

FlatRedBall.Forms 1.1 Released

The latest templates and Glue plugin include support for FlatRedBall.Forms 1.1. This version adds the TreeView control, along with the TreeViewItem used within the TreeView control. Example Code The latest Glue + Gum plugin includes default implementations for TreeView and TreeViewItem. This means that the TreeView can be created purely in Gum, purely in code,[…]


Introduction The CollisionManager class provides methods for handling collision (the touching of game objects) in FlatRedBall games. The CollisionManager has built-in methods for handling collision between collidable entities (entities which implement the ICollidable interface). Use of the CollisionManager is not necessary, but it can reduce and standardize code for handling collisions. Collision Relationships The CollisionManager is[…]


Introduction The WindowsInputEventManager is a class which can be used to read character-based input from the keyboard (as opposed to key-based input, as provided by the FlatRedBall Keyboard class). Character based input (where character refers to the char  type) is useful for games which need to read string input from the keyboard. For example, games[…]