Empeld
Empeld plugin documentation.
essentials.Prefabs.PrefabWriterInstance Class Reference

A PrefabInstance that is read-write More...

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

Public Member Functions

 PrefabWriterInstance (Vector3i pos, Size3i size, Vector3i center)
 Create a new instance at a given position More...
 
 PrefabWriterInstance (Vector3i pos, Size3i size)
 Create a writer instance at a position with a size More...
 
 PrefabWriterInstance (IPrefab prefab, Vector3i pos)
 Create a prefab instance from another prefba and a pos More...
 
- Public Member Functions inherited from essentials.Prefabs.PrefabInstance
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...
 

Properties

new IPrefab Prefab [get]
 The prefab More...
 
- Properties inherited from essentials.Prefabs.PrefabInstance
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...
 

Additional Inherited Members

- Static Public Attributes inherited from essentials.Prefabs.PrefabInstance
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...
 
- Protected Attributes inherited from essentials.Prefabs.PrefabInstance
readonly IWorld World
 World More...
 

Detailed Description

A PrefabInstance that is read-write

Constructor & Destructor Documentation

◆ PrefabWriterInstance() [1/3]

essentials.Prefabs.PrefabWriterInstance.PrefabWriterInstance ( Vector3i  pos,
Size3i  size,
Vector3i  center 
)

Create a new instance at a given position

Parameters
posPosition.
sizeSize.
centerCenter.
30  :base(new Prefab(size, center), pos)
31  {
32  this._prefab = base.Prefab as IPrefab;
33  }
new IPrefab Prefab
The prefab
Definition: PrefabWriterInstance.cs:19

◆ PrefabWriterInstance() [2/3]

essentials.Prefabs.PrefabWriterInstance.PrefabWriterInstance ( Vector3i  pos,
Size3i  size 
)

Create a writer instance at a position with a size

Parameters
posPosition.
sizeSize.
41  :this(pos, size, Vector3i.Zero)
42  {}
A class representing a 3D coordinate of integers
Definition: Vector3i.cs:13
static readonly Vector3i Zero
Vector (0,0,0)
Definition: Vector3i.cs:59

◆ PrefabWriterInstance() [3/3]

essentials.Prefabs.PrefabWriterInstance.PrefabWriterInstance ( IPrefab  prefab,
Vector3i  pos 
)

Create a prefab instance from another prefba and a pos

Parameters
prefabPrefab.
posPosition.
50  :base(prefab, pos)
51  {
52  _prefab = prefab;
53  }

Property Documentation

◆ Prefab

new IPrefab essentials.Prefabs.PrefabWriterInstance.Prefab
get

The prefab

The prefab.


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