コード例 #1
0
 public void OnGameObectRemoved(object sender, GameObjectEventArgs e)
 {
     Root.RemoveAll(element => (element.GameObject == e.GameObject));
     foreach (var child in Root)
     {
         RemoveInChildren(child,e.GameObject);
     } 
 }
コード例 #2
0
        public void OnGameObectAdded(object sender,GameObjectEventArgs e) 
        {
            TRVGameObjectElementViewModel element = new TRVGameObjectElementViewModel(e.GameObject);
            element.ElementReassigning += OnElementReassigning;
            Root.Add(element);

            foreach (var child in e.GameObject.Children)
            {
                AddChildToParrent(child, element);
            }
        }
コード例 #3
0
 public void OnAddingObject(object source, GameObjectEventArgs e)
 {
     UndoRedoStack.ClearRedoStack();
     AddGameObject(e.GameObject);
 }