// when a @GameObject object is added the the list of @GameObject objects // the parent variable is set to this @Scene object - obviously private void GameObjects_AddingNew(object sender, ObservableListOnAddEventArgs e) { GameObject go = e.Item as GameObject; go.Scene = this; }
// when a @Command object is added the the list of @Command objects // the parent variable is set to this @GameObject object - obviously private void Commands_AddingNew(object sender, ObservableListOnAddEventArgs e) { Command c = e.Item as Command; c.GameObject = this; }