Exemplo n.º 1
0
		private void OnComponentRemoving(object sender, ComponentEventArgs e)
		{
			if (this.ComponentRemoving != null)
				this.ComponentRemoving(sender, e);
		}
Exemplo n.º 2
0
        private void Scene_ComponentRemoving(object sender, ComponentEventArgs e)
        {
            // Ignore events during transition
            if (Scene.IsSwitching) return;

            if (!this.buttonShowComponents.Checked)
            {
                GameObjectNode objNode = (e.Component != null && e.Component.GameObj != null) ? this.FindNode(e.Component.GameObj) : null;
                if (objNode != null)
                    objNode.UpdateIcon(e.Component);
                return;
            }

            ComponentNode oldObjNode = this.FindNode(e.Component);
            if (oldObjNode == null) return;

            Node parentNode = oldObjNode.Parent;
            parentNode.Nodes.Remove(oldObjNode);
            this.UnregisterNodeTree(oldObjNode);
        }
Exemplo n.º 3
0
		private void OnComponentAdded(object sender, ComponentEventArgs e)
		{
			if (this.ComponentAdded != null)
				this.ComponentAdded(sender, e);
		}
Exemplo n.º 4
0
        private void Scene_ComponentAdded(object sender, ComponentEventArgs e)
        {
            // Ignore events during transition
            if (Scene.IsSwitching) return;

            if (!this.buttonShowComponents.Checked)
            {
                GameObjectNode objNode = (e.Component != null && e.Component.GameObj != null) ? this.FindNode(e.Component.GameObj) : null;
                if (objNode != null)
                    objNode.UpdateIcon();
                return;
            }

            // Find the parent node to add to
            Node parentNode = e.Component.GameObj != null ? this.FindNode(e.Component.GameObj) : this.objectModel.Root;

            // No parent node existing? This must be a new object then.
            if (parentNode == null)
            {
                // Let the parent handle it when it registers.
                return;
            }

            ComponentNode newObjNode = this.ScanComponent(e.Component);
            this.InsertNodeSorted(newObjNode, parentNode);
            this.RegisterNodeTree(newObjNode);
        }
Exemplo n.º 5
0
		private void Scene_ComponentAdded(object sender, ComponentEventArgs e)
		{
			if (!this.buttonShowComponents.Checked)
			{
				GameObjectNode objNode = (e.Component != null && e.Component.GameObj != null) ? this.FindNode(e.Component.GameObj) : null;
				if (objNode != null)
					objNode.UpdateIcon();
				return;
			}
			ComponentNode newObjNode = this.ScanComponent(e.Component);
			Node parentNode = e.Component.GameObj != null ? this.FindNode(e.Component.GameObj) : this.objectModel.Root;
			this.InsertNodeSorted(newObjNode, parentNode);
			this.RegisterNodeTree(newObjNode);
		}
Exemplo n.º 6
0
		private void Scene_ComponentRemoving(object sender, ComponentEventArgs e)
		{
			if (this.camComp == e.Component) this.SetCurrentCamera(null);
		}
Exemplo n.º 7
0
 private void OnComponentRemoving(object sender, ComponentEventArgs e)
 {
     this.ComponentRemoving?.Invoke(sender, e);
 }
Exemplo n.º 8
0
 private void OnComponentAdded(object sender, ComponentEventArgs e)
 {
     this.ComponentAdded?.Invoke(sender, e);
 }