mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-01-02 11:28:19 -05:00
This commit imports the C# engine code and game files, excluding C++ source code. [Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
39 lines
1.0 KiB
C#
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; }
|
|
}
|
|
}
|