示例#1
0
        public void Adaptate()
        {
            if (texture)
            {
                rend.material.mainTexture = texture;
            }
            var worldSize = SceneMB.ToWorldSize(Size);

            // Mirror
            worldSize.Scale(new Vector3((mirror ? -1 : 1), 1, 1));
            // Set
            transform.localScale = worldSize;
        }
        protected static BubbleData GenerateBubble(string text, int x, int y, bool showBorder, Color textColor, Color textOutlineColor, Color baseColor, Color outlineColor)
        {
            var destiny    = SceneMB.ToWorldSize(new Vector2(x, y));
            var bubbleData = new BubbleData(text, destiny, destiny - new Vector3(0, -15, 0))
            {
                TextColor        = textColor,
                TextOutlineColor = textOutlineColor
            };

            if (showBorder)
            {
                bubbleData.BaseColor    = baseColor;
                bubbleData.OutlineColor = outlineColor;
            }

            return(bubbleData);
        }