Esempio n. 1
0
 public override IEnumerable<string> IsValid( SubGraphType graphType )
 {
     var errors = new List<string> ();
     if( graphType != SubGraphType.SimpleLighting )
     {
         errors.Add( "Node not valid in graph type: " + graphType );
     }
     return errors;
 }
Esempio n. 2
0
		public override IEnumerable<string> IsValid ( SubGraphType graphType )
		{
			var errors = new List<string> ();
			errors.AddRange( base.IsValid( graphType ) );
			if( graphType != SubGraphType.Pixel )
			{
				errors.Add( "Node not valid in graph type: " + graphType );
			}
			return errors;
		}
Esempio n. 3
0
        public override IEnumerable <string> IsValid(SubGraphType graphType)
        {
            var errors = new List <string> ();

            if (graphType != SubGraphType.Pixel)
            {
                errors.Add("Node not valid in graph type: " + graphType);
            }
            return(errors);
        }
Esempio n. 4
0
        public override IEnumerable <string> IsValid(SubGraphType graphType)
        {
            var errors = new List <string> ();

            errors.AddRange(base.IsValid(graphType));

            if (graphType == SubGraphType.Vertex)
            {
                errors.Add("Node not valid in graph type: " + graphType);
            }
            return(errors);
        }
Esempio n. 5
0
		public override IEnumerable<string> IsValid( SubGraphType graphType )
		{
			var errors = new List<string> ();
			
			var validIDs = Owner.FindValidProperties( GetFieldType() );
			if( validIDs.Count( x => x.PropertyId == _inputId.Value ) <= 0 )
			{
				errors.Add( "Not Connected to valid Property" );
			}
			
			return errors;
		}
Esempio n. 6
0
        public override IEnumerable <string> IsValid(SubGraphType graphType)
        {
            var errors = new List <string> ();

            var validIDs = Owner.FindValidProperties(GetFieldType());

            if (validIDs.Count(x => x.PropertyId == _inputId.Value) <= 0)
            {
                errors.Add("Not Connected to valid Property");
            }

            return(errors);
        }
Esempio n. 7
0
        public void Show(Vector2 mousePos, SubGraphType graphType)
        {
            lastShowPosition = mousePos;
            GenericMenu menu = new GenericMenu();

            foreach (var item in _menuItems)
            {
                if ((item.Category == "Vertex" && graphType != SubGraphType.Vertex) ||
                    item.Category == "Lighting" && graphType != SubGraphType.SimpleLighting)
                {
                    continue;
                }
                menu.AddItem(new GUIContent(item.Category + "/" + item.Name, item.Desc), false, HandleMenuClick, item);
            }

            menu.ShowAsContext();
        }
Esempio n. 8
0
        public static string DisplayName(this SubGraphType graphType)
        {
            switch (graphType)
            {
            case SubGraphType.Pixel:
                return("Pixel Graph");

            case SubGraphType.Vertex:
                return("Vertex Graph");

            case SubGraphType.SimpleLighting:
                return("Lighting Graph");

            default:
                throw new Exception("Unsupported Type");
            }
        }
Esempio n. 9
0
		public void Show( Vector2 mousePos, SubGraphType graphType )
		{
			lastShowPosition = mousePos;
			GenericMenu menu = new GenericMenu();
			
			foreach( var item in _menuItems )
			{
				if( (item.Category == "Vertex" && graphType != SubGraphType.Vertex )
				   || item.Category == "Lighting" && graphType != SubGraphType.SimpleLighting )
				{
					continue;
				}
				menu.AddItem(new GUIContent( item.Category + "/" + item.Name, item.Desc), false, HandleMenuClick, item);
			}
			
			menu.ShowAsContext();
		}
Esempio n. 10
0
File: Node.cs Progetto: belzecue/SSE
 public virtual IEnumerable <string> IsValid(SubGraphType graphType)
 {
     return(new List <string> ());
 }
Esempio n. 11
0
File: Node.cs Progetto: stramit/SSE
 public virtual IEnumerable<string> IsValid( SubGraphType graphType )
 {
     return new List<string> ();
 }
Esempio n. 12
0
		private void SubGraphSelect( object objProperty )
		{
			if( objProperty.GetType() != typeof( SubGraphType ) )
			{
				return;
			}
			_currentSubGraphType = (SubGraphType) objProperty;
			SelectedInputChannel = null;
			SelectedOutputChannel = null;
		}