editor and game improvements

- (editor) entities can be rotated
- (editor) asteroids get a random angular velocity
- (editor) level title and author can be specified
- (editor) editor can only be quit when clicking the 'X' button
- (game) smaller asteroids have similar velocities as the previous bigger ones
This commit is contained in:
2011-02-12 15:43:06 +01:00
parent 42d40befcd
commit 57ea0596b8
13 changed files with 192 additions and 17 deletions
+14
View File
@@ -41,6 +41,18 @@ class Model : public Engine::ModelBase {
mLevelName = name;
}
std::string GetLevelAuthor() { return mLevelAuthor; };
void SetLevelAuthor(const std::string &author) {
Engine::LogMessage("new level author: %s", author.c_str());
mLevelAuthor = author;
}
std::string GetLevelTitle() { return mLevelTitle; };
void SetLevelTitle(const std::string &title) {
Engine::LogMessage("new level title: %s", title.c_str());
mLevelTitle = title;
}
/* Highscore */
struct HighscoreEntry {
HighscoreEntry(): name ("unknown"), points (0) { };
@@ -85,6 +97,8 @@ class Model : public Engine::ModelBase {
std::string mPlayerName;
std::vector<std::string> mLevelList;
std::string mLevelName;
std::string mLevelAuthor;
std::string mLevelTitle;
virtual bool OnReceiveEvent (const Engine::EventBasePtr &event);