Terraria ModLoader  0.11.5
A framework for Terraria mods
Terraria.ModLoader.ContentInstance.ContentEntry Class Reference
+ Collaboration diagram for Terraria.ModLoader.ContentInstance.ContentEntry:

Public Member Functions

void Clear ()
 
void Link (Action< object, IEnumerable > update)
 
void Register (object obj)
 

Private Attributes

object instance
 
List< object > instances
 
Action< object, IEnumerable > staticUpdate
 

Detailed Description

Definition at line 11 of file ContentInstance.cs.

Member Function Documentation

void Terraria.ModLoader.ContentInstance.ContentEntry.Clear ( )

Definition at line 41 of file ContentInstance.cs.

41  {
42  lock (this) {
43  instance = null;
44  instances = null;
46  }
47  }
object instance
List< object > instances
Action< object, IEnumerable > staticUpdate
void Terraria.ModLoader.ContentInstance.ContentEntry.Link ( Action< object, IEnumerable >  update)

Definition at line 34 of file ContentInstance.cs.

34  {
35  lock (this) {
36  staticUpdate = update;
37  update(instance, instances);
38  }
39  }
object instance
List< object > instances
Action< object, IEnumerable > staticUpdate
void Terraria.ModLoader.ContentInstance.ContentEntry.Register ( object  obj)

Definition at line 17 of file ContentInstance.cs.

17  {
18  lock (this) {
19  if (instances != null) {
20  instances.Add(obj);
21  }
22  else if (instance != null) {
23  instances = new List<object> { instance, obj };
24  instance = null;
25  }
26  else {
27  instance = obj;
28  }
29 
31  }
32  }
object instance
List< object > instances
Action< object, IEnumerable > staticUpdate

Member Data Documentation

object Terraria.ModLoader.ContentInstance.ContentEntry.instance
private

Definition at line 13 of file ContentInstance.cs.

List<object> Terraria.ModLoader.ContentInstance.ContentEntry.instances
private

Definition at line 14 of file ContentInstance.cs.

Action<object, IEnumerable> Terraria.ModLoader.ContentInstance.ContentEntry.staticUpdate
private

Definition at line 15 of file ContentInstance.cs.