All Data Structures Files Functions Variables Enumerations Enumerator Properties Defines
/Projects/Cogito/src/Objects/Route.m
Go to the documentation of this file.
00001 //
00002 //  Route.m
00003 //  Author: Thomas Taylor
00004 //
00005 //  Contains data about a specific route
00006 //
00007 //  18/02/2012: Created class
00008 //
00009 
00010 #import "Route.h"
00011 
00012 @implementation Route
00013 
00014 @synthesize survived;
00015 
00016 #pragma mark -
00017 #pragma mark Memory Allocation
00018 
00022 -(void)dealloc
00023 {
00024     [nodes release];
00025     [super dealloc];
00026 }
00027 
00028 #pragma mark -
00029 #pragma mark Initialisation
00030 
00035 -(id)init
00036 {    
00037     self = [super init];
00038     
00039     if (self != nil) 
00040     {
00041         survived = NO;
00042         nodes = [[CCArray alloc] init];
00043     }
00044     return self;
00045 }
00046 
00047 #pragma mark -
00048 
00053 -(void)addState:(State*)_state withAction:(Action)_action
00054 {
00055     //CCLOG(@"%@.addState: %@ withAction: %@", NSStringFromClass([self class]), [Utils getObjectAsString:[_state getGameObject].gameObjectType], [Utils getActionAsString:_action]);
00056     [nodes addObject:[NSMutableArray arrayWithObjects:_state, [NSNumber numberWithInt:_action], nil]];
00057 }
00058 
00063 -(CCArray*)getNodes
00064 {    
00065     return nodes;
00066 }
00067 
00068 
00069 @end