Interface IObjectType<TEntry, TObject>
Represents objects that consists of entries that represent a certain Object type.
Namespace: InsaneScatterbrain.MapGraph
Syntax
public interface IObjectType<TEntry, TObject> : IDataSetItem where TEntry : IObjectTypeEntry<TObject> where TObject : Object
Type Parameters
Name | Description |
---|---|
TEntry | The entry type. |
TObject | The object type. |
Properties
Entries
Gets entries of this type.
Declaration
ReadOnlyCollection<TEntry> Entries { get; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ReadOnlyCollection<T><TEntry> |
IsWeightEnabled
Whether or not weighting is enabled. If disabled, the weights shouldn't be taken into consideration and be treated as if they're all equal.
Declaration
bool IsWeightEnabled { get; set; }
Property Value
Type | Description |
---|---|
bool |
TotalWeight
The combined weight of all the entries.
Declaration
float TotalWeight { get; }
Property Value
Type | Description |
---|---|
float |
Methods
AddNewEntry()
Creates and adds a new entry this object type.
Declaration
void AddNewEntry()
CalculateTotalWeight()
Calculates the total weight.
Declaration
void CalculateTotalWeight()
Clean()
Remove any empty entries.
Declaration
void Clean()
MoveEntry(int, int)
Moves the entry's position within the list.
Declaration
void MoveEntry(int oldIndex, int newIndex)
Parameters
Type | Name | Description |
---|---|---|
int | oldIndex | The old index. |
int | newIndex | The new index. |
RemoveEntry(int)
Removes an entry from the object type.
Declaration
void RemoveEntry(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index | The index of entry. |