Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="type"></param>
        public void TurnFace(JCS_2DFaceType type)
        {
            Vector3 originalScale         = this.gameObject.transform.localScale;
            float   absoluteOriginalScale = JCS_Mathf.AbsoluteValue(originalScale.x);

            this.gameObject.transform.localScale = new Vector3((int)type * absoluteOriginalScale, originalScale.y, originalScale.z);

            mFace = type;
        }
Exemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        public void ToggleFace()
        {
            if (mFace == JCS_2DFaceType.FACE_LEFT)
            {
                mFace = JCS_2DFaceType.FACE_RIGHT;
            }
            else
            {
                mFace = JCS_2DFaceType.FACE_LEFT;
            }

            TurnFace((int)mFace);
        }