/* * MyData.h * Hello2 * * Created by Hackenslacker on Mon Apr 05 2004. * Copyright (c) 2004 __MyCompanyName__. All rights reserved. * */ #ifndef GAMEDATA_H #define GAMEDATA_H #include class GameData { WindowRef gameWindow; // The window the whole deal happens in. Rect windowSize; // Size of the window (easier than calling GetWindowPortBounds). // Chars for all the keys being paid attention to: char thrust, turnLeft, turnRight, fire; // Bools for whether a key is being held: bool thrusting, turningLeft, turningRight, firing; bool GameOn; // Are we currently playing: public: GameData(); // Default constructor. Sets data members to defaults. // Data Member 'set' functions. // Set the appropriate data member to the value passed in. void setGameWindowRef(WindowRef&); void setWindowSize(Rect&); // Data Member 'get' functions. // Return the appropriate data member. WindowRef getGameWindowRef(); // KeyDown/keyUp functions. // Set appropriate bools if a thrust or turn key was pressed. void keyDown(char&); void keyUp(char&); }; #endif