本文整理匯總了C#中UnityEngine.Bounds.BottomLeft方法的典型用法代碼示例。如果您正苦於以下問題:C# Bounds.BottomLeft方法的具體用法?C# Bounds.BottomLeft怎麽用?C# Bounds.BottomLeft使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類UnityEngine.Bounds
的用法示例。
在下文中一共展示了Bounds.BottomLeft方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: TestBounds
public void TestBounds()
{
Bounds b = new Bounds(new Vector3(-2, 2, -2), new Vector3(4, 6, 8));
Assert.That(b.TopLeft(), Is.EqualTo(new Vector3(-4, 5, -2)));
Assert.That(b.TopCenter(), Is.EqualTo(new Vector3(-2, 5, -2)));
Assert.That(b.TopRight(), Is.EqualTo(new Vector3( 0, 5, -2)));
Assert.That(b.MiddleLeft(), Is.EqualTo(new Vector3(-4, 2, -2)));
Assert.That(b.MiddleCenter(), Is.EqualTo(new Vector3(-2, 2, -2)));
Assert.That(b.MiddleRight(), Is.EqualTo(new Vector3( 0, 2, -2)));
Assert.That(b.BottomLeft(), Is.EqualTo(new Vector3(-4, -1, -2)));
Assert.That(b.BottomCenter(), Is.EqualTo(new Vector3(-2, -1, -2)));
Assert.That(b.BottomRight(), Is.EqualTo(new Vector3( 0, -1, -2)));
Assert.That(b.TopLeft(2), Is.EqualTo(new Vector3(-6, 7, -2)));
Assert.That(b.TopCenter(2), Is.EqualTo(new Vector3(-2, 7, -2)));
Assert.That(b.TopRight(2), Is.EqualTo(new Vector3( 2, 7, -2)));
Assert.That(b.MiddleLeft(2), Is.EqualTo(new Vector3(-6, 2, -2)));
Assert.That(b.MiddleCenter(2), Is.EqualTo(new Vector3(-2, 2, -2)));
Assert.That(b.MiddleRight(2), Is.EqualTo(new Vector3( 2, 2, -2)));
Assert.That(b.BottomLeft(2), Is.EqualTo(new Vector3(-6, -3, -2)));
Assert.That(b.BottomCenter(2), Is.EqualTo(new Vector3(-2, -3, -2)));
Assert.That(b.BottomRight(2), Is.EqualTo(new Vector3( 2, -3, -2)));
}
示例2: TestBoundsZero
public void TestBoundsZero()
{
Bounds b = new Bounds();
Assert.That(b.TopLeft(), Is.EqualTo(Vector3.zero));
Assert.That(b.TopCenter(), Is.EqualTo(Vector3.zero));
Assert.That(b.TopRight(), Is.EqualTo(Vector3.zero));
Assert.That(b.MiddleLeft(), Is.EqualTo(Vector3.zero));
Assert.That(b.MiddleCenter(), Is.EqualTo(Vector3.zero));
Assert.That(b.MiddleRight(), Is.EqualTo(Vector3.zero));
Assert.That(b.BottomLeft(), Is.EqualTo(Vector3.zero));
Assert.That(b.BottomCenter(), Is.EqualTo(Vector3.zero));
Assert.That(b.BottomRight(), Is.EqualTo(Vector3.zero));
Assert.That(b.TopLeft(2), Is.EqualTo(new Vector3(-2, 2, 0)));
Assert.That(b.TopCenter(2), Is.EqualTo(new Vector3( 0, 2, 0)));
Assert.That(b.TopRight(2), Is.EqualTo(new Vector3( 2, 2, 0)));
Assert.That(b.MiddleLeft(2), Is.EqualTo(new Vector3(-2, 0, 0)));
Assert.That(b.MiddleCenter(2), Is.EqualTo(new Vector3( 0, 0, 0)));
Assert.That(b.MiddleRight(2), Is.EqualTo(new Vector3( 2, 0, 0)));
Assert.That(b.BottomLeft(2), Is.EqualTo(new Vector3(-2, -2, 0)));
Assert.That(b.BottomCenter(2), Is.EqualTo(new Vector3( 0, -2, 0)));
Assert.That(b.BottomRight(2), Is.EqualTo(new Vector3( 2, -2, 0)));
}