GamePropertyTChange Property |
Namespace: DigitalRune.Game
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.
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.