Public Member Functions | Static Public Member Functions | Protected Attributes | Properties

GameObjects Class Reference

Contains all moving game objects which can be given a Path. More...

#import <GameObjects.h>

List of all members.

Public Member Functions

(id) - init
 initializes class and returns an instance of the class, you must take care of allocating the object yourself
(MovingObject *) - getObjectAtLocation:
 Returns the MovingObject at the location, taking into account the object collisionRadius.
(void) - dealloc [implementation]
(void) - initSpawnLocations [implementation]
(void) - update: [implementation]
(void) - increaseSpawnInterval [implementation]
(void) - createObjectAt: [implementation]
(void) - spawnObject [implementation]
(void) - crashDetectedBetweenObject:andObject: [implementation]
 two objects have crashed, do what's necessary to stop the game
(void) - collisionTest [implementation]
 checks all MovingObject for proximity to and collision with each other
(bool) - isPositionCollisionFree:collisionRadius: [implementation]
 check if the given point is free of collisions with other objects in the given radius
(void) - updateObjectSpawn: [implementation]

Static Public Member Functions

(id) + objects
 initializes class and returns an autoreleased instance of the class

Protected Attributes

int spawnUpdateCount
int spawnInterval
unsigned int lastSpawnLocationIndex
NSMutableArray * spawnLocations

Properties

IncomingMarkermarker

Detailed Description

Contains all moving game objects which can be given a Path.

Determines if touch was on a MovingObject and if so, returns that object. Updates each MovingObject, schedules collision checks via ObjectCollisionTest and spawning of new objects via ObjectSpawn. Moving objects are drawn just above GamePaths and below the GameUI.


Member Function Documentation

- (void) collisionTest   [implementation]

checks all MovingObject for proximity to and collision with each other

- (void) crashDetectedBetweenObject: (MovingObject*)  crashor
andObject: (MovingObject*)  crashee 
[implementation]

two objects have crashed, do what's necessary to stop the game

- (void) createObjectAt: (CGPoint)  spawnLocation   [implementation]
- (void) dealloc   [implementation]
- (MovingObject *) getObjectAtLocation: (CGPoint)  location  

Returns the MovingObject at the location, taking into account the object collisionRadius.

get the object at a specific screen location, usually used to find which object was touched

Returns nil if no object is in the vicinity of the location.

- (void) increaseSpawnInterval   [implementation]
- (id) init  

initializes class and returns an instance of the class, you must take care of allocating the object yourself

- (void) initSpawnLocations   [implementation]
- (bool) isPositionCollisionFree: (CGPoint)  point
collisionRadius: (float)  radius 
[implementation]

check if the given point is free of collisions with other objects in the given radius

+ (id) objects  

initializes class and returns an autoreleased instance of the class

- (void) spawnObject   [implementation]
- (void) update: (ccTime)  delta   [implementation]
- (void) updateObjectSpawn: (ccTime)  delta   [implementation]

Member Data Documentation

- (unsigned int) lastSpawnLocationIndex [protected]
- (int) spawnInterval [protected]
- (NSMutableArray*) spawnLocations [protected]
- (int) spawnUpdateCount [protected]

Property Documentation

- (IncomingMarker *) marker [read, write, retain]

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Enumerations Enumerator Properties