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]
29 lines
456 B
C#
29 lines
456 B
C#
using Sandbox;
|
|
using System;
|
|
using System.Linq;
|
|
|
|
namespace GameObjects;
|
|
|
|
[TestClass]
|
|
public class Camera
|
|
{
|
|
[TestMethod]
|
|
public void MainCamera()
|
|
{
|
|
var scene = new Scene();
|
|
using var sceneScope = scene.Push();
|
|
|
|
Assert.IsNull( scene.Camera );
|
|
|
|
var go = scene.CreateObject();
|
|
var cam = go.Components.Create<CameraComponent>();
|
|
|
|
Assert.IsNotNull( scene.Camera );
|
|
|
|
go.Destroy();
|
|
scene.ProcessDeletes();
|
|
|
|
Assert.IsNull( scene.Camera );
|
|
}
|
|
}
|