Exemplo n.º 1
0
        //----------------------
        // Protected Variables

        //========================================
        //      setter / getter
        //------------------------------

        //========================================
        //      Unity's function
        //------------------------------
        private void Awake()
        {
            SpriteRenderer sp = this.GetComponent <SpriteRenderer>();

            Vector2 spriteRect = JCS_Utility.GetSpriteRendererRectWithNoScale(sp);

            mWidth  = spriteRect.x;
            mHeight = spriteRect.y;

            mOriginPosition = this.transform.position;
        }