Empeld
Empeld plugin documentation.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
essentials.Systems.Triggers.WorldAreaTrigger Class Reference

A trigger that invokes when a certain area and predicate is matched on a world event More...

Inheritance diagram for essentials.Systems.Triggers.WorldAreaTrigger:
essentials.Systems.Triggers.ITrigger

Public Member Functions

 WorldAreaTrigger (Volume volume, Func< IWorldReadonlyBlock, bool > predicate=null)
 
 WorldAreaTrigger (Vector3i pt, Size3i size, Func< IWorldReadonlyBlock, bool > predicate=null)
 
 WorldAreaTrigger (Vector3i pt, Func< IWorldReadonlyBlock, bool > predicate=null)
 
void Dispose ()
 

Protected Member Functions

 WorldAreaTrigger ()
 

Properties

Action< ITriggerTriggered
 
int TriggerCount [get]
 
- Properties inherited from essentials.Systems.Triggers.ITrigger
int TriggerCount [get]
 

Additional Inherited Members

- Events inherited from essentials.Systems.Triggers.ITrigger
Action< ITriggerTriggered
 

Detailed Description

A trigger that invokes when a certain area and predicate is matched on a world event

Constructor & Destructor Documentation

essentials.Systems.Triggers.WorldAreaTrigger.WorldAreaTrigger ( )
protected
22  {
23  this.InjectDependencies();
24  _world.OnBlockUpdate += HandleBlockUpdate;
25  }
Action< IWorldBlock > OnBlockUpdate
Occurs when a block in the world has updated
Definition: IWorld.cs:19
essentials.Systems.Triggers.WorldAreaTrigger.WorldAreaTrigger ( Volume  volume,
Func< IWorldReadonlyBlock, bool >  predicate = null 
)
28  :this()
29  {
30  _volume = volume;
31  _predicate = predicate;
32  }
essentials.Systems.Triggers.WorldAreaTrigger.WorldAreaTrigger ( Vector3i  pt,
Size3i  size,
Func< IWorldReadonlyBlock, bool >  predicate = null 
)
35  :this(new Volume(pt, size), predicate)
36  { }
Definition: Volume.cs:5
essentials.Systems.Triggers.WorldAreaTrigger.WorldAreaTrigger ( Vector3i  pt,
Func< IWorldReadonlyBlock, bool >  predicate = null 
)
39  :this(new Volume(pt, Size3i.One), predicate)
40  { }
Definition: Size3i.cs:5
Definition: Volume.cs:5
static readonly Size3i One
Definition: Size3i.cs:37

Member Function Documentation

void essentials.Systems.Triggers.WorldAreaTrigger.Dispose ( )
73  {
74  if (!_disposed)
75  {
76  _world.OnBlockUpdate -= HandleBlockUpdate;
77  _triggered.Clear();
78  _disposed = true;
79  }
80  }
Action< IWorldBlock > OnBlockUpdate
Occurs when a block in the world has updated
Definition: IWorld.cs:19

Property Documentation

int essentials.Systems.Triggers.WorldAreaTrigger.TriggerCount
get
Action<ITrigger> essentials.Systems.Triggers.WorldAreaTrigger.Triggered
addremove

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