Groups Entities such that they can be activated and deactivated together.
View code on GitHub
Inheritance Hierarchy
DeltaEngine.Content ContentData
DeltaEngine.Scenes Scene
Asteroids Game
Blocks UserInterfaceLandscape
Blocks UserInterfacePortrait
Breakout Game
Breakout MainMenu
ComplexMenu Menu
DeltaEngine.Scenes AutoArrangingMenu
DeltaNinja.Pages BasePage
FindTheWord GameScreen
GameOfDeath UserInterface
SideScroller Menu
Snake Menu
Namespace: DeltaEngine.Scenes
Assembly: DeltaEngine.Scenes (in DeltaEngine.Scenes.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The Scene type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Scene | Initializes a new instance of the Scene class | |
Scene(String) | Initializes a new instance of the Scene class |
Methods
Name | Description | |
---|---|---|
Add(Entity2D) | ||
Add(IEnumerable Entity2D ) | ||
AddControlToScene | ||
Clear | ||
CreateDefault | (Inherited from ContentData.) | |
Dispose | (Inherited from ContentData.) | |
DisposeData | (Overrides ContentData DisposeData .) | |
Hide | ||
InternalCreateDefault | (Inherited from ContentData.) | |
LoadData | (Overrides ContentData LoadData(Stream).) | |
LoadFromFile | ||
Remove | ||
SetQuadraticBackground(String) | ||
SetQuadraticBackground(Material) | ||
SetViewportBackground(String) | ||
SetViewportBackground(Material) | ||
Show | ||
ToBackground | ||
ToForeground | ||
ToString | (Inherited from ContentData.) |
Fields
Name | Description | |
---|---|---|
background | ||
ContentChanged | (Inherited from ContentData.) |
Properties
Name | Description | |
---|---|---|
AllowCreationIfContentNotFound | (Inherited from ContentData.) | |
Controls | ||
DrawArea | ||
IsDisposed | (Inherited from ContentData.) | |
MetaData | (Inherited from ContentData.) | |
Name | (Inherited from ContentData.) |
Remarks
Examples
[Test, CloseAfterFirstFrame] public void LoadSceneWithoutAnyControls() { var loadedScene = ContentLoader.Load<Scene>("EmptyScene"); Assert.AreEqual("EmptyScene", loadedScene.Name); Assert.AreEqual(0, loadedScene.Controls.Count); }
[Test] public void LoadSceneWithAButton() { var loadedScene = ContentLoader.Load<Scene>("SceneWithAButton"); Assert.AreEqual("SceneWithAButton", loadedScene.Name); Assert.AreEqual(1, loadedScene.Controls.Count); Assert.AreEqual(typeof(Button), loadedScene.Controls[0].GetType()); }
[Test, CloseAfterFirstFrame] public void LoadSceneWithAButtonAndChangeTheMaterial() { var loadedScene = ContentLoader.Load<Scene>("SceneWithAButtonWithChangedMaterial"); Assert.AreEqual("SceneWithAButtonWithChangedMaterial", loadedScene.Name); Assert.AreEqual(1, loadedScene.Controls.Count); Assert.AreEqual(typeof(Button), loadedScene.Controls[0].GetType()); }
See Also