コード例 #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);
        }
コード例 #6
0
        public override InteractableThemePropertyValue GetProperty(InteractableThemeProperty property)
        {
            InteractableThemePropertyValue start = new InteractableThemePropertyValue();

            start.Bool = Host.activeSelf;
            return(start);
        }
コード例 #7
0
        public override InteractableThemePropertyValue GetProperty(InteractableThemeProperty property)
        {
            InteractableThemePropertyValue start = new InteractableThemePropertyValue();

            start.String = property.Values[lastIndex].String;
            return(start);
        }
コード例 #8
0
        public override InteractableThemePropertyValue GetProperty(InteractableThemeProperty property)
        {
            InteractableThemePropertyValue start = new InteractableThemePropertyValue();

            material       = renderer.material;
            start.Material = material;
            return(start);
        }
コード例 #9
0
        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);
        }