Ejemplo n.º 1
0
        protected override void HandleBranchChanged(object sender, ItemChangedEventArgs <Service> e)
        {
            base.HandleBranchChanged(sender, e);

            changeCountBranches.Set(e.Name, e.NewValue, "changed_");

            if (e.Name == "default")
            {
                changeCountBranches.Default = e.NewValue;
            }
        }
Ejemplo n.º 2
0
        protected override void HandleBranchChanged(object sender, ItemChangedEventArgs <Service> e)
        {
            base.HandleBranchChanged(sender, e);

            rowBranches.Set(e.Name, e.NewValue, "row_");

            if (e.Name == "iterator")
            {
                rowBranches.Default = e.NewValue;
            }
        }
Ejemplo n.º 3
0
        public void Set(string name, object obj)
        {
            var type = obj.GetType();

            if (type == typeof(UnityEngine.Object) || type.IsSubclassOf(typeof(UnityEngine.Object)))
            {
                objects.Set(name, obj);
            }
            else if (type == typeof(float))
            {
                floats.Set(name, obj);
            }
            else if (type == typeof(int))
            {
                ints.Set(name, obj);
            }
            else if (type == typeof(string))
            {
                strings.Set(name, obj);
            }
            else if (type == typeof(bool))
            {
                bools.Set(name, obj);
            }
            else if (type.IsSubclassOf(typeof(System.Enum)))
            {
                enums.Set(name, obj);
            }
            else if (type == typeof(Vector3))
            {
                vector3s.Set(name, obj);
            }
            else if (type == typeof(Vector2))
            {
                vector2s.Set(name, obj);
            }
            else if (type == typeof(Vector4))
            {
                vector4s.Set(name, obj);
            }
            else if (type == typeof(Color))
            {
                colors.Set(name, obj);
            }
            else if (type == typeof(LayerMaskMap))
            {
                layerMasks.Set(name, obj);
            }
            else
            {
                throw new NotSupportedException($"Type {type.AssemblyQualifiedName} is not supported.");
            }
        }
Ejemplo n.º 4
0
 protected override void HandleBranchChanged(object sender, ItemChangedEventArgs <Service> e)
 {
     if (e.Name == "iterator")
     {
         numBranches.Default = e.NewValue;
     }
     else if (e.Name == "done")
     {
         countBranches.Default = e.NewValue;
     }
     else if (e.Name.StartsWith("item_"))
     {
         numBranches.Set(e.Name, e.NewValue, "item_");
     }
     else if (e.Name.StartsWith("counted_"))
     {
         countBranches.Set(e.Name, e.NewValue, "counted_");
     }
 }