Table of Contents

Class QuakeMapEntity

Namespace
PopcorningGuineaPig.Engine.Quake
Assembly
PopcorningGuineaPig.Engine.dll

Represents an entity in a Quake map.

public class QuakeMapEntity
Inheritance
QuakeMapEntity
Inherited Members

Constructors

QuakeMapEntity()

Creates a new empty entity.

public QuakeMapEntity()

QuakeMapEntity(string)

Creates a new entity with the specified class name.

public QuakeMapEntity(string className)

Parameters

className string

The class name of the entity.

Properties

Brushes

The brushes (geometry) associated with this entity.

public List<QuakeBrush> Brushes { get; set; }

Property Value

List<QuakeBrush>

ClassName

The class name of the entity (e.g., "worldspawn", "pgp_player_spawn").

public string ClassName { get; set; }

Property Value

string

Origin

The origin (position) of the entity in 3D space.

public Vector3? Origin { get; set; }

Property Value

Vector3?

Properties

The properties of the entity as key-value pairs.

public Dictionary<string, string> Properties { get; set; }

Property Value

Dictionary<string, string>

Methods

AddProperty(string, string)

Adds a property to the entity.

public void AddProperty(string key, string value)

Parameters

key string

The property key.

value string

The property value.

GetPropertyAsBool(string, bool)

Gets a property value as a boolean.

public bool GetPropertyAsBool(string key, bool defaultValue = false)

Parameters

key string

The property key.

defaultValue bool

The default value to return if the property doesn't exist or can't be parsed.

Returns

bool

The property value as a boolean, or the default value.

GetPropertyAsFloat(string, float)

Gets a property value as a float.

public float GetPropertyAsFloat(string key, float defaultValue = 0)

Parameters

key string

The property key.

defaultValue float

The default value to return if the property doesn't exist or can't be parsed.

Returns

float

The property value as a float, or the default value.

GetPropertyAsInt(string, int)

Gets a property value as an integer.

public int GetPropertyAsInt(string key, int defaultValue = 0)

Parameters

key string

The property key.

defaultValue int

The default value to return if the property doesn't exist or can't be parsed.

Returns

int

The property value as an integer, or the default value.