This class is performing maze construction by a Room object array. It can keep the connection between rooms and each objects store the texture of each view.
Functions:
etc.
nil
- (id) initMap
Start to initialize the Maze object.
- (void) drawMap
Draw the view at current location.
- (void) goUp
Go up from current location.
- (void) goDown
Go down from current location.
- (void) goLeft
Turn left at the same room.
- (void) goRight
Turn right at the same room.
- (id) initMap
This method will generate all textures and assign to the corresponded views of each room. Moreover it also initialize the map status. such as direction of the character and current location.
Parameters:
nil
Returns:
self object reference.
- (void) drawMap
Perform the OpenGL drawing of the view of the current location and mini map.
Parameters:
nil
Returns:
nil
- (void) goUp
Update the current location Y = Y - 1.
Parameters:
nil
Returns:
nil
- (void) goDown
Update the current location Y = Y + 1.
Parameters:
nil
Returns:
nil
- (void) goLeft
Current location does not change but the direction will be turn anti-clockwise 90 degree.
Parameters:
nil
Returns:
nil
- (void) goRight
Current location does not change but the direction will be turn clockwise 90 degree.
Parameters:
nil
Returns:
nil
more method will be added later