CCApplication
CCApplication
Cocos2DInheritance: System.Object
Constructors
CCApplication(Game, IGraphicsDeviceService)
CCApplication(Game, IGraphicsDeviceService)(Microsoft.Xna.Framework.Game game, Microsoft.Xna.Framework.Graphics.IGraphicsDeviceService service)
Parameters:
game
(Microsoft.Xna.Framework.Game)service
(Microsoft.Xna.Framework.Graphics.IGraphicsDeviceService)Fields
Properties
Callback by CCDirector for limit FPS
This returns the shared CCContentManager.
Get current applicaiton instance.
Override and set to true if you want to use CCInputState to manage the input to the application. This will give you access to the gesture state of the app.
Methods
ApplicationDidEnterBackground()
ApplicationDidEnterBackground()()
Called when the game enters the background. This happens when the 'windows' button is pressed on a WP phone. On Android, it happens when the device is ide or the power button is pressed.
Example
ApplicationDidFinishLaunching()
System.Boolean ApplicationDidFinishLaunching()()
Implement CCDirector and CCScene init code here.
Returns:
System.Boolean
- return true Initialize success, app continue. return false Initialize failed, app terminate.Example
ApplicationWillEnterForeground()
ApplicationWillEnterForeground()()
Called when the game returns to the foreground, such as when the game is launched after being paused.
Example
ClearTouches()
ClearTouches()()
Draw(GameTime)
Draw(GameTime)(Microsoft.Xna.Framework.GameTime gameTime)
Parameters:
gameTime
(Microsoft.Xna.Framework.GameTime)Example
InitInstance()
System.Boolean InitInstance()()
Implement for initialize OpenGL instance, set source path, etc...
Returns:
System.Boolean
Example
Initialize()
Initialize()()
Example
LoadContent()
LoadContent()()
Loads the content for the game and then calls ApplicationDidFinishLaunching.
Example
Update(GameTime)
Update(GameTime)(Microsoft.Xna.Framework.GameTime gameTime)
Allows the game component to update itself.
Parameters:
gameTime
(Microsoft.Xna.Framework.GameTime) - Provides a snapshot of timing values.Example