CocosSharp Guides | Game Samples

CocosSharp Namespace

2D Game and Visualization Engine.

Remarks

CocosSharp is an engine that simplifies the development of 2D games and 2D visualizations. The engine works on a variety of software platforms and is exposed as a portable class library which allows developers to write code that runs on multiple platforms at once.

Classes

TypeReason
CCAccelAmplitude action.
CCAccelAmplitudeState
CCAccelDeccelAmplitude action.
CCAccelDeccelAmplitudeState
CCAccelerationThe device accelerometer reports values for each axis in units of g-force.
CCAccelerometerClass that processes the accelerometer events.
CCActionThe base abstract class for Action objects.
CCActionCameraBase class for actions.
CCActionCameraState
CCActionEaseBase class for Easing actions.
CCActionEaseState
CCActionInstantInstant actions are immediate actions. They don't have a duration like the IntervalAction actions.
CCActionInstantState
CCActionManager is a singleton that manages all the actions. Normally you won't need to use this singleton directly. 99% of the cases you will use the interface, which uses this singleton. But there are some cases where you might need to use this singleton. Examples:
CCActionStateEncapsulates the state of an action that is currently executing.
CCActionTag
CCActionTweenActionTween
CCActionTweenState
CCAffineTransform
CCAmplitudeActionAn abstract class for defining actions with periodic behavior.
CCAmplitudeActionState
CCAnimateAnimates a sprite given the name of an .
CCAnimateState
CCAnimationA Animation object is used to perform animations on the Sprite objects.
CCAnimationCacheSingleton that manages the Animations. It saves in a cache the animations. You should use this class if you want to save your animations in a cache.
CCAnimationFrame A frame of the animation. It contains information like:
CCApplicationInitializes game and handles input events.
CCAtlasNode is a subclass of that implements the RGBAProtocol and TextureProtocol protocol.
CCBezierByAn action that moves the target with a cubic Bezier curve by a certain distance.
CCBezierByState
CCBezierConfig
CCBezierToAn action that moves the target with a cubic Bezier curve to a destination point.
CCBezierToState
CCBlendFuncBlend Function used for textures.
CCBlinkBlinks a object by modifying it's visible attribute.
CCBlinkState
CCBoundingBoxI
CCBufferUsage
CCCallFuncCalls a 'callback'.
CCCallFuncNCalls a 'callback' with the node as the first argument N means .
CCCallFuncND
CCCallFuncNDState
CCCallFuncNState
CCCallFuncO
CCCallFuncOState
CCCallFuncState
CCCameraRepresents a camera whose properties specify the underlying view and projection matrices.
CCCardinalSplineByCardinal Spline path. http://en.wikipedia.org/wiki/Cubic_Hermite_spline#Cardinal_spline
CCCardinalSplineToCardinal Spline path. http://en.wikipedia.org/wiki/Cubic_Hermite_spline#Cardinal_spline
CCCardinalSplineToState
CCCatmullRomByAn action that moves the target with a CatmullRom curve by a certain distance. A Catmull Rom is a Cardinal Spline with a tension of 0.5. http://en.wikipedia.org/wiki/Cubic_Hermite_spline#Catmull.E2.80.93Rom_spline
CCCatmullRomToAn action that moves the target with a CatmullRom curve to a destination point. A Catmull Rom is a Cardinal Spline with a tension of 0.5. http://en.wikipedia.org/wiki/Cubic_Hermite_spline#Catmull.E2.80.93Rom_spline
CCClipMode
CCClippingNode is a subclass of . It draws its content (childs) clipped using a stencil. The stencil is an other that will not be drawn. The clipping is done using the alpha part of the stencil (adjusted with an alphaThreshold).
CCColor3BRGB color composed of bytes 3 bytes v3.0
CCColor4BRGBA color composed of 4 bytes v3.0
CCColor4FRGBA color composed of 4 floats v3.0
CCConfiguration contains some openGL variables.
CCContentManager
CCDeccelAmplitude action.
CCDeccelAmplitudeState
CCDelayTimeDelays the action a certain amount of seconds.
CCDelayTimeState
CCDepthFormat
CCDevice
CCDirector Maintains the CCScene objects that are in charge of displaying your game elements.
CCDisplayLinkDirector is a that synchronizes timers with the refresh rate of the display.
CCDisplayOrientation
CCDrawingPrimitives
CCDrawNode that draws dots, segments and polygons. Faster than the "drawing primitives" since they it draws everything in one single batch.
CCEaseBackIn action.
CCEaseBackInOut action.
CCEaseBackInOutState
CCEaseBackInState
CCEaseBackOut action.
CCEaseBackOutState
CCEaseBounceIn action.
CCEaseBounceInOut action.
CCEaseBounceInOutState
CCEaseBounceInState
CCEaseBounceOut action.
CCEaseBounceOutState
CCEaseCustom
CCEaseCustomState
CCEaseElasticEase Elastic abstract class.
CCEaseElasticInEase Elastic In action.
CCEaseElasticInOutEase Elastic InOut action.
CCEaseElasticInOutState
CCEaseElasticInState
CCEaseElasticOutEase Elastic Out action.
CCEaseElasticOutState
CCEaseElasticState
CCEaseExponentialInEase Exponential In.
CCEaseExponentialInOutEase Exponential InOut.
CCEaseExponentialInOutState
CCEaseExponentialInState
CCEaseExponentialOutEase Exponential Out.
CCEaseExponentialOutState
CCEaseIn action with a rate.
CCEaseInOut action with a rate.
CCEaseInOutState
CCEaseInState
CCEaseOut action with a rate.
CCEaseOutState
CCEaseRateActionBase class for Easing actions with rate parameters.
CCEaseRateActionState
CCEaseSineInEase Sine In.
CCEaseSineInOutEase Sine InOut.
CCEaseSineInOutState
CCEaseSineInState
CCEaseSineOutEase Sine Out.
CCEaseSineOutState
CCEmitterMode
CCEventThe base class that is extended for all CCEvents
CCEventAccelerateEvent associated with Accelerometer.
CCEventCode
CCEventCustomDefines a custom event that can be dispatched and listened for.
CCEventGamePad
CCEventGamePadButton
CCEventGamePadConnection
CCEventGamePadDPad
CCEventGamePadStick
CCEventGamePadTrigger
CCEventKeyboard
CCEventListener
CCEventListenerAccelerometer
CCEventListenerCustom
CCEventListenerGamePad
CCEventListenerKeyboard
CCEventListenerMouse
CCEventListenerTouchAllAtOnce
CCEventListenerTouchOneByOne
CCEventListenerType
CCEventMouse
CCEventTouch
CCEventType
CCFadeInFades In an object that implements the RGBAProtocol protocol. It modifies the opacity from 0 to 255. The "reverse" of this action is .
CCFadeInState
CCFadeOutFades Out an object that implements the RGBAProtocol protocol. It modifies the opacity from 255 to 0. The "reverse" of this action is .
CCFadeOutBLTiles action. Fades out the tiles in a Bottom-Left direction.
CCFadeOutBLTilesState
CCFadeOutDownTiles action. Fades out the tiles in downwards direction.
CCFadeOutDownTilesState
CCFadeOutState
CCFadeOutTRTiles action Fades out the tiles in a Top-Right direction.
CCFadeOutTRTilesState
CCFadeOutUpTiles action. Fades out the tiles in upwards direction.
CCFadeOutUpTilesState
CCFadeToFades an object that implements the RGBAProtocol protocol. It modifies the opacity from the current value to a custom one.
CCFadeToState
CCFastRandom
CCFileUtilsHelper class to handle file operations.
CCFiniteTimeActionAn abstract subclass of CCAction that defines an action that runs over a finite time duration.
CCFiniteTimeActionState
CCFlipXFlips the sprite horizontally.
CCFlipX3D action.
CCFlipX3DState
CCFlipXState
CCFlipYFlips the sprite vertically.
CCFlipY3D action.
CCFlipY3DState
CCFlipYState
CCFocusChangeDelegate
CCFocusManager
CCFollow is an action that "follows" a node.
CCFPSImage
CCGame
CCGamePadButtonStatus
CCGamePadEventType
CCGameStickStatus
CCGameTime
CCGlesVersion
CCGrabberFBO class that grabs the the contents of the screen
CCGraphicsResource
CCGrid3D is a 3D grid implementation. Each vertex has 3 dimensions: x,y,z
CCGrid3DActionBase class for actions. actions can modify a non-tiled grid.
CCGrid3DActionState
CCGridActionBase class for Grid actions.
CCGridActionState
CCGridBaseBase class for other
CCGridSize
CCHide the node.
CCHideState
CCImageFormat
CCIMEKeyboardNotificationInfo
CCJumpByMoves a object simulating a parabolic jump movement by modifying it's position attribute.
CCJumpByState
CCJumpTiles3D action. A sin function is executed to move the tiles across the Z axis.
CCJumpTiles3DState
CCJumpToMoves a object to a parabolic position simulating a jump movement by modifying it's position attribute.
CCJumpToState
CCKeyboardEventType
CCKeyboardState
CCKeys
CCKeyState
CCLabel
CCLabel+ivec4
CCLabelAtlas is a subclass of .
CCLabelBMFont is a subclass of .
CCLabelTtf is a subclass of TextureNode that knows how to render text labels.
CCLayerNode that associates a number of children with a common CCCamera.
CCLayerColor is a subclass of that implements the RGBAProtocol protocol.
CCLayerGradient is a subclass of that draws gradients across the background.
CCLayerMultiplexMultipleLayer is a with the ability to multiplex it's children. Features:
CCLens3D action.
CCLens3DState
CCLiquid action.
CCLiquidState
CCLog
CCMacros
CCMaskedSprite
CCMathHelper
CCMenu
CCMenuItem base class.
CCMenuItemFontA Helper class that creates a class with a Label.
CCMenuItemImage accepts images as items. The images has 3 different states:
CCMenuItemLabelAn abstract class for "label" items Any that supports the LabelProtocol protocol can be added. Supported nodes:
CCMenuItemLabelAtlas
CCMenuItemLabelBase
CCMenuItemLabelBMFont
CCMenuItemLabelTTF
CCMenuItemToggleA A simple container class that "toggles" it's inner items The inner items can be any .
CCMenuState
CCMotionStreak. Creates a trailing path.
CCMouseButton
CCMouseEventType
CCMoveByMoves a Node object x,y pixels by modifying it's position attribute. x and y are relative to the position of the object. Several actions can be concurrently called, and the resulting movement will be the sum of individual movements. v2.1beta2-custom
CCMoveByState
CCMoveToMoves a object to the position x,y. x and y are absolute coordinates by modifying it's position attribute. Several actions can be concurrently called, and the resulting movement will be the sum of individual movements. v2.1beta2-custom
CCMoveToState
CCNode The base class for all elements displayed.
CCOGLES
CCOrbitCamera action Orbits the camera around the center of the screen using spherical coordinates.
CCOrbitCameraState
CCPageTurn3DThis action simulates a page turn from the bottom right hand corner of the screen. It's not much use by itself but is used by the PageTurnTransition.
CCPageTurn3DState
CCParallaxNode: A node that simulates a parallax scroller.
CCParallel
CCParallelState
CCParticleBatchNode is like a batch node: if it contains children, it will draw them in 1 single OpenGL call (often known as "batch draw").
CCParticleExplosionAn explosion particle system.
CCParticleFireA fire particle system.
CCParticleFireworksA fireworks particle system.
CCParticleFlowerA flower particle system.
CCParticleGalaxyA galaxy particle system.
CCParticleMeteorA meteor particle system.
CCParticleRainA rain particle system.
CCParticleSmokeAn smoke particle system.
CCParticleSnowAn snow particle system.
CCParticleSpiralAn spiral particle system.
CCParticleSunA sun particle system.
CCParticleSystemParticle System base class. Attributes of a Particle System:
CCParticleSystem+CCParticleBase
CCParticleSystem+CCParticleGravity
CCParticleSystem+CCParticleRadial
CCParticleSystem+GravityMoveMode
CCParticleSystem+RadialMoveMode
CCParticleSystemCache
CCParticleSystemConfig
CCParticleSystemQuad is a subclass of .
CCParticleSystemType
CCPlacePlaces the node in a certain position.
CCPlaceState
CCPlayerIndex
CCPointDefines a point vector with two components.
CCPoint+ComputationOperationDelegate
CCPoint3
CCPointI
CCPointObject
CCPointSpritePoint component.
CCPositionType
CCPrimitiveBatch
CCProgressFromToProgress from a percentage to another percentage.
CCProgressFromToState
CCProgressTimer is a subclass of . It renders the inner sprite according to the percentage. The progress can be Radial, Horizontal or vertical.
CCProgressTimerType
CCProgressToProgress to percentage.
CCProgressToState
CCQuad3A 3D Quad. 4 * 3 floats.
CCRandom
CCRawList<T>
CCRawList<T>+Enumerator
CCRect
CCRemoveSelfRemove the node.
CCRemoveSelfState
CCRenderTargetUsage
CCRenderTexture is a generic rendering target. To render things into it, simply construct a render target, call begin on it, call visit on any cocos scenes or objects to render them, and call end. For convenience, render texture adds a sprite as it's display child with the results, so you can simply add the render texture to your scene and treat it like any other CocosNode. There are also functions for saving the render texture to disk in PNG or JPG format.
CCRepeatRepeats an action a number of times. To repeat an action forever use the action.
CCRepeatForeverRepeats an action for ever. To repeat the an action for a limited number of times use the action.
CCRepeatForeverState
CCRepeatState
CCReusedObject<T>
CCReuseGrid action.
CCReuseGridState
CCReverseTimeExecutes an action in reverse order, from time=duration to time=0.
CCReverseTimeState
CCRipple3D action.
CCRipple3DState
CCRotateByRotates a object clockwise a number of degrees by modifying it's rotation attribute.
CCRotateByState
CCRotateToRotates a object to a certain angle by modifying it's rotation attribute. The direction will be decided by the shortest angle.
CCRotateToState
CCScaleByScales a object a zoom factor by modifying it's scale attribute.
CCScaleByState
CCScaleToScales a object to a zoom factor by modifying it's scale attribute.
CCScaleToState
CCSceneToplevel node that is used to host CCNodes that share a common CCWindow and a common CCViewport.
CCSceneResolutionPolicy
CCSchedulePriority
CCScheduler is responsible for triggering the scheduled callbacks. You should not use NSTimer. Instead use this class.
CCScriptEngineManager is a singleton which holds an object instance of ScriptEngineProtocl It helps cocos2d-x and the user code to find back LuaEngine object v0.99.5-x-0.8.5
CCSequenceRuns actions sequentially, one after another.
CCSequenceState
CCSerialization
CCShaky3D action.
CCShaky3DState
CCShakyTiles3D action.
CCShakyTiles3DState
CCShatteredTiles3D action.
CCShatteredTiles3DState
CCShow the node.
CCShowState
CCShuffleTiles action Shuffle the tiles in random order.
CCShuffleTilesState
CCSize
CCSizeI
CCSkewBySkews a Node object by skewX and skewY degrees v1.0
CCSkewByState
CCSkewToSkews a Node object to given angles by modifying it's skewX and skewY attributes v1.0
CCSkewToState
CCSpawn a new action immediately.
CCSpawnState
CCSpeedA container action modifier to alter the running speed of another predefined action.
CCSplitCols action.
CCSplitColsState
CCSplitRows action.
CCSplitRowsState
CCSprite is a 2d image ( http://en.wikipedia.org/wiki/Sprite_(computer_graphics) )
CCSpriteBatchNode is like a batch node: if it contains children, it will draw them in 1 single OpenGL call (often known as "batch draw").
CCSpriteFontCache
CCSpriteFrameA has:
CCSpriteFrameCacheSingleton that handles the loading of the sprite frames. It saves in a cache the sprite frames.
CCSpriteSheet
CCSpriteSheetCache
CCStats
CCStopGrid action.
CCStopGridState
CCSurfaceFormat
CCTargetedActionOverrides the target of an action so that it always runs on the target specified at action creation rather than the one specified by runAction.
CCTargetedActionState
CCTask
CCTex2FA texcoord composed of 2 floats: u, y v3.0
CCTextAlignment
CCTextFieldTTFA simple text input field with TTF font.
CCTextFieldTTFDelegate
CCTexture2D class. This class allows to easily create OpenGL 2D textures from images, text or raw data. The created object will always have power-of-two dimensions. Depending on how you create the object, the actual image area of the texture might be smaller than the texture dimensions i.e. "contentSize" != (pixelsWide, pixelsHigh) and (maxS, maxT) != (1.0, 1.0). Be aware that the content of the generated textures will be upside-down!
CCTextureAtlasA class that implements a Texture Atlas. Supported features: The atlas file can be a PVRTC, PNG or any other format supported by Quads can be updated in runtime Quads can be added in runtime Quads can be removed in runtime Quads can be re-ordered in runtime The capacity can be increased or decreased in runtime OpenGL component: V3F, C4B, T2F. The quads are rendered using an OpenGL ES VBO. To render the quads using an interleaved vertex array list, you should modify the ccConfig.h file.
CCTextureCacheSingleton that handles the loading of textures Once the texture is loaded, the next time it will return a reference of the previously loaded texture reducing GPU & CPU memory.
CCTile
CCTiledGrid3D is a 3D grid implementation. It differs from in that the tiles can be separated from the grid.
CCTiledGrid3DActionBase class for actions.
CCTiledGrid3DActionState
CCTileMapAtlas is a subclass of .
CCTintByTints a that implements the NodeRGB protocol from current tint to a custom one.
CCTintByState
CCTintToTints a that implements the NodeRGB protocol from current tint to a custom one.
CCTintToState
CCTMXLayer represents the TMX layer.
CCTMXLayerAttrib
CCTMXLayerInfo contains the information about the layers like:
CCTMXMapInfo contains the information about the map like:
CCTMXObjectGroup represents the TMX object group.
CCTMXOrientation
CCTMXProperty
CCTMXTiledMap knows how to parse and render a TMX map.
CCTMXTileFlags
CCTMXTilesetInfo contains the information about the tilesets like:
CCToggleVisibilityToggles the visibility of a node.
CCToggleVisibilityState
CCTouch
CCTransitionCrossFade: Cross fades two scenes using the object.
CCTransitionFade: Fade out the outgoing scene and then fade in the incoming scene.'''.
CCTransitionFadeBL: Fade the tiles of the outgoing scene from the top-right corner to the bottom-left corner.
CCTransitionFadeDown: Fade the tiles of the outgoing scene from the top to the bottom.
CCTransitionFadeTR: Fade the tiles of the outgoing scene from the left-bottom corner the to top-right corner.
CCTransitionFadeUp: Fade the tiles of the outgoing scene from the bottom to the top.
CCTransitionFlipAngular: Flips the screen half horizontally and half vertically. The front face is the outgoing scene and the back face is the incoming scene.
CCTransitionFlipX: Flips the screen horizontally. The front face is the outgoing scene and the back face is the incoming scene.
CCTransitionFlipY: Flips the screen vertically. The front face is the outgoing scene and the back face is the incoming scene.
CCTransitionJumpZoom: Zoom out and jump the outgoing scene, and then jump and zoom in the incoming.
CCTransitionMoveInB: Move in from to the bottom the incoming scene.
CCTransitionMoveInL: Move in from to the left the incoming scene.
CCTransitionMoveInR: Move in from to the right the incoming scene.
CCTransitionMoveInT: Move in from to the top the incoming scene.
CCTransitionOrientation
CCTransitionPageTurnA transition which peels back the bottom right hand corner of a scene to transition to the scene beneath it simulating a page turn.
CCTransitionProgress
CCTransitionProgressHorizontal transition. A clock-wise radial transition to the next scene
CCTransitionProgressInOut
CCTransitionProgressOutIn
CCTransitionProgressRadialCCWTransitionRadialCCW transition. A counter clock-wise radial transition to the next scene
CCTransitionProgressRadialCWTransitionRadialCW transition. A counter clock-wise radial transition to the next scene
CCTransitionProgressVertical
CCTransitionRotoZoom: Rotate and zoom out the outgoing scene, and then rotate and zoom in the incoming.
CCTransitionSceneBase class for Transition scenes.
CCTransitionSceneOrientedA Transition that supports orientation like. Possible orientation: LeftOver, RightOver, UpOver, DownOver.
CCTransitionShrinkGrowShrink the outgoing scene while grow the incoming scene.
CCTransitionSlideInB: Slide in the incoming scene from the bottom border.
CCTransitionSlideInL: Slide in the incoming scene from the left border.
CCTransitionSlideInR: Slide in the incoming scene from the right border.
CCTransitionSlideInT: Slide in the incoming scene from the top border.
CCTransitionSplitCols: The odd columns goes upwards while the even columns goes downwards.
CCTransitionSplitRows: The odd rows goes to the left while the even rows goes to the right.
CCTransitionTurnOffTiles: Turn off the tiles of the outgoing scene in random order.
CCTransitionZoomFlipAngular: Flips the screen half horizontally and half vertically doing a little zooming out/in. The front face is the outgoing scene and the back face is the incoming scene.
CCTransitionZoomFlipX: Flips the screen horizontally doing a zoom out/in The front face is the outgoing scene and the back face is the incoming scene.
CCTransitionZoomFlipY: Flips the screen vertically doing a little zooming out/in The front face is the outgoing scene and the back face is the incoming scene.
CCTurnOffTiles action. Turn off the files in random order.
CCTurnOffTilesState
CCTwirl action.
CCTwirlState
CCUserDefault acts as a tiny database. You can save and get base type values by it. For example, setBoolForKey("played", true) will add a bool value true into the database. Its key is "played". You can get the value of the key by getBoolForKey("played").
CCV2F_C4B_T2Fa Point with a vertex point, a tex coord point and a color 4B
CCV2F_C4B_T2F_QuadA Quad of .
CCV2F_C4F_T2Fa Point with a vertex point, a tex coord point and a color 4F
CCV2F_C4F_T2F_Quad4 Vertex2FTex2FColor4F Quad
CCV3F_C4B_T2Fa Point with a vertex point, a tex coord point and a color 4B
CCV3F_C4B_T2F_Quad4 Vertex3FTex2FColor4B
CCVector2
CCVertex2FA vertex composed of 2 floats: x, y v3.0
CCVertex3FA vertex composed of 2 floats: x, y v3.0
CCVerticalTextAlignment
CCViewportRepresents an area of the render target that should be used when drawing.
CCViewportResolutionPolicy
CCWaves action.
CCWaves3D action.
CCWaves3DState
CCWavesState
CCWavesTiles3D action.
CCWavesTiles3DState
CCWindowRepresents a window in a game. Currently, there is only support for single-windowed applications.
ICCActionTweenDelegate
ICCBlendable
ICCFocusable
ICCIMEDelegate
ICCScriptingEngine
ICCTextContainer
ICCTextFieldDelegate
ICCTexture
ICCTransitionEaseScene
ICCUpdatable
OrientationExtension
PlistArray
PlistBoolean
PlistData
PlistDate
PlistDictionary
PlistDocument
PlistInteger
PlistNull
PlistObject<T>
PlistObjectBase
PlistReal
PlistString