home *** CD-ROM | disk | FTP | other *** search
- function resetGame()
- {
- trace("called");
- _root.EMS = startEMS;
- _root.score = 0;
- _root.totalScore = 0;
- _root.vars.enemyAmount = 1;
- _root.vars.enemySpeed = 3;
- _root.vars.enemiesKilled = 0;
- _root.vars.maxCombo = 0;
- _root.vars.scoreSquasher = 1;
- _root.gotoAndStop("game");
- }
- _root.kongregateScores.submit(_root.totalScore);
- _root.kongregateStats.submit("HighScore",_root.totalScore);
- _root.kongregateStats.submit("GameComplete",1);
- _root.kongregateStats.submit("BestCombo",_root.vars.maxCombo);
- _root.kongregateStats.submit("MostKills",_root.vars.enemiesKilled);
- var keyListener_obj = new Object();
- keyListener_obj.onKeyDown = function()
- {
- var _loc0_ = null;
- if((_loc0_ = Key.getCode()) === 82)
- {
- resetGame();
- Key.removeListener(keyListener_obj);
- }
- };
- Key.addListener(keyListener_obj);
- trace(_root.totalScore);
- restart_btn.onRelease = function()
- {
- resetGame();
- };
-