コード例 #1
0
ファイル: JCS_ResizeUI.cs プロジェクト: ly774508966/JCSUnity
        //========================================
        //      Self-Define
        //------------------------------
        //----------------------
        // Public Functions

#if (UNITY_EDITOR)
        /// <summary>
        /// Show the resize panel, for debugging usage.
        /// </summary>
        public void ShowResizePanel()
        {
            if (mImage == null)
            {
                mImage = JCS_Utility.ForceGetComponent <Image>(this);
            }
            else
            {
                if (mShowResizePanel && mImage.enabled)
                {
                    return;
                }
            }

            // Show it.
            mImage.enabled = true;

            // Set image. Just a white sprite!
            mImage.sprite = mImageSprite;

            // Set color.
            mImage.color = mResizePanelColor;

            mShowResizePanel = true;
        }
コード例 #2
0
        /* Functions */

        private void Awake()
        {
            if (mTextContainer == null)
            {
                mTextContainer = this.GetComponentInChildren <Text>();
            }

            mDistanceTileAction = JCS_Utility.ForceGetComponent <JCS_3DDistanceTileAction>(mTextContainer);
        }