Skip to content

Class AddComponentCommand

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

Adds a component (zeroed, or with the given initial bytes; a tag has none).

public sealed class AddComponentCommand : IEditCommand

Inheritance

object ← AddComponentCommand

Implements

IEditCommand

Inherited Members

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

Constructors

AddComponentCommand(WorldRef, Entity, Entity, byte[]?)

Adds a component (zeroed, or with the given initial bytes; a tag has none).

public AddComponentCommand(WorldRef worldRef, Entity entity, Entity component, byte[]? initial = null)

Parameters

worldRef WorldRef

entity Entity

component Entity

initial byte[]?

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()