Skip to content

Class DestroyEntityCommand

Namespace: Apogee.Host.Editing
Assembly: Apogee.Host.dll

Deletes an entity and its branch, and brings them back under the same ids on undo.

public sealed class DestroyEntityCommand : IEditCommand

Inheritance

object ← DestroyEntityCommand

Implements

IEditCommand

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Constructors

DestroyEntityCommand(WorldRef, Entity)

Deletes an entity and its branch, and brings them back under the same ids on undo.

public DestroyEntityCommand(WorldRef worldRef, Entity entity)

Parameters

worldRef WorldRef

entity Entity

Properties

Name

What the Edit menu says: "Move Cube", "Delete Light".

public string Name { get; }

Property Value

string

Methods

Apply()

Does the edit (again, when redoing).

public void Apply()

TryMerge(IEditCommand)

Lets the command before following take it in, so that a whole drag is one step: following has been done already; the command folds its result in (its "after") and returns true. Most commands return false.

public bool TryMerge(IEditCommand following)

Parameters

following IEditCommand

Returns

bool

Undo()

public void Undo()