Namespace: DeltaEngine.Scenes
Assembly: DeltaEngine.Scenes (in DeltaEngine.Scenes.dll) Version: 1.1.1.0 (1.1.1)
Tests: DeltaEngine.Scenes.Tests.SceneTests
2 unit tests call DeltaEngine.Scenes.Scene.Clear
Assembly: DeltaEngine.Scenes (in DeltaEngine.Scenes.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Remarks
Examples
[Test, CloseAfterFirstFrame] public void ClearingControlsDeactivatesThem() { var label = new Sprite(material, Rectangle.One) { IsActive = true }; var control = new EmptyControl { IsActive = true }; scene.Add(label); scene.Add(control); scene.Clear(); Assert.AreEqual(0, scene.Controls.Count); Assert.IsFalse(label.IsActive); Assert.IsFalse(control.IsActive); }
[Test, CloseAfterFirstFrame] public void DisposingSceneClearsIt() { var loadedScene = ContentLoader.Load<Scene>("SceneWithAButton"); var button = loadedScene.Controls[0] as Button; loadedScene.Dispose(); Assert.AreEqual(0, loadedScene.Controls.Count); Assert.IsFalse(button.IsActive); }
See Also