本文整理汇总了C#中Coordinates3D.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Coordinates3D.ToString方法的具体用法?C# Coordinates3D.ToString怎么用?C# Coordinates3D.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Coordinates3D
的用法示例。
在下文中一共展示了Coordinates3D.ToString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestBasicLighting
public void TestBasicLighting()
{
var repository = new BlockRepository();
repository.RegisterBlockProvider(new GrassBlock());
repository.RegisterBlockProvider(new DirtBlock());
repository.RegisterBlockProvider(new AirBlock());
repository.RegisterBlockProvider(new BedrockBlock());
var world = new TrueCraft.Core.World.World("TEST", new FlatlandGenerator());
world.BlockRepository = repository;
var lighter = new WorldLighting(world, repository);
world.GetBlockID(Coordinates3D.Zero); // Generate a chunk
lighter.InitialLighting(world.GetChunk(Coordinates2D.Zero));
for (int y = 5; y >= 0; y--)
{
Console.Write("Y: {0} ", y);
Console.Write(world.GetBlockID(new Coordinates3D(0, y, 0)));
Console.Write(" -> ");
Console.WriteLine(world.GetSkyLight(new Coordinates3D(0, y, 0)));
}
// Validate behavior
for (int y = 0; y < Chunk.Height; y++)
{
for (int x = 0; x < Chunk.Width; x++)
{
for (int z = 0; z < Chunk.Depth; z++)
{
var coords = new Coordinates3D(x, y, z);
var sky = world.GetSkyLight(coords);
if (y < 4)
Assert.AreEqual(0, sky, coords.ToString());
else
Assert.AreEqual(15, sky, coords.ToString());
}
}
}
}