Skip to main content

CCMacros

CCMacros

Cocos2D

Inheritance: System.Object

Fields

CCDirectorStatsUpdateIntervalInSeconds(System.Single)
CCHiResDisplayFilenameSuffix(System.String)
CCSpriteIndexNotInitialized(System.Int32)
FLT_EPSILON(System.Single)

Methods

CCContentScaleFactor()

System.Single CCContentScaleFactor()()
Returns:
System.Single

CCDegreesToRadians(float)

System.Single CCDegreesToRadians(float)(System.Single angle)
Parameters:
angle (System.Single)
Returns:
System.Single
Example

CCRadiansToDegrees(float)

System.Single CCRadiansToDegrees(float)(System.Single angle)
Parameters:
angle (System.Single)
Returns:
System.Single
Example

CCRandomBetween0And1()

System.Single CCRandomBetween0And1()()
Returns:
System.Single
Example

CCRandomBetweenNegative1And1()

System.Single CCRandomBetweenNegative1And1()()

returns a random float between -1 and 1

Returns:
System.Single
Example

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.CCPoint

PixelsToPoints(CCRect)

Cocos2D.CCRect PixelsToPoints(CCRect)(Cocos2D.CCRect r)
Parameters:
r (Cocos2D.CCRect)
Returns:
Cocos2D.CCRect

PixelsToPoints(CCSize)

Cocos2D.CCSize PixelsToPoints(CCSize)(Cocos2D.CCSize s)
Parameters:
s (Cocos2D.CCSize)
Returns:
Cocos2D.CCSize

PointsToPixels(CCPoint)

Cocos2D.CCPoint PointsToPixels(CCPoint)(Cocos2D.CCPoint p)
Parameters:
p (Cocos2D.CCPoint)
Returns:
Cocos2D.CCPoint

PointsToPixels(CCRect)

Cocos2D.CCRect PointsToPixels(CCRect)(Cocos2D.CCRect r)
Parameters:
r (Cocos2D.CCRect)
Returns:
Cocos2D.CCRect

PointsToPixels(CCSize)

Cocos2D.CCSize PointsToPixels(CCSize)(Cocos2D.CCSize s)
Parameters:
s (Cocos2D.CCSize)
Returns:
Cocos2D.CCSize