Click or drag to resize
DigitalRuneGamePropertyTChange Property
Event handler that automatically changes the value of the property.

Namespace: DigitalRune.Game
Assembly: DigitalRune.Game (in DigitalRune.Game.dll) Version: 1.4.0.0 (1.4.0.14427)
Syntax
public EventHandler<GamePropertyEventArgs<T>> Change { get; }

Property Value

Type: EventHandlerGamePropertyEventArgsT
Remarks

This event handler can be used to connect the property to the property of another game object. It can, for example, be used to connect the Changed event of a GamePropertyT to this event.

C#
GameObject.CreateProperty<Vector3F>(
  "Position", 
  GamePropertyCategories.Common, 
  "Defines the 3D position.", 
  new Vector3F());

var gameObject1 = new GameObject();
var gameObject2 = new GameObject();

var property1 = gameObject1.Properties.Get<Vector3F>("Position");
var property2 = gameObject2.Properties.Get<Vector3F>("Position");
property1.Changed += property2.Change;

Now, whenever the position of the first game object changes the position of the second game object will be updated and set to the same value.

See Also