Пример #1
0
        public override InteractableThemePropertyValue GetProperty(InteractableThemeProperty property)
        {
            InteractableThemePropertyValue start = new InteractableThemePropertyValue();

            start.Texture = propertyBlock.GetTexture("_MainTex");
            return(start);
        }
Пример #2
0
        public override InteractableThemePropertyValue GetProperty(InteractableThemeProperty property)
        {
            InteractableThemePropertyValue start = new InteractableThemePropertyValue();

            start.Vector3 = Host.transform.localPosition;
            return(start);
        }
Пример #3
0
        public override InteractableThemePropertyValue GetProperty(InteractableThemeProperty property)
        {
            if (Host == null)
            {
                return(new InteractableThemePropertyValue());
            }

            InteractableThemePropertyValue start = new InteractableThemePropertyValue();
            string propId = property.GetShaderPropId();

            switch (property.Type)
            {
            case InteractableThemePropertyValueTypes.Color:
                start.Color = propertyBlock.GetVector(propId);
                break;

            case InteractableThemePropertyValueTypes.ShaderFloat:
                start.Float = propertyBlock.GetFloat(propId);
                break;

            case InteractableThemePropertyValueTypes.shaderRange:
                start.Float = propertyBlock.GetFloat(propId);
                break;

            default:
                break;
            }

            return(start);
        }
Пример #4
0
        public override InteractableThemePropertyValue GetProperty(InteractableThemeProperty property)
        {
            InteractableThemePropertyValue start = new InteractableThemePropertyValue();

            start.Vector3 = Host.transform.eulerAngles;
            return(start);
        }
Пример #5
0
        public override InteractableThemePropertyValue GetProperty(InteractableThemeProperty property)
        {
            InteractableThemePropertyValue start = new InteractableThemePropertyValue();

            start.Vector3 = hostTransform.localScale;
            return(start);
        }
        public override InteractableThemePropertyValue GetProperty(InteractableThemeProperty property)
        {
            InteractableThemePropertyValue start = new InteractableThemePropertyValue();

            start.Bool = Host.activeSelf;
            return(start);
        }
        public override InteractableThemePropertyValue GetProperty(InteractableThemeProperty property)
        {
            InteractableThemePropertyValue start = new InteractableThemePropertyValue();

            start.String = property.Values[lastIndex].String;
            return(start);
        }
        public override InteractableThemePropertyValue GetProperty(InteractableThemeProperty property)
        {
            InteractableThemePropertyValue start = new InteractableThemePropertyValue();

            material       = renderer.material;
            start.Material = material;
            return(start);
        }
        public override InteractableThemePropertyValue GetProperty(InteractableThemeProperty property)
        {
            InteractableThemePropertyValue start = new InteractableThemePropertyValue();
            AudioSource audioSource = Host.GetComponentInChildren <AudioSource>();

            if (audioSource != null)
            {
                start.AudioClip = audioSource.clip;
            }
            return(start);
        }
Пример #10
0
        public override InteractableThemePropertyValue GetProperty(InteractableThemeProperty property)
        {
            InteractableThemePropertyValue color = new InteractableThemePropertyValue();

            string propId = property.GetShaderPropId();

            if (propertyBlocks.Count > 0)
            {
                BlocksAndRenderer bAndR = propertyBlocks[0];
                color.Color = bAndR.Block.GetVector(propId);
            }

            return(color);
        }
Пример #11
0
        public override InteractableThemePropertyValue GetProperty(InteractableThemeProperty property)
        {
            InteractableThemePropertyValue start = new InteractableThemePropertyValue();

            start.String = "";

            if (mesh != null)
            {
                start.String = mesh.text;
                return(start);
            }

            if (mesh != null)
            {
                start.String = text.text;
            }
            return(start);
        }
Пример #12
0
        public override InteractableThemePropertyValue GetProperty(InteractableThemeProperty property)
        {
            InteractableThemePropertyValue color = new InteractableThemePropertyValue();

            if (mesh != null)
            {
                color.Color = mesh.color;
                return(color);
            }

            if (text != null)
            {
                color.Color = text.color;
                return(color);
            }

            return(base.GetProperty(property));
        }
Пример #13
0
        public override InteractableThemePropertyValue GetProperty(InteractableThemeProperty property)
        {
            InteractableThemePropertyValue start = new InteractableThemePropertyValue();

            start.String = "";
            TextMesh mesh = Host.GetComponentInChildren <TextMesh>();

            if (mesh != null)
            {
                start.String = mesh.text;
                return(start);
            }

            Text text = Host.GetComponentInChildren <Text>();

            if (mesh != null)
            {
                start.String = text.text;
            }
            return(start);
        }
Пример #14
0
        public override InteractableThemePropertyValue GetProperty(InteractableThemeProperty property)
        {
            InteractableThemePropertyValue color = new InteractableThemePropertyValue();
            TextMesh mesh = Host.GetComponent <TextMesh>();

            if (mesh != null)
            {
                color.Color = mesh.color;
                return(color);
            }

            Text text = Host.GetComponent <Text>();

            if (text != null)
            {
                color.Color = text.color;
                return(color);
            }

            return(base.GetProperty(property));
        }
Пример #15
0
        public override InteractableThemePropertyValue GetProperty(InteractableThemeProperty property)
        {
            InteractableThemePropertyValue start = new InteractableThemePropertyValue();

            switch (property.Name)
            {
            case "Scale":
                start.Vector3 = hostTransform.localScale;
                break;

            case "Offset":
                start.Vector3 = hostTransform.localPosition;
                break;

            case "Color":
                start = base.GetProperty(property);
                break;

            default:
                break;
            }
            return(start);
        }