All Data Structures Files Functions Variables Enumerations Enumerator Properties Defines
Public Member Functions | Static Public Member Functions | Protected Attributes | Properties
GameManager Class Reference

#import <GameManager.h>

Public Member Functions

(void) - loadLevelData
(void) - loadRandomLevel
(void) - runSceneWithID:
(void) - pauseGame
(void) - resumeGame
(void) - incrementSecondCounter
(void) - resetSecondCounter
(NSString *) - getGameTimeInMins
(int) - getGameTimeInSecs
(void) - setLevelDifficulty:

Static Public Member Functions

(GameManager *) + sharedGameManager

Protected Attributes

CCArray * levelData
Difficulty levelDifficulty

Properties

SceneTypes currentScene
LevelcurrentLevel
BOOL gamePaused
BOOL debug

Detailed Description

Definition at line 15 of file GameManager.h.


Member Function Documentation

- (NSString *) getGameTimeInMins

Converts the secondsPlayed into a string in the format mm:ss

Returns:
the formatted time string

Definition at line 274 of file GameManager.m.

Just returns the time played in seconds

Returns:
seconds played

Definition at line 283 of file GameManager.m.

Increments the second counter

Definition at line 256 of file GameManager.m.

- (void) loadLevelData

Loads the level data from the LevelData plist file

Definition at line 104 of file GameManager.m.

- (void) loadRandomLevel

Randomly selects a level with the difficulty chosen by the player

Definition at line 139 of file GameManager.m.

- (void) pauseGame

Pauses the running scene

Definition at line 236 of file GameManager.m.

Resets the second counter to 0

Definition at line 264 of file GameManager.m.

- (void) resumeGame

Resumes the running scene

Definition at line 245 of file GameManager.m.

- (void) runSceneWithID: (SceneTypes sceneID

Runs a specific scene from its ID

Parameters:
IDof the scene to run

Definition at line 165 of file GameManager.m.

- (void) setLevelDifficulty: (Difficulty _difficulty

Sets the difficulty of the current level

Definition at line 291 of file GameManager.m.

Returns the GameManager instance

Returns:
the instance

Definition at line 87 of file GameManager.m.


Field Documentation

- (CCArray*) levelData [protected]

Definition at line 18 of file GameManager.h.

- (Difficulty) levelDifficulty [protected]

Definition at line 19 of file GameManager.h.


Property Documentation

- (Level *) currentLevel [read, write, retain]

Definition at line 21 of file GameManager.h.

- (SceneTypes) currentScene [read, assign]

Definition at line 20 of file GameManager.h.

- (BOOL) debug [read, write, assign]

Definition at line 23 of file GameManager.h.

- (BOOL) gamePaused [read, write, assign]

Definition at line 22 of file GameManager.h.


The documentation for this class was generated from the following files: