예제 #1
0
파일: HelpInfo.cs 프로젝트: Banbury/duality
        public static HelpInfo FromSelection(ObjectSelection sel)
        {
            if (sel == null || sel.GameObjectCount != 1)
            {
                return(null);
            }
            return(FromGameObject(sel.GameObjects.First()));

            // ToDo: Probably improve later
        }
예제 #2
0
        public SelectionChangedEventArgs(ObjectSelection current, ObjectSelection previous, ObjectSelection.Category changedCategoryFallback)
        {
            this.current  = current;
            this.previous = previous;

            this.diffCat = ObjectSelection.GetAffectedCategories(this.previous, this.current);
            if (this.diffCat == ObjectSelection.Category.None)
            {
                this.diffCat = changedCategoryFallback;
            }
            this.added   = this.current - this.previous;
            this.removed = this.previous - this.current;
        }
예제 #3
0
        public ObjectPropertyChangedEventArgs(ObjectSelection obj, IEnumerable <PropertyInfo> infos, bool persistenceCritical = true)
        {
            if (infos == null)
            {
                infos = new PropertyInfo[0];
            }

            this.obj             = obj;
            this.propInfos       = infos.ToList();
            this.propNames       = this.propInfos.Select(i => i.Name).ToList();
            this.completeChange  = this.propInfos.Count == 0;
            this.persistCritical = persistenceCritical;
        }
예제 #4
0
 public PrefabAppliedEventArgs(ObjectSelection obj) : base(obj.HierarchyExpand(), new PropertyInfo[0])
 {
 }
예제 #5
0
 public ObjectPropertyChangedEventArgs(ObjectSelection obj, bool persistenceCritical = true) : this(obj, null, persistenceCritical)
 {
 }