Interface IObjectTypeSet<TType, TObject>
Collection of different object types.
Inherited Members
Namespace: InsaneScatterbrain.MapGraph
Syntax
public interface IObjectTypeSet<TType, TObject> : IDataSet<TType>, IDataSet where TType : IDataSetItem where TObject : Object
Type Parameters
Name | Description |
---|---|
TType | The type of object type. |
TObject | The type of object represented by the entries. |
Methods
AddNewEntry(String)
Adds a new entry to the object type of the given ID.
Declaration
void AddNewEntry(string typeId)
Parameters
Type | Name | Description |
---|---|---|
System.String | typeId | The object type ID to add a new entry to. |
Clean()
Remove any empty entries from the object type objects.
Declaration
void Clean()
GetEntryCount(String)
Gets the number of entries of a given object type.
Declaration
int GetEntryCount(string typeId)
Parameters
Type | Name | Description |
---|---|---|
System.String | typeId | The object type's ID. |
Returns
Type | Description |
---|---|
System.Int32 | The number of entries. |
GetObject(String, Int32)
Gets the object of the given type ID and entry index combination.
Declaration
TObject GetObject(string typeId, int entryIndex)
Parameters
Type | Name | Description |
---|---|---|
System.String | typeId | The object type's ID. |
System.Int32 | entryIndex | The entry's index. |
Returns
Type | Description |
---|---|
TObject | The object. |
GetWeight(String, Int32)
Gets the weight of the given type ID and entry index combination.
Declaration
float GetWeight(string typeId, int entryIndex)
Parameters
Type | Name | Description |
---|---|---|
System.String | typeId | The object type's ID. |
System.Int32 | entryIndex | The entry's index. |
Returns
Type | Description |
---|---|
System.Single |
IsWeightEnabled(String)
Gets whether weighting is enabled for the given type.
Declaration
bool IsWeightEnabled(string typeId)
Parameters
Type | Name | Description |
---|---|---|
System.String | typeId | The type's ID. |
Returns
Type | Description |
---|---|
System.Boolean | Whether the weighting is enabled. |
MoveEntry(String, Int32, Int32)
Moves the entry's position within the type's list.
Declaration
void MoveEntry(string typeId, int oldIndex, int newIndex)
Parameters
Type | Name | Description |
---|---|---|
System.String | typeId | The object type's ID. |
System.Int32 | oldIndex | The old index. |
System.Int32 | newIndex | The new index. |
RemoveEntry(String, Int32)
Removes a the given entry index from the object type of the given ID.
Declaration
void RemoveEntry(string typeId, int entryIndex)
Parameters
Type | Name | Description |
---|---|---|
System.String | typeId | The object type's ID. |
System.Int32 | entryIndex | The entry's index to delete. |
SetObject(String, Int32, TObject)
Gets the object of the given type ID and entry index combination.
Declaration
void SetObject(string typeId, int entryIndex, TObject obj)
Parameters
Type | Name | Description |
---|---|---|
System.String | typeId | The object type's ID. |
System.Int32 | entryIndex | The entry's index. |
TObject | obj | The new object. |
SetWeight(String, Int32, Single)
Sets the weight of the given type ID and entry index combination.
Declaration
void SetWeight(string typeId, int entryIndex, float weight)
Parameters
Type | Name | Description |
---|---|---|
System.String | typeId | The type's ID. |
System.Int32 | entryIndex | The entry's index. |
System.Single | weight |
SetWeightEnabled(String, Boolean)
Sets whether weighting is enabled for the given type.
Declaration
void SetWeightEnabled(string typeId, bool enabled)
Parameters
Type | Name | Description |
---|---|---|
System.String | typeId | The type's ID. |
System.Boolean | enabled | Whether the weighting is enabled. |