home *** CD-ROM | disk | FTP | other *** search
- package game
- {
- import classes.components.FadeChannel;
- import flash.display.MovieClip;
- import flash.media.Sound;
- import flash.media.SoundChannel;
- import flash.media.SoundMixer;
- import flash.text.Font;
- import flash.text.TextField;
- import flash.ui.ContextMenu;
- import game.Guns.Gun;
- import game.Guns.HandGun;
- import game.Guns.MachineGun;
- import game.Guns.RocketGun;
- import game.panel.Dock;
- import game.panel.Mute;
- import game.panel.UpgradesPanel;
- import main.GameManager;
-
- public class ThisGameManager extends GameManager
- {
-
-
- internal var fadeMenu:FadeChannel;
-
- public var mute:Boolean = false;
-
- public var dock:Dock;
-
- public var hand_1:HandGun;
-
- public var hand_2:HandGun;
-
- internal var fadeGame:FadeChannel;
-
- public var dockk:Dock;
-
- public var fabrykaGier:logo_fabryka_cale;
-
- internal var menuChannel:SoundChannel;
-
- public var Bold:BudBird;
-
- public var prd:bojlerpreloader;
-
- public var Gamee:Sound;
-
- public var gameContainer:MovieClip;
-
- internal var gameChannel:SoundChannel;
-
- public var gunn1:MachineGun;
-
- public var gunn2:MachineGun;
-
- public var ammo:MovieClip;
-
- public var muttee:Mute;
-
- public var Menuu:Sound;
-
- public var player:Player;
-
- public var gun1:Gun;
-
- public var gun2:Gun;
-
- public var frontGround:MovieClip;
-
- public var femaleCounter:int = 0;
-
- public var goto_2Instructions:Button_Instructions;
-
- public var Ocra:Font;
-
- public var background:GameBackground;
-
- public var maleCounter:int = 0;
-
- public var goto_Instructions2:Button_Backs;
-
- public var ag_intro_02_02:MovieClip;
-
- public var guns:Array;
-
- public var inputTextt:TextField;
-
- public var bazooka_1:RocketGun;
-
- public var bazooka_2:RocketGun;
-
- public var tutorial:Boolean = true;
-
- public var gameDificulty:int = 0;
-
- public var freakyTiki:Logo_FrealyTiki;
-
- public var level:Level;
-
- public var gameMusicIsPlaying:Boolean = false;
-
- public var currentLevel:int = 1;
-
- public var soundManager:SoundManager;
-
- public var goto_Intro2:Button_SkipIntro;
-
- public var goto_2Intro_0:Button_Starteasy;
-
- public var goto_2Intro_1:Button_Startmedium;
-
- public var goto_2Intro_2:Button_Starthard;
-
- public var gameOver:Boolean;
-
- public function ThisGameManager()
- {
- mute = false;
- gameMusicIsPlaying = false;
- player = new Player();
- Bold = new BudBird();
- Ocra = new Font2();
- tutorial = true;
- maleCounter = 0;
- femaleCounter = 0;
- gameChannel = new SoundChannel();
- fadeMenu = new FadeChannel();
- fadeGame = new FadeChannel();
- currentLevel = 1;
- gameDificulty = 0;
- guns = [null,null,null,null,null,null];
- addFrameScript(0,frame1,18,frame19,33,frame34,103,frame104,124,frame125,165,frame166,188,frame189,221,frame222,230,frame231,239,frame240,262,frame263,275,frame276,295,frame296,296,frame297,317,frame318,330,frame331,336,frame337,361,frame362,407,frame408,408,frame409,420,frame421,433,frame434,460,frame461,462,frame463,470,frame471);
- this.tabEnabled = false;
- this.tabChildren = false;
- this.contextMenu = new ContextMenu();
- this.contextMenu.hideBuiltInItems();
- super();
- }
-
- public static function getInstance() : ThisGameManager
- {
- if(instance == null)
- {
- }
- return instance as ThisGameManager;
- }
-
- public function gameMusicStop() : void
- {
- if(gameChannel != null)
- {
- gameChannel.stop();
- }
- }
-
- internal function frame276() : *
- {
- this.menuMusicStop();
- this.gameMusicStart();
- }
-
- internal function frame166() : *
- {
- stop();
- buttonsOn();
- }
-
- internal function frame297() : *
- {
- if(mute)
- {
- SoundMixer.stopAll();
- }
- }
-
- internal function frame1() : *
- {
- this.stop();
- }
-
- internal function frame296() : *
- {
- this.stop();
- buttonsOn();
- }
-
- internal function frame189() : *
- {
- if(mute)
- {
- SoundMixer.stopAll();
- }
- }
-
- internal function frame19() : *
- {
- this.stop();
- }
-
- internal function frame34() : *
- {
- this.afterCrapAction();
- }
-
- internal function frame409() : *
- {
- this.stop();
- }
-
- internal function frame408() : *
- {
- if(gameOver)
- {
- gotoAndPlay(currentFrame + 2);
- }
- }
-
- public function gameMusicStart() : void
- {
- gameMusicIsPlaying = true;
- if(!mute)
- {
- gameChannel = Gamee.play(1,int.MAX_VALUE);
- }
- else
- {
- gameChannel = null;
- }
- }
-
- public function showUpgradePanel() : void
- {
- this.addChild(new UpgradesPanel());
- }
-
- internal function frame421() : *
- {
- if(!gameOver)
- {
- level.setLevel(currentLevel);
- if(currentLevel % 2 == 1)
- {
- gotoAndPlay("2nextLevel");
- }
- else
- {
- gotoAndPlay("2nextRound");
- }
- }
- else
- {
- gotoAndStop("2winOver");
- }
- }
-
- internal function frame318() : *
- {
- newLevel();
- }
-
- internal function frame434() : *
- {
- this.stop();
- }
-
- public function menuMusicStop() : void
- {
- if(menuChannel != null)
- {
- menuChannel.stop();
- menuChannel = null;
- }
- }
-
- internal function frame463() : *
- {
- this.gameMusicStop();
- currentLevel = 0;
- player = new Player();
- }
-
- internal function frame331() : *
- {
- level.setLevel(currentLevel);
- }
-
- internal function frame104() : *
- {
- this.menuMusicStart();
- }
-
- internal function frame461() : *
- {
- gotoAndPlay("blenda2Loop");
- }
-
- internal function frame337() : *
- {
- this.stop();
- buttonsOn();
- }
-
- internal function frame471() : *
- {
- this.menuMusicStart();
- gotoAndPlay("Loop");
- }
-
- internal function frame231() : *
- {
- if(mute)
- {
- SoundMixer.stopAll();
- }
- }
-
- internal function frame222() : *
- {
- this.stop();
- buttonsOn();
- }
-
- internal function frame240() : *
- {
- this.gotoAndPlay("Loop");
- }
-
- internal function frame362() : *
- {
- this.stop();
- level.start();
- }
-
- internal function frame125() : *
- {
- if(mute)
- {
- SoundMixer.stopAll();
- }
- }
-
- private function afterCrapAction() : void
- {
- Menuu = new menuMusic();
- Gamee = new gameMusic();
- soundManager = new SoundManager();
- }
-
- private function newLevel() : void
- {
- level = new Level();
- }
-
- internal function frame263() : *
- {
- if(mute)
- {
- SoundMixer.stopAll();
- }
- }
-
- public function menuMusicStart() : void
- {
- gameMusicIsPlaying = false;
- if(menuChannel == null && !mute)
- {
- menuChannel = Menuu.play(1,int.MAX_VALUE);
- }
- }
- }
- }
-