Namespace: DeltaEngine.Entities
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Tests: Blocks.Tests.BlocksContentTests
3 unit tests call DeltaEngine.Entities.Entity.Set(System.Object)
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Parameters
- component
- Type: System Object
Remarks
Examples
[Test, CloseAfterFirstFrame] public void LoadContentWithNoPrefixSet() { var material = new Material(ShaderFlags.Position2DColoredTextured, "FruitBlocks_Block1"); Assert.IsNotNull(material.DiffuseMap); }
[Test, CloseAfterFirstFrame] public void LoadContentWithPrefixSet() { var content = new JewelBlocksContent { Prefix = "Mod1_" }; var material = new Material(ShaderFlags.Position2DColoredTextured, "DeltaEngineLogo"); new Sprite(material, new Rectangle(0.3f, 0.45f, 0.1f, 0.1f)); content.Prefix = "Mod2_"; material = new Material(ShaderFlags.Position2DColoredTextured, "DeltaEngineLogo"); new Sprite(material, new Rectangle(0.6f, 0.45f, 0.1f, 0.1f)); }
[Test, CloseAfterFirstFrame] public void ContentWithPrefixSet() { var content = new JewelBlocksContent { Prefix = "FruitBlocks_" }; var image = content.Load<Image>("Block1"); Assert.IsTrue(image.PixelSize == new Size(4) || image.PixelSize == new Size(64) || image.PixelSize == new Size(128)); content.Prefix = "JewelBlocks_"; image = content.Load<Image>("Block1"); Assert.IsTrue(image.PixelSize == new Size(4) || image.PixelSize == new Size(64) || image.PixelSize == new Size(128)); }
See Also