template class NetworkedField (Niantic.ARDK.Networking.HLAPI.Object.NetworkedField)

Overview

template <TValue>
class NetworkedField:
    Niantic.ARDK.Networking.HLAPI.NetworkedDataHandlerBase,
    Niantic.ARDK.Networking.HLAPI.Object.INetworkedField {
public:
    // properties

    Optional<TValue> Value;

    // events

    event ValueChanged();
    event ValueChangedIfReceiver();
    event ValueChangedIfSender();

    // methods

    NetworkedField(
        string identifier,
        NetworkedDataDescriptor descriptor,
        INetworkGroup group,
        Optional<TValue> defaultValue = default(Optional<TValue>)
    );

    void SetIfSender(TValue newValue);
};

Inherited Members

public:
    // fields

    static readonly object NothingToWrite = new object();

    // properties

    INetworkGroup Group;
    string Identifier;
    INetworkGroup Group;
    string Identifier;
    Optional<TValue> Value;

    // events

    event ValueChanged();
    event ValueChangedIfReceiver();
    event ValueChangedIfSender();

    // methods

    void Unregister();
    IPeer GetSelfOrNull();
    virtual void Unregister();
    void SetIfSender(TValue newValue);

Detailed Documentation

Methods

void SetIfSender(TValue newValue)

Sets the value only if the local peer is the sender for this field.