Show / Hide Table of Contents

    Interface ISavedData

    The definition of an object that saves and loads the persistent state of an IEntity.

    This is an optional component of the IEntity structure if the IEntityData implementation also extends ISavedDataProvider.

    Namespace: IdleKit.Gameplay
    Assembly: cs.temp.dll.dll
    Syntax
    public interface ISavedData : IInjectable

    Properties

    TimeCreated

    Returns the timestamp in milliseconds that the ISavedData was first created.

    Declaration
    long TimeCreated { get; }
    Property Value
    Type Description
    Int64

    TimeModified

    Returns the timestamp in milliseconds that the ISavedData was last serialized.

    Declaration
    long TimeModified { get; }
    Property Value
    Type Description
    Int64

    Methods

    Delete()

    Deletes the saved state for this data

    Declaration
    void Delete()

    Load()

    Either loads a saved state of a data or creates a fresh state if could not be deserialized

    Declaration
    void Load()

    Reset()

    Resets to the default state of the saved data by setting all fields and calling Save(). The end results of this call is an equally or more optimal alternative to calling a Delete() directly followed by a Load() on the same data to revert it to default values

    Declaration
    void Reset()

    Save()

    Saves state for a data. It marks the ISavedData dirty so SerializationService can serialize all the dirty ISerializer at the same time using SerializeDirty(Action).

    To forcefully serialize a single save state, use Serialize<TSaveData>(String, TSaveData)

    Declaration
    void Save()
    Back to top Copyright © 2020 East Side Games Inc.