public override InteractableThemePropertyValue GetProperty(InteractableThemeProperty property)
        {
            InteractableThemePropertyValue start = new InteractableThemePropertyValue();

            start.Bool = Host.activeSelf;
            return(start);
        }
예제 #2
0
        public override InteractableThemePropertyValue GetProperty(InteractableThemeProperty property)
        {
            InteractableThemePropertyValue start = new InteractableThemePropertyValue();

            start.Vector3 = hostTransform.eulerAngles;
            return(start);
        }
예제 #3
0
        /// <inheritdoc />
        public override InteractableThemePropertyValue GetProperty(InteractableThemeProperty property)
        {
            InteractableThemePropertyValue start = new InteractableThemePropertyValue();

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

            start.Texture = propertyBlock.GetTexture("_MainTex");
            return(start);
        }
        /// <inheritdoc />
        public override InteractableThemePropertyValue GetProperty(InteractableThemeProperty property)
        {
            InteractableThemePropertyValue start = new InteractableThemePropertyValue();

            start.Vector3 = hostTransform.localPosition;
            return(start);
        }
예제 #6
0
        /// <inheritdoc />
        public override InteractableThemePropertyValue GetProperty(InteractableThemeProperty property)
        {
            InteractableThemePropertyValue start = new InteractableThemePropertyValue();

            material       = renderer.material;
            start.Material = material;
            return(start);
        }
예제 #7
0
        /// <inheritdoc />
        public override void Init(GameObject host, InteractableThemePropertySettings settings)
        {
            base.Init(host, settings);
            if (host != null)
            {
                startScaleValue         = new InteractableThemePropertyValue();
                startScaleValue.Vector3 = host.transform.localScale;
            }

            timer = Ease.LerpTime;
        }
예제 #8
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);
        }
예제 #9
0
        /// <inheritdoc />
        public override InteractableThemePropertyValue GetProperty(InteractableThemeProperty property)
        {
            if (Host == null)
            {
                return(startScaleValue);
            }

            InteractableThemePropertyValue prop = new InteractableThemePropertyValue();

            prop.Vector3 = Host.transform.localScale;

            return(prop);
        }
        /// <inheritdoc />
        public override InteractableThemePropertyValue GetProperty(InteractableThemeProperty property)
        {
            InteractableThemePropertyValue color = new InteractableThemePropertyValue();

            int propId = property.GetShaderPropertyId();

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

            return(color);
        }
        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));
        }
        /// <inheritdoc />
        public override InteractableThemePropertyValue GetProperty(InteractableThemeProperty property)
        {
            InteractableThemePropertyValue color = new InteractableThemePropertyValue();

            // check if a text object exists and get the color,
            // set the delegate to bypass these checks in the future.
            // if no text objects exists then fall back to renderer based color getting.
            if (GetColorValue != null)
            {
                GetColorValue(property, out color.Color);
                return(color);
            }
            else
            {
                if (TryGetTextMeshProColor(property, out color.Color))
                {
                    GetColorValue = TryGetTextMeshProColor;
                    return(color);
                }

                if (TryGetTextMeshProUGUIColor(property, out color.Color))
                {
                    GetColorValue = TryGetTextMeshProUGUIColor;
                    return(color);
                }

                if (TryGetTextMeshColor(property, out color.Color))
                {
                    GetColorValue = TryGetTextMeshColor;
                    return(color);
                }

                if (TryGetTextColor(property, out color.Color))
                {
                    GetColorValue = TryGetTextColor;
                    return(color);
                }

                // no text components exist, fallback to renderer
                TryGetRendererColor(property, out color.Color);
                GetColorValue = TryGetRendererColor;
                return(color);
            }
        }
        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);
        }