Recordmanager

Class Definition

public partial class RecordManager : MonoSingleton<RecordManager>

The RecordManager class is a singleton that manages records in the application. It extends the MonoSingleton class.

Properties

Records
public Dictionary<string, Dictionary<string, Record<object>>> Records { get; set; }

A dictionary of records. The key is a string representing the record type, and the value is another dictionary where the key is a string representing the record key and the value is a Record<object>.

Methods

CreateOrUpdateEntry
public void CreateOrUpdateEntry<T>(string recordType, string key, T value)

Creates or updates an entry in the records. If the record type does not exist, it will be created.

CreateOrUpdateHistoryEntry
public void CreateOrUpdateHistoryEntry<T>(string recordType, string key, T value)

Creates or updates a history entry in the records. If the record type does not exist, it will be created.

GetEntryFromRecord
public T GetEntryFromRecord<T>(string recordType, string key, T defaultValue = default)

Retrieves an entry from the records. If the entry does not exist, it returns the default value.

GetHistoryEntryFromRecord
public List<T> GetHistoryEntryFromRecord<T>(string recordType, string key, List<T> defaultValue = default)

Retrieves a history entry from the records. If the entry does not exist, it returns the default value.

HasEntry
public bool HasEntry(string recordType, string key)

Checks if an entry exists in the records.

GetUniqueEntries
public int GetUniqueEntries(string recordType)

Returns the number of unique entries for a given record type.

Reset
public void Reset(string recordType)

Resets all entries for a given record type.

Record Class

public class Record<T>

A class representing a record. It has a Key property of type string and a Value property of type T.

This page was last edited on 2024-03-03 16:33

Powered by Wiki|Docs

This page was last edited on 2024-03-03 16:33

BiteMe Games
2024

Powered by Wiki|Docs