home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / batman_cobble.swf / scripts / frame_21 / DoAction.as < prev   
Encoding:
Text File  |  2006-06-13  |  2.2 KB  |  85 lines

  1. _root.game.onEnterFrame = _global.cameraLogic3;
  2. _root.game.player.onEnterFrame = _global.playerLogic;
  3. _root.game.combo.onEnterFrame = _global.comboLogic;
  4. _root.game.respawn.onEnterFrame = _global.respawn2;
  5. _root.enemies = new Array();
  6. _root.eKills = 0;
  7. _root.respawned = 0;
  8. for(n in _root.game)
  9. {
  10.    if(n.substring(0,4) == "goon")
  11.    {
  12.       _root.enemies.push(_root.game[n]);
  13.       _root.game[n].onEnterFrame = _global.goonAI;
  14.       _root.game[n].state = "idle";
  15.       _root.game[n].health = 32;
  16.       _root.game[n].strength = 5;
  17.       _root.game[n].speed = 9;
  18.       _root.game[n].dir = 1;
  19.       _root.game[n].attackCount = 0;
  20.       _root.game[n].fallCount = 0;
  21.       _root.game[n].invincible = false;
  22.    }
  23.    if(n.substring(0,5) == "biker")
  24.    {
  25.       _root.game[n].onEnterFrame = _global.bikerAI;
  26.       _root.game[n].strength = 10;
  27.    }
  28.    if(n.substring(0,7) == "item_br")
  29.    {
  30.       _root.game[n].onEnterFrame = _global.itemLogic;
  31.    }
  32.    if(n.substring(0,3) == "can")
  33.    {
  34.       _root.game[n].onEnterFrame = _global.bgTouch;
  35.    }
  36.    if(n.substring(0,5) == "trash")
  37.    {
  38.       _root.game[n].onEnterFrame = _global.bgHit;
  39.    }
  40.    if(n.substring(0,7) == "mailbox")
  41.    {
  42.       _root.game[n].onEnterFrame = _global.bgHit;
  43.    }
  44. }
  45. stop();
  46. _root.gravity = 5;
  47. _root.globalGravity = 5;
  48. _root.FPS = 0;
  49. _root.fpsSet = false;
  50. _root.frameCount = 0;
  51. _root.gotoLast = "level1b";
  52. _root.camDelay = 0;
  53. _root.camHeight = 125;
  54. _root.camJump = 3;
  55. _root.camMin = -6220;
  56. _root.camMax = 600;
  57. _root.camZoom = 100;
  58. _root.camOffset = 0;
  59. _root.playerDx = 0;
  60. _root.playerDy = 0;
  61. _root.playerDir = -1;
  62. _root.playerSpeed = 19;
  63. _root.playerWalkSpeed = 6;
  64. _root.playerState = "fall";
  65. _root.playerJumping = true;
  66. _root.playerAttacking = false;
  67. _root.playerShooting = false;
  68. _root.playerSwinging = false;
  69. _root.playerLives = 3;
  70. _root.playerInvincible = false;
  71. _root.playerStrength = 10;
  72. _root.playerHeight = 75;
  73. _root.playerWidth = 50;
  74. if(_root.playerHealth == undefined || _root.playerHealth <= 0)
  75. {
  76.    _root.playerHealth = 100;
  77. }
  78. _root.weaponCount = 1000;
  79. _root.currentWeapon = "batarang";
  80. _root.comboMeter = false;
  81. _root.bgScroll = 6;
  82. _root.key_z = false;
  83. _root.key_x = false;
  84. _root.key_c = false;
  85.