CCMacros
CCMacros
Cocos2DInheritance: System.Object
Fields
CCDirectorStatsUpdateIntervalInSeconds(System.Single)
CCHiResDisplayFilenameSuffix(System.String)
CCSpriteIndexNotInitialized(System.Int32)
FLT_EPSILON(System.Single)
Methods
CCContentScaleFactor()
System.Single CCContentScaleFactor()()Returns:
System.SingleCCDegreesToRadians(float)
System.Single CCDegreesToRadians(float)(System.Single angle)Parameters:
angle (System.Single)Returns:
System.SingleExample
CCRadiansToDegrees(float)
System.Single CCRadiansToDegrees(float)(System.Single angle)Parameters:
angle (System.Single)Returns:
System.SingleExample
CCRandomBetween0And1()
System.Single CCRandomBetween0And1()()Returns:
System.SingleExample
CCRandomBetweenNegative1And1()
System.Single CCRandomBetweenNegative1And1()()returns a random float between -1 and 1
Returns:
System.SingleExample
CCSwap(ref T, ref T)
CCSwap(ref T, ref T)(T x, T y)simple macro that swaps 2 variables
Parameters:
x (T)y (T)Example
PixelsToPoints(CCPoint)
Cocos2D.CCPoint PixelsToPoints(CCPoint)(Cocos2D.CCPoint p)Parameters:
p (Cocos2D.CCPoint)Returns:
Cocos2D.CCPointPixelsToPoints(CCRect)
Cocos2D.CCRect PixelsToPoints(CCRect)(Cocos2D.CCRect r)Parameters:
r (Cocos2D.CCRect)Returns:
Cocos2D.CCRectPixelsToPoints(CCSize)
Cocos2D.CCSize PixelsToPoints(CCSize)(Cocos2D.CCSize s)Parameters:
s (Cocos2D.CCSize)Returns:
Cocos2D.CCSizePointsToPixels(CCPoint)
Cocos2D.CCPoint PointsToPixels(CCPoint)(Cocos2D.CCPoint p)Parameters:
p (Cocos2D.CCPoint)Returns:
Cocos2D.CCPointPointsToPixels(CCRect)
Cocos2D.CCRect PointsToPixels(CCRect)(Cocos2D.CCRect r)Parameters:
r (Cocos2D.CCRect)Returns:
Cocos2D.CCRectPointsToPixels(CCSize)
Cocos2D.CCSize PointsToPixels(CCSize)(Cocos2D.CCSize s)Parameters:
s (Cocos2D.CCSize)Returns:
Cocos2D.CCSize