mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-01-16 02:09:20 -05:00
This commit imports the C# engine code and game files, excluding C++ source code. [Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
22 lines
522 B
C#
22 lines
522 B
C#
namespace GameObjects;
|
|
|
|
[TestClass]
|
|
public class Transforms
|
|
{
|
|
[TestMethod]
|
|
public void LocalTransform()
|
|
{
|
|
var scene = new Scene();
|
|
using var sceneScope = scene.Push();
|
|
|
|
var go = scene.CreateObject();
|
|
|
|
go.LocalTransform = Transform.Zero;
|
|
Assert.AreEqual( go.LocalTransform, Transform.Zero );
|
|
|
|
go.LocalPosition = new Vector3( 10, 10, 10 );
|
|
Assert.AreEqual( go.LocalTransform, Transform.Zero.WithPosition( new Vector3( 10, 10, 10 ) ) );
|
|
Assert.AreEqual( go.LocalPosition, new Vector3( 10, 10, 10 ) );
|
|
}
|
|
}
|