Files
sbox-public/engine/Sandbox.Tools/MapEditor/MapDoc/SerializedEntity.cs
s&box team 71f266059a Open source release
This commit imports the C# engine code and game files, excluding C++ source code.

[Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
2025-11-24 09:05:18 +00:00

39 lines
1.0 KiB
C#

namespace Editor.MapEditor;
public abstract class EditorContext
{
/// <summary>
/// The current entity we're rendering gizmos for
/// </summary>
public virtual EntityObject Target { get; internal set; }
/// <summary>
/// If the current entity we're drawing selected
/// </summary>
public virtual bool IsSelected { get; internal set; }
/// <summary>
/// All selected entities
/// </summary>
public HashSet<EntityObject> Selection { get; internal set; }
/// <summary>
/// Given a string name return the first found target
/// </summary>
public virtual EntityObject FindTarget( string name ) => null;
/// <summary>
/// Given a string name return all found targets
/// </summary>
public virtual EntityObject[] FindTargets( string name ) => null;
public abstract class EntityObject : SerializedObject
{
public abstract Transform Transform { get; set; }
public abstract Vector3 Position { get; set; }
public abstract Angles Angles { get; set; }
public abstract Vector3 Scale { get; set; }
}
}