Room の数値プロパティを初期化する方法

Diarkis C# クライアント Room クラスでは数値型のルームプロパティを競合をおこさずに更新するためのメソッドを提供しています。

以下の例は、Room を作成したクライアントにより数値型のルームプロパティを初期化するものです。

NOTE: sync フラグを true にした場合、リモートのメンバー・クライアントで OnIncrPropertySync イベントが発生します。

// This initializes a numeric room property named HP and its value will be 1000

bool sync = false; // we do not need to synchronize with other members assuming there is nobody yet

room.IncrProperty("HP", 1000, sync);