Changes the window's background to a random color each second.
View code on GitHub
Inheritance Hierarchy
DeltaEngine.Entities Entity
EmptyApp ColorChanger
Namespace: EmptyApp
Assembly: EmptyApp (in EmptyApp.exe) Version: 1.1.1.0 (1.1.1)
Syntax
The ColorChanger type exposes the following members.
Constructors
Name | Description | |
---|---|---|
ColorChanger | Initializes a new instance of the ColorChanger class |
Methods
Name | Description | |
---|---|---|
Add T | (Inherited from Entity.) | |
AddTag | (Inherited from Entity.) | |
ClearTags | (Inherited from Entity.) | |
Contains T | (Inherited from Entity.) | |
ContainsBehavior T | (Inherited from Entity.) | |
ContainsTag | (Inherited from Entity.) | |
Deactivate | (Inherited from Entity.) | |
Dispose | (Inherited from Entity.) | |
Get T |
Gets a specific component, derived classes can return faster cached values (e.g. Entity2D)
View code on GitHub (Inherited from Entity.) | |
GetActiveBehaviors | (Inherited from Entity.) | |
GetComponentsForSaving | (Inherited from Entity.) | |
GetOrDefault T | (Inherited from Entity.) | |
GetTags | (Inherited from Entity.) | |
Remove T | (Inherited from Entity.) | |
RemoveTag | (Inherited from Entity.) | |
Set | (Inherited from Entity.) | |
SetComponents | (Inherited from Entity.) | |
Start T | (Inherited from Entity.) | |
Stop T | (Inherited from Entity.) | |
ToString | (Inherited from Entity.) | |
Update |
Fields
Name | Description | |
---|---|---|
components | (Inherited from Entity.) | |
window |
Properties
Name | Description | |
---|---|---|
CurrentColor | ||
ElapsedTimeSinceColorChange | ||
IsActive | (Inherited from Entity.) | |
IsPauseable | (Inherited from Entity.) | |
NextColor | ||
NumberOfComponents | (Inherited from Entity.) | |
UpdatePriority | (Inherited from Entity.) |
Remarks
Examples
[Test] public void CheckIfBackgroundColorWasChangedAfterOneSecond() { var app = new ColorChanger(Resolve<Window>()); var initialColor = new Color(); AdvanceTimeAndUpdateEntities(1.0f); Assert.AreNotEqual(initialColor, app.NextColor); }
See Also