コード例 #1
0
ファイル: CCBPosition.cs プロジェクト: KerwinMa/CocosSharp
        public static void SetRelativeScale(CCNode node, float fScaleX, float fScaleY, CCBScaleType nType, string pPropName)
        {
            Debug.Assert(node != null, "node should not be null");

            if (nType == CCBScaleType.MultiplyResolution)
            {
                float resolutionScale = CCBReader.ResolutionScale;

                fScaleX *= resolutionScale;
                fScaleY *= resolutionScale;
            }

            node.ScaleX = fScaleX;
            node.ScaleY = fScaleY;
        }
コード例 #2
0
        public static void SetRelativeScale(CCNode node, float fScaleX, float fScaleY, CCBScaleType nType, string pPropName)
        {
            Debug.Assert(node != null, "node should not be null");

            if (nType == CCBScaleType.MultiplyResolution)
            {
                float resolutionScale = CCBReader.ResolutionScale;

                fScaleX *= resolutionScale;
                fScaleY *= resolutionScale;
            }

            node.ScaleX = fScaleX;
            node.ScaleY = fScaleY;
        }