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 |
---|---|---|
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 |
---|---|---|
string | typeId | The object type's ID. |
Returns
Type | Description |
---|---|
int | The number of entries. |
GetObject(string, int)
Gets the object of the given type ID and entry index combination.
Declaration
TObject GetObject(string typeId, int entryIndex)
Parameters
Type | Name | Description |
---|---|---|
string | typeId | The object type's ID. |
int | entryIndex | The entry's index. |
Returns
Type | Description |
---|---|
TObject | The object. |
GetWeight(string, int)
Gets the weight of the given type ID and entry index combination.
Declaration
float GetWeight(string typeId, int entryIndex)
Parameters
Type | Name | Description |
---|---|---|
string | typeId | The object type's ID. |
int | entryIndex | The entry's index. |
Returns
Type | Description |
---|---|
float |
IsWeightEnabled(string)
Gets whether weighting is enabled for the given type.
Declaration
bool IsWeightEnabled(string typeId)
Parameters
Type | Name | Description |
---|---|---|
string | typeId | The type's ID. |
Returns
Type | Description |
---|---|
bool | Whether the weighting is enabled. |
MoveEntry(string, int, int)
Moves the entry's position within the type's list.
Declaration
void MoveEntry(string typeId, int oldIndex, int newIndex)
Parameters
Type | Name | Description |
---|---|---|
string | typeId | The object type's ID. |
int | oldIndex | The old index. |
int | newIndex | The new index. |
RemoveEntry(string, int)
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 |
---|---|---|
string | typeId | The object type's ID. |
int | entryIndex | The entry's index to delete. |
SetObject(string, int, 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 |
---|---|---|
string | typeId | The object type's ID. |
int | entryIndex | The entry's index. |
TObject | obj | The new object. |
SetWeight(string, int, float)
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 |
---|---|---|
string | typeId | The type's ID. |
int | entryIndex | The entry's index. |
float | weight |
SetWeightEnabled(string, bool)
Sets whether weighting is enabled for the given type.
Declaration
void SetWeightEnabled(string typeId, bool enabled)
Parameters
Type | Name | Description |
---|---|---|
string | typeId | The type's ID. |
bool | enabled | Whether the weighting is enabled. |