Empeld
Empeld plugin documentation.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
essentials.Prefabs.PrefabInstance Class Reference

An object that represents an in-world instance of a prefab More...

Inheritance diagram for essentials.Prefabs.PrefabInstance:
essentials.Prefabs.PrefabWriterInstance

Public Member Functions

delegate bool PrefabLookupDelegate (PrefabBlock pb)
 A delegate to help determine ways to look up a prefab More...
 
 PrefabInstance (IReadonlyPrefab prefab, Vector3i pos)
 Create an instance from a given prefab and a world position More...
 

Static Public Attributes

static readonly
PrefabLookupDelegate 
PredicateAll = pb => true
 Lookup that will return all blocks More...
 
static readonly
PrefabLookupDelegate 
PredicateNoInvisible = pb => pb.Block.Renderable
 Lookup that will return all blocks that are renderable More...
 
static readonly
PrefabLookupDelegate 
PredicateOnlySolid = pb => pb.Block.Solid
 Lookup that will only return solid blocks More...
 
static readonly
PrefabLookupDelegate 
PredicateNoEmpty = pb => pb.Block.Id != 0
 Look that will return all blocks except those that are empty (id 0) More...
 
static readonly
PrefabLookupDelegate 
PredicateDefault = PredicateNoEmpty
 Default lookup (PredicateNoEmpty) More...
 

Protected Attributes

readonly IWorld World
 World More...
 

Properties

Vector3i Position [get]
 The position of the instance More...
 
Vector3i WorldPositionMin [get]
 The min coord for world position More...
 
Vector3i WorldPositionMax [get]
 The max coord for world position More...
 
IReadonlyPrefab Prefab [get]
 The prefab that this instance represents More...
 
Size3i Size [get]
 The size of the prefab More...
 
Volume Area [get]
 The world-area of the prefab More...
 

Detailed Description

An object that represents an in-world instance of a prefab

Constructor & Destructor Documentation

essentials.Prefabs.PrefabInstance.PrefabInstance ( IReadonlyPrefab  prefab,
Vector3i  pos 
)

Create an instance from a given prefab and a world position

Parameters
prefabPrefab.
posPosition.
124  {
125  this.InjectDependencies();
126  _prefab = prefab;
127  _position = pos;
128  }

Member Function Documentation

delegate bool essentials.Prefabs.PrefabInstance.PrefabLookupDelegate ( PrefabBlock  pb)

A delegate to help determine ways to look up a prefab

Member Data Documentation

readonly PrefabLookupDelegate essentials.Prefabs.PrefabInstance.PredicateAll = pb => true
static

Lookup that will return all blocks

readonly PrefabLookupDelegate essentials.Prefabs.PrefabInstance.PredicateDefault = PredicateNoEmpty
static

Default lookup (PredicateNoEmpty)

readonly PrefabLookupDelegate essentials.Prefabs.PrefabInstance.PredicateNoEmpty = pb => pb.Block.Id != 0
static

Look that will return all blocks except those that are empty (id 0)

readonly PrefabLookupDelegate essentials.Prefabs.PrefabInstance.PredicateNoInvisible = pb => pb.Block.Renderable
static

Lookup that will return all blocks that are renderable

readonly PrefabLookupDelegate essentials.Prefabs.PrefabInstance.PredicateOnlySolid = pb => pb.Block.Solid
static

Lookup that will only return solid blocks

readonly IWorld essentials.Prefabs.PrefabInstance.World
protected

World

Attribute: Dependency

Property Documentation

Volume essentials.Prefabs.PrefabInstance.Area
get

The world-area of the prefab

The area.

Vector3i essentials.Prefabs.PrefabInstance.Position
get

The position of the instance

The position.

IReadonlyPrefab essentials.Prefabs.PrefabInstance.Prefab
get

The prefab that this instance represents

The prefab.

Size3i essentials.Prefabs.PrefabInstance.Size
get

The size of the prefab

The size.

Vector3i essentials.Prefabs.PrefabInstance.WorldPositionMax
get

The max coord for world position

The world position max.

Vector3i essentials.Prefabs.PrefabInstance.WorldPositionMin
get

The min coord for world position

The world position minimum.


The documentation for this class was generated from the following file: