FlatRedBall.Glue.GuiDisplay.NamedObjectPropertyGridDisplayer.GetTextureScale C# (CSharp) Method

GetTextureScale() private method

private GetTextureScale ( ) : float
return float
        private float GetTextureScale()
        {
            float textureScale = 0;
            NamedObjectSave nos = Instance as NamedObjectSave;

            var instruction = nos.GetInstructionFromMember("TextureScale");
            if (instruction != null && instruction.Value != null)
            {
                if (instruction.Value is int)
                {
                    textureScale = (float)((int)instruction.Value);
                }
                else
                {
                    textureScale = (float)instruction.Value;
                }
            }
            return textureScale;
        }