STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
228086
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2561 · P5121

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/42492977?noj=FRM42492977-3DC" width="1" height="1"></div>

dogfight-aces.swf

This is the info page for
Flash #208248

(Click the ID number above for more basic data on this flash file.)


ActionScript [AS1/AS2]
Combined Code
// unknown tag 88 length 212 movieClip 4 S_SCREEN { } movieClip 6 S_INTRO { frame 1 { stop(); } frame 2 { function Init(idx) { mcs_arr = new Array(); mct_arr = new Array(); mcs_rot_arr = new Array(); mct_rot_arr = new Array(); i = 0; while (i < C_ARR.length) { var v2; mcs_rot_arr[i] = -0.5 * C_ROT_MAX_STEP + 2 * C_ROT_MAX_STEP * Math.random(); v2 = this.attachMovie(C_ARR[i][0], C_ARR[i][0] + this.getNextHighestDepth(), this.getNextHighestDepth()); v2._x = 370 + 60 * Math.random(); v2._y = 195 + 60 * Math.random(); v2._alpha = 0; mc1._xscale = 70; mc1._yscale = 70; mcs_arr.push(v2); mct_rot_arr[i] = -0.5 * C_ROT_MAX_STEP + 2 * C_ROT_MAX_STEP * Math.random(); v2 = this.attachMovie('S_STORY_TXT', 'S_STORY_TXT' + this.getNextHighestDepth(), this.getNextHighestDepth()); v2.txt.text = C_ARR[i][1]; v2.txt.autoSize = true; v2._x = 385 + 30 * Math.random(); v2._y = 465 + 30 * Math.random() - v2.txt._height / 2; v2._alpha = 0; mcs_rot_arr[i] = -0.5 * C_ROT_MAX_STEP + 2 * C_ROT_MAX_STEP * Math.random(); mc1._xscale = 70; mc1._yscale = 70; mct_arr.push(v2); ++i; } mc1 = mcs_arr[idx]; mc2 = undefined; mct1 = mct_arr[idx]; mct2 = undefined; InitInterval(); } function InitInterval() { intervalId = setInterval(changePic, C_CHANGE_INTERVAL); this.onEnterFrame = Update; } function Update() { if (mc1._alpha < 100) { mc1._alpha += C_FADEIN_STEP; } if (mc2._alpha > 0) { mc2._alpha -= C_FADEOUT_STEP; } if (mct1._alpha < 100) { mct1._alpha += C_FADEIN_STEP; } if (mct2._alpha > 0) { mct2._alpha -= C_FADEOUT_STEP; } mc1._xscale += C_SCALE_STEP; mc1._yscale += C_SCALE_STEP; mc1._xscale += C_SCALE_STEP; mc1._yscale += C_SCALE_STEP; mc1._rotation = mcs_rot_arr[curIdx]; mc2._rotation = mcs_rot_arr[prevIdx]; mct1._xscale += C_SCALE_STEP; mct1._yscale += C_SCALE_STEP; mct1._xscale += C_SCALE_STEP; mct1._yscale += C_SCALE_STEP; mct1._rotation = mct_rot_arr[curIdx]; mct2._rotation = mct_rot_arr[prevIdx]; } function changePic() { prevIdx = curIdx; ++curIdx; len = C_ARR.length; if (curIdx >= len) { clearInterval(intervalId); par.gotoAndStop('F_END'); } mc2 = mc1; mc1 = mcs_arr[curIdx]; mct2 = mct1; mct1 = mct_arr[curIdx]; } function Finish() { clearInterval(intervalId); this.gotoAndStop('F_END'); } this.stop(); var C_ARR = [['S_STORY_PIC_01', 'After the first World War'], ['S_STORY_PIC_02', 'when once majestic airplanes'], ['S_STORY_PIC_03', 'turned to scrap'], ['S_STORY_PIC_04', 'and the heroes of the skies'], ['S_STORY_PIC_05', 'were forgotten'], ['S_STORY_PIC_06', 'a secret dogfight tournament was founded'], ['S_STORY_PIC_07', 'as a tribute\n to the brave pilots\nand their machines.'], ['S_STORY_PIC_08', 'Equipped with hi-tech weapons'], ['S_STORY_PIC_09', 'the aces compete in the name of honor'], ['S_STORY_PIC_10', 'to prove who is\nthe \'ACE OF ACES\''], ['S_STORY_PIC_11', 'WHO WILL BE THE LAST STANDING?'], ['xx', 'IS IT YOU?'], ['xx', 'FACE\n THE CHALLENGE!']]; var mcs_arr; var mcs_rot_arr; var mct_arr; var mct_rot_arr; var i; var C_FADEIN_STEP = 0.9; var C_FADEOUT_STEP = 2.5; var C_ROT_MAX_STEP = 2.5; var mc1; var mc2; var mct1; var mct2; var par = this; var C_CHANGE_INTERVAL = 3600; var C_SCALE_STEP = 0.03; var intervalId; var curIdx = 0; var prevIdx = undefined; var maxIdx = C_ARR.length - 1; Init(curIdx); this.stop(); } frame 2 { } frame 2 { } frame 3 { Finish(); stop(); } } movieClip 8 S_BLANK_RECT { } movieClip 10 S_SKY_SUNSET_2 { } movieClip 12 S_SKY_SUNRISE_2 { } movieClip 14 S_SKY_NIGHT_2 { } movieClip 16 S_BKG_BOTTOM_MASK { } movieClip 19 S_BKG_BOTTOM_BMP { } movieClip 20 S_BKG_BOTTOM_FIELD { } movieClip 22 S_HEALTH_BAR_FILL { } movieClip 25 S_HEALTH_BAR { } movieClip 29 S_HGLD_TUTORIAL_SCORE { } movieClip 32 S_SKY_SUNSET_BKG { } movieClip 35 S_SKY_SUNRISE_BKG { } movieClip 38 S_SKY_NIGHT_BKG { } movieClip 41 S_SKY_GREY_BKG { } movieClip 44 S_SKY_BLUE_BKG { } movieClip 54 S_PLANE_FOKKER_LEFT_old { frame 8 { gotoAndPlay('F_begin'); } frame 24 { gotoAndPlay('F_screwcutter'); } } movieClip 61 S_PLANE_AIRSCREW { } movieClip 62 S_HANGING_PROPELLER { } movieClip 64 S_INFO_TABLE_FRAME { frame 1 { stop(); } } // unknown tag 88 length 78 movieClip 69 S_TUT_MASK_2 { } movieClip 80 S_PLANE_HENRIOT_LEFT_TUT { frame 8 { gotoAndPlay('F_begin'); } frame 24 { gotoAndPlay('F_screwcutter'); } } // unknown tag 88 length 212 movieClip 85 S_TACHO_RUCICKA { } movieClip 87 S_BONUS_PARACHUTE_TUT { } movieClip 89 S_PLANE_GHOST { } movieClip 92 S_BULLET_TUT { } movieClip 95 { frame 35 { stop(); } } movieClip 97 S_TUT_GOOD_BONUS_AFTERBURNER { } movieClip 98 S_INFO_BONUS_AFTERBURNER { frame 1 { stop(); } } movieClip 99 S_TRANSITION_FADER { } movieClip 101 S_PLANE_CAMEL_LEFT_STATIC { frame 1 { airscrew.stop(); } } movieClip 105 S_DMG_INDICATOR { frame 1 { stop(); } frame 41 { gotoAndPlay('F_blink'); } } movieClip 114 S_BONUS_PARACHUTE { frame 1 { stop(); } frame 7 { gotoAndPlay('F_fall'); } } movieClip 116 S_MOUSE { } movieClip 123 S_GROUP_FLAG { frame 1 { this._visible = false; stop(); } frame 2 { this._visible = true; play(); } frame 10 { gotoAndPlay('F_begin'); } } movieClip 136 S_PLANE_SPAD_7_LEFT { frame 1 { stop(); } frame 16 { gotoAndStop('F_begin'); } } movieClip 149 S_PLANE_HENRIOT_LEFT { frame 1 { stop(); } frame 16 { gotoAndStop('F_begin'); } } movieClip 162 S_PLANE_FOKKER_LEFT { frame 1 { stop(); } frame 16 { gotoAndStop('F_begin'); } } movieClip 167 S_LOADING_RIBBON { } movieClip 169 S_PLANE_SPAD_7_LEFT_PRELOAD { } movieClip 170 S_PRELOAD_PLANE { } movieClip 171 S_LOADING_RIBBON_ANIM { frame 1 { gotoAndPlay(Math.round(13 * Math.random())); } } movieClip 174 S_SKY_CLOUD_5 { } movieClip 177 S_SKY_CLOUD_4 { } movieClip 180 S_SKY_CLOUD_3 { } movieClip 183 S_SKY_CLOUD_2 { } movieClip 186 S_SKY_CLOUD_1 { } movieClip 188 S_SKY_old { } movieClip 189 S_PRELOADER_SKY { frame 1 { function RandomPosAll() { var v3; var v2; v3 = 1; while (v3 < 10) { v2 = this['o' + v3]; v2._x = 800 * Math.random(); v2._y = 300 + 300 * Math.random(); v2._xscale = 70 + 30 * Math.random(); v2._yscale = 70 + 30 * Math.random(); ++v3; } } var i; var c; RandomPosAll(); this.onEnterFrame = function () { i = 1; while (i < 10) { c = this['o' + i]; c._x += i * 0.5; if (c._x > 800 + c._width * 0.8) { c._x = -1 * c._width * 0.8; c._y = 300 + 300 * Math.random(); } ++i; } }; } } movieClip 191 { } movieClip 203 S_TREMOR_LOGO { frame 1 { stop(); } } movieClip 204 S_PRELOADER { frame 1 { function ShowPlayBtn() { playBtn._visible = true; playBtn.onPress = function () { _root.gotoAndStop('F_INIT_BEGIN'); }; } var C_ENABLE_ADS = true; tremorLogo.onPress = function () { var v1; v1 = com.tremorgames.TremorGames.GetTrackingURL('Loading Screen Game Logo'); getURL(v1, '_blank'); }; var total; var loaded; var planeribMinX = 90; var planeribMaxX = 600; ribplane._x = planeribMinX; var loadRatio; playBtn._visible = false; adBox._visible = false; if (C_ENABLE_ADS) { adBox._visible = true; var CPMStarPoolID = 21495; var CPMStarSubPoolID = 1014; System.security.allowDomain('server.cpmstar.com'); adBox.loadMovie('http://server.cpmstar.com/adviewas2.swf?poolid=' + CPMStarPoolID + '&subpoolid=' + CPMStarSubPoolID); } this.onEnterFrame = function () { total = _root.getBytesTotal(); loaded = _root.getBytesLoaded(); loadRatio = loaded / total; ribplane._x = planeribMaxX - (planeribMaxX - planeribMinX) * loadRatio; if (Math.random() < 0.2) { ribplane._y = ribplane._y + 1 - 2 * Math.random(); } ribplane.ribbon.perc = Math.round(loadRatio * 100) + '%'; if (loaded >= total) { if (C_ENABLE_ADS) { stop(); delete onEnterFrame; onEnterFrame = undefined; ShowPlayBtn(); } else { delete onEnterFrame; onEnterFrame = undefined; _root.gotoAndStop('F_INIT_BEGIN'); } } }; stop(); } } movieClip 206 S_SKY_BLUE { } movieClip 210 { } movieClip 211 { } movieClip 216 { } movieClip 217 GamesChart-AS2 { #initclip Object.registerClass('GamesChart-AS2', GCComponent); #endinitclip frame 1 { stop(); } } frame 1 { function __com_mochibot__(swfid, mc, lv, trk) { var x; var g; var s; var fv; var sb; var u; var res; var mb; var mbc; var pv; mb = '__mochibot__'; mbc = 'mochibot.com'; g = _global ? _global : _level0._root; if (g[mb + swfid]) { return g[mb + swfid]; } s = System.security; x = mc._root.getSWFVersion; fv = x ? mc.getSWFVersion() : (_global ? 6 : 5); if (!s) { s = {}; } sb = s.sandboxType; if (sb == 'localWithFile') { return null; } x = s.allowDomain; if (x) { s.allowDomain(mbc); } x = s.allowInsecureDomain; if (x) { s.allowInsecureDomain(mbc); } pv = (fv == 5) ? /:$version : System.capabilities.version; u = 'http://' + mbc + '/my/core.swf?mv=8&fv=' + fv + '&v=' + escape(pv) + '&swfid=' + escape(swfid) + '&l=' + lv + '&f=' + mc + (sb ? '&sb=' + sb : '') + (trk ? '&t=1' : ''); lv = fv > 6 ? mc.getNextHighestDepth() : (g[mb + 'level'] ? g[mb + 'level'] + 1 : lv); g[mb + 'level'] = lv; if (fv == 5) { res = '_level' + lv; if (!eval(res)) { loadMovieNum(u, lv); } return res; } res = mc.createEmptyMovieClip(mb + swfid, lv); res.loadMovie(u); return res; } C_MOCHIBOT_ENABLED = true; if (C_MOCHIBOT_ENABLED) { __com_mochibot__('4146eaa9', this, 10301, true); } } frame 1 { com.tremorgames.TremorGames.Init(33, 4663, 'Dogfight Aces', 'hj76gy', 'http://www.tremorgames.com'); } movieClip 1670 __Packages.com.tremorgames.TremorGames { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.tremorgames) { _global.com.tremorgames = new Object(); } if (!_global.com.tremorgames.TremorGames) { var v1 = function () {}; com.tremorgames.TremorGames = v1; var v2 = v1.prototype; v1.Init = function (gameid, websitegameid, gamename, key, sponsorurl) { com.tremorgames.TremorGames.DefaultNetwokList = new Array('www.tremorgames.com', 'www.tremolearns.com', 'www.tremorkids.com', 'www.tremorx.com', 'www.tremorgems.com', 'www.backspacegames.com', 'www.tremorgirls.com', 'www.tremorracing.com'); com.tremorgames.TremorGames.SponsorURL = sponsorurl; com.tremorgames.TremorGames.GameID = gameid; com.tremorgames.TremorGames.WebsiteGameID = websitegameid; com.tremorgames.TremorGames.Key = key; com.tremorgames.TremorGames.GameName = gamename; com.tremorgames.TremorGames.GameNameFriendly = ((com.tremorgames.TremorGames.GameName.toLowerCase()).split(' ')).join('-'); if (com.tremorgames.TremorGames.GetIndexOf(com.tremorgames.TremorGames.DefaultNetwokList, com.tremorgames.TremorGames.GetDomainName()) >= 0) { com.tremorgames.TremorGames.GameInTremorNetwork = true; } else { com.tremorgames.TremorGames.GameInTremorNetwork = false; } if (com.tremorgames.TremorGames.IsGameInTremorNetwork()) { com.tremorgames.TremorGames.PlayerName = _root.PlayerName; if (com.tremorgames.TremorGames.isNumeric(_root.coins)) { com.tremorgames.TremorGames.Coins = _root.coins; } else { com.tremorgames.TremorGames.Coins = 0; } if (com.tremorgames.TremorGames.PlayerName == null || com.tremorgames.TremorGames.PlayerName == '' || com.tremorgames.TremorGames.PlayerName == 'undefined') { com.tremorgames.TremorGames.PlayerName = ''; com.tremorgames.TremorGames.LoggedIn = false; } else { com.tremorgames.TremorGames.LoggedIn = true; } } }; v1.IsGameInTremorNetwork = function () { return com.tremorgames.TremorGames.GameInTremorNetwork; }; v1.isNumeric = function (num) { return !isNaN(parseInt(num)); }; v1.IsLoggedIn = function () { return com.tremorgames.TremorGames.LoggedIn; }; v1.PostScore = function (playername, score) { var v2; if (com.tremorgames.TremorGames.IsLoggedIn()) { v2 = 'http://' + com.tremorgames.TremorGames.GetDomainName() + '/submitscore.php'; } else { v2 = com.tremorgames.TremorGames.SponsorURL + '/submitscore.php?utm_source=SponsoredGames&utm_medium=FlashGames&utm_term=' + com.tremorgames.TremorGames.GetDomainName() + '&utm_content=SubmitScore&utm_campaign=' + com.tremorgames.TremorGames.GameName; } var v4 = new com.tremorgames.md5(); var v1 = new LoadVars(); v1.PlayerName = playername; v1.Score = score; v1.GameID = com.tremorgames.TremorGames.GameID; v1.Website = com.tremorgames.TremorGames.GetDomainName(); v1.Key = v4.hash(playername + com.tremorgames.TremorGames.Key + score); var v3 = new LoadVars(); v3.onLoad = function (success) { if (success) { } else {} }; if (com.tremorgames.TremorGames.IsLoggedIn()) { v1.sendAndLoad(v2, v3, 'POST'); flash.external.ExternalInterface.call('onMemberScoreSubmitted', score); } else { v1.send(v2, '_blank', 'POST'); } }; v1.DisplayProgress = function (StatName, StatValue) { if (com.tremorgames.TremorGames.IsLoggedIn()) { try { flash.external.ExternalInterface.call('setStatValue', StatName, StatValue); } if (Error(storedv0) != null) { var er = Error(storedv0); } else { throw storedv0; } } }; v1.PostStat = function (StatName, StatValue) { if (com.tremorgames.TremorGames.IsGameInTremorNetwork()) { flash.external.ExternalInterface.call('setStatValue', StatName, StatValue); } if (com.tremorgames.TremorGames.IsLoggedIn()) { var v3 = new com.tremorgames.md5(); var v1 = new LoadVars(); v1.Key = v3.hash(com.tremorgames.TremorGames.PlayerName + com.tremorgames.TremorGames.Key + StatValue); v1.GameID = com.tremorgames.TremorGames.GameID; v1.StatName = StatName; v1.PlayerName = com.tremorgames.TremorGames.PlayerName; v1.StatValue = StatValue; var v2 = new LoadVars(); v2.onLoad = function (success) { if (success) { } else {} }; v1.sendAndLoad('http://' + com.tremorgames.TremorGames.GetDomainName() + '/achievements/record_stats.php', v2, 'POST'); } }; v1.GetPlayerName = function () { return com.tremorgames.TremorGames.PlayerName; }; v1.GetPlayerCoins = function () { return com.tremorgames.TremorGames.Coins; }; v1.GetDomainName = function () { if (com.tremorgames.TremorGames.DomainName == '') { var v1 = new LocalConnection(); com.tremorgames.TremorGames.DomainName = v1.domain(); } return com.tremorgames.TremorGames.DomainName; }; v1.GetTrackingURL = function (LinkName) { if ('http://' + com.tremorgames.TremorGames.GetDomainName() == com.tremorgames.TremorGames.SponsorURL) { return com.tremorgames.TremorGames.SponsorURL; } else { return com.tremorgames.TremorGames.SponsorURL + '/?utm_source=SponsoredGames&utm_medium=FlashGames&utm_term=' + com.tremorgames.TremorGames.GetDomainName() + '&utm_content=' + escape(LinkName) + '&utm_campaign=' + escape(com.tremorgames.TremorGames.GameName); } }; v1.HostThisGameURL = function () { return com.tremorgames.TremorGames.SponsorURL + '/index.php?action=gamesforsite&gameid=' + com.tremorgames.TremorGames.WebsiteGameID + '&utm_source=SponsoredGames&utm_medium=FlashGame&utm_term=' + com.tremorgames.TremorGames.GetDomainName() + '&utm_content=' + escape('HostThisGame') + '&utm_campaign=' + escape(com.tremorgames.TremorGames.GameName); }; v1.GetGameURL = function () { if (com.tremorgames.TremorGames.GameNameFriendly == '') { com.tremorgames.TremorGames.GameNameFriendly = ((com.tremorgames.TremorGames.GameName.toLowerCase()).split(' ')).join('-'); } return com.tremorgames.TremorGames.SponsorURL + '/playgame/' + com.tremorgames.TremorGames.WebsiteGameID + '/' + com.tremorgames.TremorGames.GameNameFriendly + '.html/' + '?utm_source=SponsoredGames&utm_medium=FlashGame&utm_term=' + com.tremorgames.TremorGames.GetDomainName() + '&utm_content=' + escape('Achievements') + '&utm_campaign=' + escape(com.tremorgames.TremorGames.GameName); }; v1.GetIndexOf = function (arr, data) { var v1 = 0; while (v1 < arr.length) { if (arr[v1] == data) { return v1; } ++v1; } return -1; }; v1.GetPlayerItems = function (onGetItemsCallback) { com.tremorgames.TremorGames.GetItemsCallback = onGetItemsCallback; if (!com.tremorgames.TremorGames.IsGameInTremorNetwork()) { com.tremorgames.TremorGames.GetItemsCallback(null); return false; } var v2 = new LoadVars(); v2.GameID = com.tremorgames.TremorGames.GameID; var v1 = new LoadVars(); v1.onData = com.tremorgames.TremorGames.onGetItemsComplete; try { v2.sendAndLoad('http://' + com.tremorgames.TremorGames.GetDomainName() + '/achievements/json_get_ingame_user_items.php', v1, 'GET'); } if (Error(storedv0) != null) { var error = Error(storedv0); com.tremorgames.TremorGames.GetItemsCallback(null); return false; return true; } throw storedv0; return true; }; v1.onGetItemsComplete = function (data) { try { var v1 = new com.tremorgames.JSON(); var v2 = v1.parse(data); com.tremorgames.TremorGames.GetItemsCallback(v2); } if (Error(storedv0) != null) { var error = Error(storedv0); com.tremorgames.TremorGames.GetItemsCallback(null); } else { throw storedv0; } }; v1.BuyItem = function (itemid, onBuyItemCallback, quantity) { com.tremorgames.TremorGames.BuyItemCallback = onBuyItemCallback; if (!com.tremorgames.TremorGames.IsGameInTremorNetwork()) { onBuyItemCallback(-5, 'Not In Tremor Network', 0); return false; } var v1 = new LoadVars(); v1.itemid = itemid; v1.quantity = quantity; v1.GameID = com.tremorgames.TremorGames.GameID; var v2 = new LoadVars(); v2.onData = com.tremorgames.TremorGames.onBuyItemComplete; try { v1.sendAndLoad('http://' + com.tremorgames.TremorGames.GetDomainName() + '/achievements/json_buy_item.php', v2, 'GET'); } if (Error(storedv0) != null) { var error = Error(storedv0); onBuyItemCallback(-5, error.message, 0); return false; return true; } throw storedv0; return true; }; v1.onBuyItemComplete = function (data) { try { var v2 = new com.tremorgames.JSON(); var v1 = v2.parse(data); if (v1.Status == 1) { com.tremorgames.TremorGames.Coins = v1.Coins; } com.tremorgames.TremorGames.BuyItemCallback(v1.Status, v1.Message, v1.ItemID); } if (Error(storedv0) != null) { var error = Error(storedv0); com.tremorgames.TremorGames.BuyItemCallback(-5, error.message, 0); } else { throw storedv0; } }; v1.LoggedIn = false; v1.PlayerName = ''; v1.DomainName = ''; v1.GameName = ''; v1.Coins = 0; v1.GameNameFriendly = ''; ASSetPropFlags(com.tremorgames.TremorGames.prototype, null, 1); } #endinitclip } movieClip 1671 __Packages.com.tremorgames.md5 { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.tremorgames) { _global.com.tremorgames = new Object(); } if (!_global.com.tremorgames.md5) { var v1 = function (b64pad, chrsz) { if (b64pad != undefined) { this.b64pad = b64pad; } if (chrsz != undefined && chrsz == 8 || chrsz == 16) { this.chrsz = chrsz; } }; com.tremorgames.md5 = v1; var v2 = v1.prototype; v2.hash = function (s) { return this.hex_md5(s); }; v2.hex_md5 = function (s) { return this.binl2hex(this.core_md5(this.str2binl(s), s.length * this.chrsz)); }; v2.str_md5 = function (s) { return this.binl2str(this.core_md5(this.str2binl(s), s.length * this.chrsz)); }; v2.hex_hmac_md5 = function (key, data) { return this.binl2hex(this.core_hmac_md5(key, data)); }; v2.str_hmac_md5 = function (key, data) { return this.binl2str(this.core_hmac_md5(key, data)); }; v2.md5_cmn = function (q, a, b, x, s, t) { return this.safe_add(this.bit_rol(this.safe_add(this.safe_add(a, q), this.safe_add(x, t)), s), b); }; v2.md5_ff = function (a, b, c, d, x, s, t) { return this.md5_cmn(b & c | ~b & d, a, b, x, s, t); }; v2.md5_gg = function (a, b, c, d, x, s, t) { return this.md5_cmn(b & d | c & ~d, a, b, x, s, t); }; v2.md5_hh = function (a, b, c, d, x, s, t) { return this.md5_cmn(b ^ c ^ d, a, b, x, s, t); }; v2.md5_ii = function (a, b, c, d, x, s, t) { return this.md5_cmn(c ^ (b | ~d), a, b, x, s, t); }; v2.core_md5 = function (x, len) { x[len >> 5] |= 128 << len % 32; x[(len + 64 >>> 9 << 4) + 14] = len; var v5 = 1732584193; var v4 = -271733879; var v3 = -1732584194; var v2 = 271733878; var v6 = 0; while (v6 < x.length) { var v11 = v5; var v10 = v4; var v9 = v3; var v8 = v2; v5 = this.md5_ff(v5, v4, v3, v2, x[v6 + 0], 7, -680876936); v2 = this.md5_ff(v2, v5, v4, v3, x[v6 + 1], 12, -389564586); v3 = this.md5_ff(v3, v2, v5, v4, x[v6 + 2], 17, 606105819); v4 = this.md5_ff(v4, v3, v2, v5, x[v6 + 3], 22, -1044525330); v5 = this.md5_ff(v5, v4, v3, v2, x[v6 + 4], 7, -176418897); v2 = this.md5_ff(v2, v5, v4, v3, x[v6 + 5], 12, 1200080426); v3 = this.md5_ff(v3, v2, v5, v4, x[v6 + 6], 17, -1473231341); v4 = this.md5_ff(v4, v3, v2, v5, x[v6 + 7], 22, -45705983); v5 = this.md5_ff(v5, v4, v3, v2, x[v6 + 8], 7, 1770035416); v2 = this.md5_ff(v2, v5, v4, v3, x[v6 + 9], 12, -1958414417); v3 = this.md5_ff(v3, v2, v5, v4, x[v6 + 10], 17, -42063); v4 = this.md5_ff(v4, v3, v2, v5, x[v6 + 11], 22, -1990404162); v5 = this.md5_ff(v5, v4, v3, v2, x[v6 + 12], 7, 1804603682); v2 = this.md5_ff(v2, v5, v4, v3, x[v6 + 13], 12, -40341101); v3 = this.md5_ff(v3, v2, v5, v4, x[v6 + 14], 17, -1502002290); v4 = this.md5_ff(v4, v3, v2, v5, x[v6 + 15], 22, 1236535329); v5 = this.md5_gg(v5, v4, v3, v2, x[v6 + 1], 5, -165796510); v2 = this.md5_gg(v2, v5, v4, v3, x[v6 + 6], 9, -1069501632); v3 = this.md5_gg(v3, v2, v5, v4, x[v6 + 11], 14, 643717713); v4 = this.md5_gg(v4, v3, v2, v5, x[v6 + 0], 20, -373897302); v5 = this.md5_gg(v5, v4, v3, v2, x[v6 + 5], 5, -701558691); v2 = this.md5_gg(v2, v5, v4, v3, x[v6 + 10], 9, 38016083); v3 = this.md5_gg(v3, v2, v5, v4, x[v6 + 15], 14, -660478335); v4 = this.md5_gg(v4, v3, v2, v5, x[v6 + 4], 20, -405537848); v5 = this.md5_gg(v5, v4, v3, v2, x[v6 + 9], 5, 568446438); v2 = this.md5_gg(v2, v5, v4, v3, x[v6 + 14], 9, -1019803690); v3 = this.md5_gg(v3, v2, v5, v4, x[v6 + 3], 14, -187363961); v4 = this.md5_gg(v4, v3, v2, v5, x[v6 + 8], 20, 1163531501); v5 = this.md5_gg(v5, v4, v3, v2, x[v6 + 13], 5, -1444681467); v2 = this.md5_gg(v2, v5, v4, v3, x[v6 + 2], 9, -51403784); v3 = this.md5_gg(v3, v2, v5, v4, x[v6 + 7], 14, 1735328473); v4 = this.md5_gg(v4, v3, v2, v5, x[v6 + 12], 20, -1926607734); v5 = this.md5_hh(v5, v4, v3, v2, x[v6 + 5], 4, -378558); v2 = this.md5_hh(v2, v5, v4, v3, x[v6 + 8], 11, -2022574463); v3 = this.md5_hh(v3, v2, v5, v4, x[v6 + 11], 16, 1839030562); v4 = this.md5_hh(v4, v3, v2, v5, x[v6 + 14], 23, -35309556); v5 = this.md5_hh(v5, v4, v3, v2, x[v6 + 1], 4, -1530992060); v2 = this.md5_hh(v2, v5, v4, v3, x[v6 + 4], 11, 1272893353); v3 = this.md5_hh(v3, v2, v5, v4, x[v6 + 7], 16, -155497632); v4 = this.md5_hh(v4, v3, v2, v5, x[v6 + 10], 23, -1094730640); v5 = this.md5_hh(v5, v4, v3, v2, x[v6 + 13], 4, 681279174); v2 = this.md5_hh(v2, v5, v4, v3, x[v6 + 0], 11, -358537222); v3 = this.md5_hh(v3, v2, v5, v4, x[v6 + 3], 16, -722521979); v4 = this.md5_hh(v4, v3, v2, v5, x[v6 + 6], 23, 76029189); v5 = this.md5_hh(v5, v4, v3, v2, x[v6 + 9], 4, -640364487); v2 = this.md5_hh(v2, v5, v4, v3, x[v6 + 12], 11, -421815835); v3 = this.md5_hh(v3, v2, v5, v4, x[v6 + 15], 16, 530742520); v4 = this.md5_hh(v4, v3, v2, v5, x[v6 + 2], 23, -995338651); v5 = this.md5_ii(v5, v4, v3, v2, x[v6 + 0], 6, -198630844); v2 = this.md5_ii(v2, v5, v4, v3, x[v6 + 7], 10, 1126891415); v3 = this.md5_ii(v3, v2, v5, v4, x[v6 + 14], 15, -1416354905); v4 = this.md5_ii(v4, v3, v2, v5, x[v6 + 5], 21, -57434055); v5 = this.md5_ii(v5, v4, v3, v2, x[v6 + 12], 6, 1700485571); v2 = this.md5_ii(v2, v5, v4, v3, x[v6 + 3], 10, -1894986606); v3 = this.md5_ii(v3, v2, v5, v4, x[v6 + 10], 15, -1051523); v4 = this.md5_ii(v4, v3, v2, v5, x[v6 + 1], 21, -2054922799); v5 = this.md5_ii(v5, v4, v3, v2, x[v6 + 8], 6, 1873313359); v2 = this.md5_ii(v2, v5, v4, v3, x[v6 + 15], 10, -30611744); v3 = this.md5_ii(v3, v2, v5, v4, x[v6 + 6], 15, -1560198380); v4 = this.md5_ii(v4, v3, v2, v5, x[v6 + 13], 21, 1309151649); v5 = this.md5_ii(v5, v4, v3, v2, x[v6 + 4], 6, -145523070); v2 = this.md5_ii(v2, v5, v4, v3, x[v6 + 11], 10, -1120210379); v3 = this.md5_ii(v3, v2, v5, v4, x[v6 + 2], 15, 718787259); v4 = this.md5_ii(v4, v3, v2, v5, x[v6 + 9], 21, -343485551); v5 = this.safe_add(v5, v11); v4 = this.safe_add(v4, v10); v3 = this.safe_add(v3, v9); v2 = this.safe_add(v2, v8); v6 += 16; } return new Array(v5, v4, v3, v2); }; v2.core_hmac_md5 = function (key, data) { var v3 = new Array(this.str2binl(key)); if (v3.length > 16) { v3 = this.core_md5(v3, key.length * this.chrsz); } var v4 = new Array(16); var v5 = new Array(16); var v2 = 0; while (v2 < 16) { v4[v2] = v3[v2] ^ 909522486; v5[v2] = v3[v2] ^ 1549556828; ++v2; } var v6 = new Array(this.core_md5(v4.concat(this.str2binl(data)), 512 + data.length * this.chrsz)); return this.core_md5(v5.concat(v6), 640); }; v2.safe_add = function (x, y) { var v1 = new Number((x & 65535) + (y & 65535)); var v2 = new Number((x >> 16) + (y >> 16) + (v1 >> 16)); return v2 << 16 | v1 & 65535; }; v2.bit_rol = function (num, cnt) { return num << cnt | num >>> 32 - cnt; }; v2.str2binl = function (str) { var v4 = new Array(); var v5 = (1 << this.chrsz) - 1; var v2 = 0; while (v2 < str.length * this.chrsz) { v4[v2 >> 5] |= (str.charCodeAt(v2 / this.chrsz) & v5) << v2 % 32; v2 += this.chrsz; } return v4; }; v2.binl2str = function (bin) { var v4 = new String(''); var v5 = (1 << this.chrsz) - 1; var v2 = 0; while (v2 < bin.length * 32) { v4 += String.fromCharCode(bin[v2 >> 5] >>> v2 % 32 & v5); v2 += this.chrsz; } return v4; }; v2.binl2hex = function (binarray) { var v3 = '0123456789abcdef'; var v4 = new String(''); var v1 = 0; while (v1 < binarray.length * 4) { v4 += v3.charAt(binarray[v1 >> 2] >> (v1 % 4) * 8 + 4 & 15) + v3.charAt(binarray[v1 >> 2] >> (v1 % 4) * 8 & 15); ++v1; } return v4; }; v2.b64pad = new String(''); v2.chrsz = new Number(8); ASSetPropFlags(com.tremorgames.md5.prototype, null, 1); } #endinitclip } movieClip 1672 __Packages.com.tremorgames.JSON { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.tremorgames) { _global.com.tremorgames = new Object(); } if (!_global.com.tremorgames.JSON) { var v1 = function () {}; com.tremorgames.JSON = v1; var v2 = v1.prototype; v2.stringify = function (arg) { var v4; var v3; var v7; var v2 = ''; var v5; switch (typeof arg) { return 'null'; case 'object': if (arg) { if (arg instanceof Array) { v3 = 0; while (v3 < arg.length) { v5 = this.stringify(arg[v3]); if (v2) { v2 += ','; } v2 += v5; ++v3; } return '[' + v2 + ']'; } else { if (typeof arg.toString != 'undefined') { for (v3 in arg) { v5 = arg[v3]; if (typeof v5 != 'undefined' && typeof v5 != 'function') { v5 = this.stringify(v5); if (v2) { v2 += ','; } v2 += this.stringify(v3) + ':' + v5; } } return '{' + v2 + '}'; } } } return 'null'; case 'number': return isFinite(arg) ? String(arg) : 'null'; case 'string': v7 = arg.length; v2 = '"'; v3 = 0; while (v3 < v7) { v4 = arg.charAt(v3); if (v4 >= ' ') { if (v4 == '\\' || v4 == '"') { v2 += '\\'; } v2 += v4; } else { switch (v4) { case '\b': v2 += '\\b'; break; case '\f': v2 += '\\f'; break; case '\n': v2 += '\\n'; break; case '\r': v2 += '\\r'; break; case '\t': v2 += '\\t'; break; default: v4 = v4.charCodeAt(); v2 += '\\u00' + (Math.floor(v4 / 16)).toString(16) + (v4 % 16).toString(16); } } v3 += 1; } return v2 + '"'; case 'boolean': return String(arg); } return 'null'; }; v2.white = function () { while (this.ch) { if (this.ch <= ' ') { this.next(); } else { if (this.ch == '/') { switch (this.next()) { case '/': for (;;) { if (!(this.next() && this.ch != '\n' && this.ch != '\r')) break; } break; case '*': this.next(); for (;;) { if (this.ch) { if (this.ch == '*') { if (this.next() == '/') { this.next(); break; } } else { this.next(); } continue; } this.error('Unterminated comment'); } break; default: this.error('Syntax error'); } } else { break; } } } }; v2.error = function (m) { throw {'name': 'JSONError', 'message': m, 'at': this.at - 1, 'text': this.text}; }; v2.next = function () { this.ch = this.text.charAt(this.at); this.at += 1; return this.ch; }; v2.str = function () { var v5; var v2 = ''; var v4; var v3; var v6 = false; if (this.ch == '"') { while (this.next()) { if (this.ch == '"') { this.next(); return v2; } else { if (this.ch == '\\') { switch (this.next()) { case 'b': v2 += '\b'; break; case 'f': v2 += '\f'; break; case 'n': v2 += '\n'; break; case 'r': v2 += '\r'; break; case 't': v2 += '\t'; break; case 'u': v3 = 0; v5 = 0; while (v5 < 4) { v4 = parseInt(this.next(), 16); if (!isFinite(v4)) { v6 = true; break; } v3 = v3 * 16 + v4; v5 += 1; } if (v6) { v6 = false; } else { v2 += String.fromCharCode(v3); break; default: v2 += this.ch; } } } else { v2 += this.ch; } } } } this.error('Bad string'); }; v2.arr = function () { var v2 = []; if (this.ch == '[') { this.next(); this.white(); if (this.ch == ']') { this.next(); return v2; } while (this.ch) { v2.push(this.value()); this.white(); if (this.ch == ']') { this.next(); return v2; } else { if (this.ch != ',') { break; } } this.next(); this.white(); } } this.error('Bad array'); }; v2.obj = function () { var v3; var v2 = {}; if (this.ch == '{') { this.next(); this.white(); if (this.ch == '}') { this.next(); return v2; } while (this.ch) { v3 = this.str(); this.white(); if (this.ch != ':') { break; } this.next(); v2[v3] = this.value(); this.white(); if (this.ch == '}') { this.next(); return v2; } else { if (this.ch != ',') { break; } } this.next(); this.white(); } } this.error('Bad object'); }; v2.num = function () { var v2 = ''; var v3; if (this.ch == '-') { v2 = '-'; this.next(); } for (;;) { if (!(this.ch >= '0' && this.ch <= '9')) break; v2 += this.ch; this.next(); } if (this.ch == '.') { v2 += '.'; this.next(); for (;;) { if (!(this.ch >= '0' && this.ch <= '9')) break; v2 += this.ch; this.next(); } } if (this.ch == 'e' || this.ch == 'E') { v2 += this.ch; this.next(); if (this.ch == '-' || this.ch == '+') { v2 += this.ch; this.next(); } for (;;) { if (!(this.ch >= '0' && this.ch <= '9')) break; v2 += this.ch; this.next(); } } v3 = Number(v2); if (!isFinite(v3)) { this.error('Bad number'); } return v3; }; v2.word = function () { switch (this.ch) { case 't': if (this.next() == 'r' && this.next() == 'u' && this.next() == 'e') { this.next(); return true; } break; case 'f': if (this.next() == 'a' && this.next() == 'l' && this.next() == 's' && this.next() == 'e') { this.next(); return false; } break; case 'n': if (this.next() == 'u' && this.next() == 'l' && this.next() == 'l') { this.next(); return null; } } this.error('Syntax error'); }; v2.value = function () { this.white(); switch (this.ch) { case '{': return this.obj(); case '[': return this.arr(); case '"': return this.str(); case '-': return this.num(); } return (this.ch >= '0' && this.ch <= '9') ? this.num() : this.word(); }; v2.parse = function (_text) { if (!_text.length > 0) { return ''; } this.text = _text; this.at = 0; this.ch = ' '; return this.value(); }; v2.ch = ''; v2.at = 0; ASSetPropFlags(com.tremorgames.JSON.prototype, null, 1); } #endinitclip } movieClip 1673 __Packages.mx.utils.Delegate { #initclip if (!_global.mx) { _global.mx = new Object(); } if (!_global.mx.utils) { _global.mx.utils = new Object(); } if (!_global.mx.utils.Delegate) { var v1 = function (f) { super(); this.func = f; }; mx.utils.Delegate = v1; mx.utils.Delegate extends Object; var v2 = v1.prototype; v1.create = function (obj, func) { var v2 = function () { var v2 = arguments.callee.target; var v3 = arguments.callee.func; return v3.apply(v2, arguments); }; v2.target = obj; v2.func = func; return v2; }; v2.createDelegate = function (obj) { return mx.utils.Delegate.create(obj, this.func); }; ASSetPropFlags(mx.utils.Delegate.prototype, null, 1); } #endinitclip } movieClip 1674 __Packages.entities.effects.FireWork { #initclip if (!_global.entities) { _global.entities = new Object(); } if (!_global.entities.effects) { _global.entities.effects = new Object(); } if (!_global.entities.effects.FireWork) { var v1 = function (clipToDrawTo, fireFromPos, fireToPos, color, fragmentsCnt, isGlowing) { this.color = (color == undefined) ? entities.effects.FireWork.getRandColor() : color; this.fw_fragments_cnt = (fragmentsCnt == undefined) ? entities.effects.FireWork.C_DEFAULT_FRAGMENTS_CNT : fragmentsCnt; this.baseMatrix = new flash.geom.Matrix(); this.fade = new flash.geom.ColorTransform(); this.fade.alphaMultiplier = 0.8; var v2; this.fw_bitmap = new flash.display.BitmapData(Stage.width, Stage.height, true, 0); v2 = clipToDrawTo.getNextHighestDepth(); this.fw_mc = clipToDrawTo.createEmptyMovieClip('fw_mc' + v2, v2); this.fw_mc.attachBitmap(this.fw_bitmap, this.fw_mc.getNextHighestDepth()); this.launch = fireFromPos; this.fireToPos = fireToPos; this.isGlowing = (isGlowing == undefined) ? true : isGlowing; this.Init(this.launch.x, this.launch.y); this.snd = new Sound(this.fw_mc); this.snd.attachSound('snd_fireworks'); }; entities.effects.FireWork = v1; var v2 = v1.prototype; v2.Init = function (x, y) { var v3 = Math.atan2(this.fireToPos.y - this.launch.y, this.fireToPos.x - this.launch.x); var v2 = flash.geom.Point.distance(this.launch, this.fireToPos) / 30; this.x = x; this.y = y; this.initTime = getTimer(); this.fArr = new Array(); v3 = -v3; v2 = -v2 / 2 + v2 + v2; this.vx = Math.cos(v3) * v2; this.vy = -Math.sin(v3) * v2; this.state = entities.effects.FireWork.C_STATE_INIT; this.setGlow(); }; v2.setGlow = function () { if (this.isGlowing) { this.glow = new flash.filters.GlowFilter(this.color, 0.5, 7, 7, 10); this.fw_mc.filters = [this.glow]; this.fw_mc.blendMode = 'add'; } }; v2.positionParticle = function () { var v2 = Math.floor((getTimer() - this.initTime) / 1000); this.x += this.vx; this.y += this.vy; this.vy += entities.effects.FireWork.gravity; this.vy *= entities.effects.FireWork.res; this.vx *= entities.effects.FireWork.res; if (v2 >= 2 || this.y < this.fireToPos.y) { this.ChangeState(entities.effects.FireWork.C_STATE_EXPLODING); } this.drawParticle(this.x, this.y, this.color); }; v2.drawParticle = function (x, y, color) { this.fw_bitmap.setPixel32(x, y, 4294967295.0); if (!this.isGlowing) { this.fw_bitmap.setPixel32(x - 1, y, color); this.fw_bitmap.setPixel32(x + 1, y, color); this.fw_bitmap.setPixel32(x, y + 1, color); this.fw_bitmap.setPixel32(x, y - 1, color); } }; v2.makeExplode = function (particle, num) { this.initTime = getTimer(); var v3 = new Array(); var v2; v2 = 0; while (v2 < num) { v3[v2] = this.makeExplode_frag(particle); ++v2; } return v3; }; v2.makeExplode_frag = function (particle) { var v2 = new Object(); v2.det = false; v2.initTime = getTimer(); v2._dieTime = this.C_EXPLOSION_TIME_BASE + this.C_EXPLOSION_TIME_VAR * Math.random(); v2.x = this.x; v2.y = this.y; this.angle = Math.random() * 6.283185307179586; var v3; v3 = 1 + Math.random() * 4; v2.vx = Math.cos(this.angle) * v3; v2.vy = -Math.sin(this.angle) * v3; return v2; }; v2.makeExplode_move = function (frag, color) { frag.fTime = Math.floor(getTimer() - frag.initTime); frag.x += frag.vx; frag.y += frag.vy; frag.vy += entities.effects.FireWork.gravity / 2; frag.vy *= entities.effects.FireWork.res; frag.vx *= entities.effects.FireWork.res; this.drawParticle(frag.x, frag.y, color); if (frag.fTime >= frag._dieTime) { if (frag.det == false) { frag.det = true; } } }; v1.getRandColor = function () { var v1; var v3 = 16711680; var v4 = 65280; var v2 = 255; v1 = Math.round(Math.random() * 16777215) | 4278190080.0 | 4280427042.0; return v1; }; v2.ChangeState = function (newState) { var v2 = this.state; this.state = newState; this.HandleStateTransitions(v2, newState); }; v2.Fire = function (x, y, color) { if (this.state != entities.effects.FireWork.C_STATE_INIT) { return undefined; } if (color != undefined) { this.color = color; this.setGlow(); } else { this.color = entities.effects.FireWork.getRandColor(); } if (x != undefined && y != undefined) { this.fireToPos.x = x; this.fireToPos.y = y; this.Init(this.launch.x, this.launch.y); } this.ChangeState(entities.effects.FireWork.C_STATE_FIRED); }; v2.Update = function () { this.fw_bitmap.colorTransform(this.fw_bitmap.rectangle, this.fade); switch (this.state) { case entities.effects.FireWork.C_STATE_INIT: break; case entities.effects.FireWork.C_STATE_FIRED: this.positionParticle(); break; case entities.effects.FireWork.C_STATE_EXPLODING: var v2; for (v2 in this.fArr) { this.makeExplode_move(this.fArr[v2], this.color); if (this.fArr[v2].det == true) { this.fArr.splice(v2, 1); if (this.fArr.length == 0) { this.ChangeState(entities.effects.FireWork.C_STATE_END); } } } break; case entities.effects.FireWork.C_STATE_END: var v3 = Math.floor(getTimer() - this.initTime); if (v3 >= this.fadeTime) { this.ChangeState(entities.effects.FireWork.C_STATE_INIT); } } }; v2.HandleStateTransitions = function (prevState, newState) { if (prevState == entities.effects.FireWork.C_STATE_INIT && newState == entities.effects.FireWork.C_STATE_FIRED) { } if (prevState == entities.effects.FireWork.C_STATE_FIRED && newState == entities.effects.FireWork.C_STATE_EXPLODING) { this.fArr = this.makeExplode(this, this.fw_fragments_cnt); this.snd.start(); } if (prevState == entities.effects.FireWork.C_STATE_EXPLODING && newState == entities.effects.FireWork.C_STATE_END) { this.initTime = getTimer(); this.fadeTime = this.C_FADE_TIME; } if (prevState == entities.effects.FireWork.C_STATE_END && newState == entities.effects.FireWork.C_STATE_INIT) { this.Init(this.launch.x, this.launch.y); } }; v1.C_STATE_INIT = 0; v1.C_STATE_FIRED = 1; v1.C_STATE_EXPLODING = 2; v1.C_STATE_END = 3; v1.C_DEFAULT_FRAGMENTS_CNT = 100; v2.fw_fragments_cnt = 100; v1.gravity = 0.02; v1.res = 0.97; v2.C_EXPLOSION_TIME_BASE = 1500; v2.C_EXPLOSION_TIME_VAR = 1000; v2.C_FADE_TIME = 700; ASSetPropFlags(entities.effects.FireWork.prototype, null, 1); } #endinitclip } movieClip 1675 __Packages.Game { #initclip if (!_global.Game) { var v1 = function () { Game.__myInstance = this; LayMan.Init(); WebApi.Init(_root); this.__gameConfig = _global.GameConf; this.__worldConfig = _global.WorldConf; this.CreateFPSText(); this.__myMath = new UtilMath(); this.__toggleMenu = new ToggleMenu(this); this.__transitionFader = new TransitionFader(this); if (Const.C_ENABLE_CINEMATICS) { this.__transitionFader.DoTransition(TransitionFader.C_INIT, TransitionFader.C_SPLASH); } else { this.__transitionFader.DoTransition(TransitionFader.C_INIT, TransitionFader.C_MAIN_MENU); } WebApi.InitDebugTF(); GamesChart.setup('c170cd23e313c6c07d66585c1e31d01f'); GamesChart.showTab(10, 10); }; _global.Game = v1; var v2 = v1.prototype; v2.CreateFPSText = function () { if (!Const.C_ENABLE_FPS) { return undefined; } var v3 = 25000; var v7; var v5; var v8; var v6; v7 = 570; v5 = 5; v8 = 170; v6 = 20; _root.createTextField('txtFPS' + v3, v3, v7, v5, v8, v6); this.__fpsTxtField = _root['txtFPS' + v3]; this.__fpsTxtField.selectable = false; this.__fpsTxtField.type = 'static'; this.__fpsTxtField.text = String(''); this.__fpsTxtField.multiline = true; var v4; v4 = new TextFormat(); this.__fpsTxtField.color = 16777215; this.__fpsTxtField.setTextFormat(v4); }; v2.UpdateFPSText = function () { if (!Const.C_ENABLE_FPS) { return undefined; } if (FrameMan.isNthFrame(10)) { this.__fpsTxtField.text = String('FPS: ' + FrameMan.getFPS()); var v2; v2 = new TextFormat(); v2.color = 16777215; this.__fpsTxtField.setTextFormat(v2); } }; v2.getToggleMenu = function () { return this.__toggleMenu; }; v2.getMyMath = function () { return this.__myMath; }; v2.getGameConfig = function () { return this.__gameConfig; }; v2.getWorldConfig = function () { return this.__worldConfig; }; v2.getMainMenu = function () { return this.__mainMenu; }; v2.getBriefingMenu = function () { return this.__briefingMenu; }; v2.getWorld = function () { return this.__world; }; v2.getScoreMenu = function () { return this.__scoreMenu; }; v2.getShopMenu = function () { return this.__shopMenu; }; v2.getSplash = function () { return this.__splash; }; v2.getIntro = function () { return this.__intro; }; v2.getOutro = function () { return this.__outro; }; v2.setMainMenu = function (m) { this.__mainMenu = m; }; v2.setBriefingMenu = function (m) { this.__briefingMenu = m; }; v2.setWorld = function (m) { this.__world = m; }; v2.setScoreMenu = function (m) { this.__scoreMenu = m; }; v2.setShopMenu = function (m) { this.__shopMenu = m; }; v2.setSplash = function (m) { this.__splash = m; }; v2.setIntro = function (m) { this.__intro = m; }; v2.setOutro = function (m) { this.__outro = m; }; v2.RenderMainMenu = function () { this.__mainMenu.Render(); this.UpdateFPSText(); }; v2.RenderBriefingMenu = function () { this.__briefingMenu.Render(); this.UpdateFPSText(); }; v2.RenderGameWorld = function () { this.__world.Update(); this.UpdateFPSText(); }; v2.RenderScoreMenu = function () { this.__scoreMenu.Render(); this.UpdateFPSText(); }; v2.RenderShopMenu = function () { this.__shopMenu.Render(); this.UpdateFPSText(); }; v2.RenderTransition = function () { this.__transitionFader.Render(); this.UpdateFPSText(); }; v2.DoTransition = function (fromId, toId) { this.__transitionFader.DoTransition(fromId, toId); }; v1.getInstance = function () { if (Game.__myInstance == undefined) { Game.__myInstance = new Game(); } else { return Game.__myInstance; } }; v1.C_SPLASH_CLIP_NAME = 'S_SPLASH'; v1.C_INTRO_CLIP_NAME = 'S_INTRO'; v1.C_INTRO_MUSIC_NAME = 'mus_intro'; v1.C_OUTRO_CLIP_NAME = 'S_OUTRO'; v1.C_FOKKER_OUTRO_CLIP_NAME = 'S_FOKKER_OUTRO'; v1.C_OUTRO_MUSIC_NAME = 'snd_outro'; ASSetPropFlags(_global.Game.prototype, null, 1); } #endinitclip } movieClip 1676 __Packages.LayMan { #initclip if (!_global.LayMan) { var v1 = function () {}; _global.LayMan = v1; var v2 = v1.prototype; v1.Init = function () { var v1; var v2; var v3; v2 = LayMan.C_DEPTH_TYPES_COUNT; v1 = 0; while (v1 < v2) { v3 = LayMan.getParentLayerClip(v1); ++v1; } }; v1.RegisterClip = function (clipName, depthType) { var v1; var v2; v2 = LayMan.getParentLayerClip(depthType); v1 = LayMan.RegisterClipInClip(v2, clipName); if (v1 == undefined) { } if (v1 != undefined) { ++LayMan.__clipsCount; } return v1; }; v1.getParentLayerClip = function (depthType) { var v2; v2 = LayMan.C_LAYER_MOVIECLIPS[depthType]; if (v2 == undefined) { v2 = _root.createEmptyMovieClip('LAYER_CLIP_' + depthType, depthType); LayMan.C_LAYER_MOVIECLIPS[depthType] = v2; } return v2; }; v1.RegisterClipInClip = function (parentClip, clipName) { var v4; v4 = parentClip.getDepth(); var v2; var v1; v1 = parentClip.getNextHighestDepth(); var v7 = clipName; var v5 = 'par_mc_' + String(v4) + String(v1); v2 = parentClip.attachMovie(clipName, v5, v1); return v2; }; v1.RemoveClip = function (clip) { if (clip == undefined) { return -1; } var v2; v2 = clip.getDepth(); clip.removeMovieClip(); return v2; }; v1.CreateTextField = function (x, y, w, h, depthType, depth) { if (depthType == undefined) { depthType = LayMan.C_S_LAST_LAYER_GROUP; } var v1; v1 = LayMan.getParentLayerClip(depthType); if (depth == undefined) { depth = v1.getNextHighestDepth(); } var v3; v3 = v1.createTextField('textField' + v1._name + String(depth), depth, x, y, w, h); return v3; }; v1.RemoveTextField = function (txtField) { if (txtField == undefined) { return undefined; } var v2; v2 = txtField.getDepth(); txtField.removeTextField(); return v2; }; v1.ReRegisterClipOnSameDepth = function (clip, clipName) { var v2; v2 = clip.getDepth(); var v3; v3 = clip._parent; if (clip != undefined) { clip.removeMovieClip(); } clip = v3.attachMovie(clipName, 'mc_' + v2, v2); if (clip == undefined) { clip = v3.createEmptyMovieClip(clipName, v2); } return clip; }; v1.RegisterEmptyClip = function (clipName, depthType) { var v1; var v3; var v2; v2 = LayMan.getParentLayerClip(depthType); v3 = v2.getNextHighestDepth(); v1 = v2.createEmptyMovieClip('mc_' + v3, v3); if (v1 == undefined) { ++LayMan.__clipsCount; } return v1; }; v1.GetDepthIndex = function (depthType) { return LayMan.C_LAYER_MOVIECLIPS[depthType].getNextHighestDepth(); }; v1.ResetDepthType = function (depthType) { var v1; v1 = LayMan.getParentLayerClip(depthType); var v2; v2 = LayMan.ReRegisterClipOnSameDepth(v1, v1._name); LayMan.C_LAYER_MOVIECLIPS[depthType] = v2; }; v1.ResetGameDepths = function () { var v1; var v3; var v2; v3 = LayMan.C_DEPTH_TYPES_COUNT; v1 = 0; while (v1 < v3) { if (v1 == LayMan.C_S_BKG_FAR || v1 == LayMan.C_S_BKG_NEAR || v1 == LayMan.C_S_COLLIDE_FAR || v1 == LayMan.C_S_COLLIDE_NEAR || v1 == LayMan.C_S_FGD_FAR || v1 == LayMan.C_S_FGD_NEAR || v1 == LayMan.C_S_OTHER || v1 == LayMan.C_S_FLY_LABELS || v1 == LayMan.C_S_MENU_BKG || v1 == LayMan.C_S_MENU || v1 == LayMan.C_S_MENU_HINTS) { v2 = LayMan.getParentLayerClip(v1); v2 = LayMan.ReRegisterClipOnSameDepth(v2, v2._name); LayMan.C_LAYER_MOVIECLIPS[v1] = v2; } ++v1; } }; v1.ResetGeneralDepths = function () { LayMan.ResetGameDepths(); LayMan.ResetMenuDepths(); }; v1.ResetMenuDepths = function () { var v1; var v3; var v2; v3 = LayMan.C_DEPTH_TYPES_COUNT; v1 = 0; while (v1 < v3) { if (v1 == LayMan.C_S_MENU_BKG || v1 == LayMan.C_S_MENU || v1 == LayMan.C_S_MENU_HINTS) { v2 = LayMan.getParentLayerClip(v1); v2 = LayMan.ReRegisterClipOnSameDepth(v2, v2._name); LayMan.C_LAYER_MOVIECLIPS[v1] = v2; } ++v1; } }; v1.ResetToggMenuDepths = function () { var v1; var v3; var v2; v3 = LayMan.C_DEPTH_TYPES_COUNT; v1 = 0; while (v1 < v3) { if (v1 == LayMan.C_S_TOGG_MENU || v1 == LayMan.C_S_TOGG_MENU_HINTS) { v2 = LayMan.getParentLayerClip(v1); v2 = LayMan.ReRegisterClipOnSameDepth(v2, v2._name); LayMan.C_LAYER_MOVIECLIPS[v1] = v2; } ++v1; } }; v1.ResetAllDepths = function () { var v2; var v3; var v1; v3 = LayMan.C_DEPTH_TYPES_COUNT; v2 = 0; while (v2 < v3) { v1 = LayMan.getParentLayerClip(v2); v1 = LayMan.ReRegisterClipOnSameDepth(v1, v1._name); LayMan.C_LAYER_MOVIECLIPS[v2] = v1; ++v2; } }; v1.ScrollClip = function (clip, scrollCoef, xDiff, yDiff) { clip._x += xDiff * scrollCoef; clip._y += yDiff * scrollCoef; }; v1.ScrollClipByOrigin = function (clip, defPosX, defPosY, scrollCoef, sox, soy) { clip._x = defPosX - sox * scrollCoef; clip._y = defPosY - soy * scrollCoef; }; v1.SetTintRGB = function (mc, r, g, b, amount) { var v3; v3 = new Color(mc); var v4 = 100 - amount; var v1 = new Object(); v1.ba = v4; v1.ga = v1.ba; v1.ra = v1.ba; var v2 = amount / 100; v1.rb = r * v2; v1.gb = g * v2; v1.bb = b * v2; v3.setTransform(v1); }; v1.SetTint = function (mc, color, amount) { var v5; var v8; var v4; v5 = color >> 16; v8 = color >> 8 & 255; v4 = color & 255; var v3; v3 = new Color(mc); var v7 = 100 - amount; var v1 = new Object(); v1.ba = v7; v1.ga = v1.ba; v1.ra = v1.ba; var v2 = amount / 100; v1.rb = v5 * v2; v1.gb = v8 * v2; v1.bb = v4 * v2; v3.setTransform(v1); }; v1.CycleFrame = function (mc) { if (mc._totalframes == mc._currentframe) { mc.gotoAndStop(1); } else { mc.nextFrame(); } }; v1.massStop = function (mc) { var v2; for (v2 in mc) { if (typeof mc[v2] == 'movieclip') { mc[v2].stop(); } else { var v3; v3 = mc[v2]; } } mc.stop(); }; v1.SetGlow = function (mc, isEnabled, color, siz, insiz, str, instr) { isEnabled = (isEnabled == undefined) ? true : isEnabled; color = (color == undefined) ? Const.C_COLOR_GREEN : color; siz = (siz == undefined) ? 13 : siz; insiz = (insiz == undefined) ? siz : insiz; str = (str == undefined) ? 2 : str; instr = (instr == undefined) ? str : instr; var v6; v6 = new Array(); if (isEnabled) { if (siz > 0 || str > 0) { var v9; v9 = new flash.filters.GlowFilter(color, 0.5, siz, siz, str, 2, false); v6.push(v9); } if (insiz > 0 || instr > 0) { var v10; v10 = new flash.filters.GlowFilter(color, 0.5, insiz, insiz, instr, 2, true); v6.push(v10); } mc.filters = v6; mc.blendMode = 'add'; } else { mc.filters = ['']; } }; v1.RegisterSound = function (soundName, mc) { var v1; v1 = new Sound(mc); v1.attachSound(soundName); return v1; }; v1.__clipsCount = 0; v1.C_S_BKG_FAR = 0; v1.C_S_BKG_NEAR = 1; v1.C_S_COLLIDE_FAR = 2; v1.C_S_COLLIDE_NEAR = 3; v1.C_S_FGD_FAR = 4; v1.C_S_FGD_NEAR = 5; v1.C_S_OTHER = 6; v1.C_S_FLY_LABELS = 7; v1.C_S_MENU_BKG = 8; v1.C_S_MENU = 9; v1.C_S_MENU_HINTS = 10; v1.C_S_TOGG_MENU = 11; v1.C_S_TOGG_MENU_HINTS = 12; v1.C_S_LAST_LAYER_GROUP = 13; v1.C_DEPTH_TYPES_COUNT = 14; v1.C_SND_EMPTY_CLIP_DEPTH_TYPE = LayMan.C_S_OTHER; v1.C_LAYER_MOVIECLIPS = [undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined]; ASSetPropFlags(_global.LayMan.prototype, null, 1); } #endinitclip } movieClip 1677 __Packages.Const { #initclip if (!_global.Const) { var v1 = function () {}; _global.Const = v1; var v2 = v1.prototype; v1.C_APP_VERSION = 'Ver.1.2.0b.t'; v1.C_ENABLE_CHEAT = false; v1.C_ENABLE_CINEMATICS = true; v1.IS_SKIP_SPLASH_BANNED = true; v1.C_ENABLE_FPS = false; v1.C_NUM_OF_LIVES = 2; v1.C_SCENE_WIDTH = 800; v1.C_SCENE_HEIGHT = 600; v1.C_SCENE_MIN_WIDTH = -1 * Const.C_SCENE_WIDTH / 2; v1.C_SCENE_MAX_WIDTH = 2 * Const.C_SCENE_WIDTH / 2; v1.C_SKY_DEPTH_START = 0; v1.C_BKG_DEPTH_START = 10; v1.C_BONUS_DEPTH_START = 20; v1.C_OBSTACLES_NOCOLISSION_DEPTH_START = 30; v1.C_OBSTACLES_COLLISION_DEPTH_START = 60; v1.C_PLANE_DEPTH_START = 100; v1.C_PLANE_BBOX_DEPTH_START = 120; v1.C_BULLET_DEPTH_START = 200; v1.C_TEXT_FIELD_DEPTH_START = 500; v1.C_PLAYER_1_PLANE_CLIP_NAME = 'S_PLANE_CAMEL_LEFT'; v1.C_PLAYER_2_PLANE_CLIP_NAME = 'S_PLANE_FOKKER_LEFT'; v1.C_PLAYER_3_PLANE_CLIP_NAME = 'S_PLANE_HENRIOT_LEFT'; v1.C_PLAYER_4_PLANE_CLIP_NAME = 'S_PLANE_PFALZ_LEFT'; v1.C_PLANE_SHADOW_CLIP_NAME = 'S_PLANE_SHADOW'; v1.C_PLAYER_PLANE_BBOX_CLIP_NAME = 'S_PLANE_CAMEL_LEFT_BBOX'; v1.C_PLAYER_1_PLANE_BBOX_CLIP_NAME = 'S_PLANE_CAMEL_LEFT_BBOX'; v1.C_PLAYER_2_PLANE_BBOX_CLIP_NAME = 'S_PLANE_CAMEL_LEFT_BBOX'; v1.C_PLAYER_3_PLANE_BBOX_CLIP_NAME = 'S_PLANE_CAMEL_LEFT_BBOX'; v1.C_PLAYER_4_PLANE_BBOX_CLIP_NAME = 'S_PLANE_CAMEL_LEFT_BBOX'; v1.C_GRASS_CLIP_NAME = 'S_GRASS'; v1.C_WIND_RIBBON = 'S_WIND_RIBBON'; v1.C_HANGAR = 'S_HANGAR'; v1.C_SKY_CLIP_NAME = 'S_SKY_BLUE'; v1.C_BACKGROUND_CLIP_NAME = 'S_BACKGROUND'; v1.C_SKYCLOUD_CLIP_COUNT = 5; v1.C_SKY_CLOUD_CLIP_NAME_MASK = 'S_SKY_CLOUD_'; v1.C_SKY_CLOUD_CLIP_NAME_1 = 'S_SKY_CLOUD_1'; v1.C_SKY_CLOUD_CLIP_NAME_2 = 'S_SKY_CLOUD_2'; v1.C_SKY_CLOUD_CLIP_NAME_3 = 'S_SKY_CLOUD_3'; v1.C_SKY_CLOUD_CLIP_NAME_4 = 'S_SKY_CLOUD_4'; v1.C_SKY_CLOUD_CLIP_NAME_5 = 'S_SKY_CLOUD_5'; v1.C_NUM_OF_FGD_CLOUDS = 2; v1.C_NUM_OF_BKG_CLOUDS = 11; v1.C_BONUS_PARACHUTE_CLIP_NAME = 'S_BONUS_PARACHUTE'; v1.C_BONUS_CRATE_BBOX_CLIP_NAME = 'S_BONUS_CRATE_BBOX'; v1.C_BONUS_PARACHUTE_BBOX_CLIP_NAME = 'S_BONUS_PARACHUTE_BBOX'; v1.C_BONUS_CRATE_GOOD_CLIP_NAME = 'S_BONUS_CRATE_GOOD'; v1.C_BONUS_CRATE_BAD_CLIP_NAME = 'S_BONUS_CRATE_BAD'; v1.C_ENGINE_CLOUD_CLIP_NAME = 'S_ENGINE_CLOUD'; v1.C_EXPLOSION_CENTER_CLIP_NAME = 'S_EXPLOSION_CENTER'; v1.C_PLANE_GHOST_CLIP_NAME = 'S_PLANE_GHOST'; v1.C_DMG_INDICATOR_CLIP_NAME = 'S_DMG_INDICATOR'; v1.C_DOGFIGHT_ACES_TITLE_CLIP_NAME = 'S_DOGFIGHT_ACES_TITLE'; v1.C_BUTTON_BKG_CLIP_NAME = 'S_BUTTON_BKG'; v1.C_KEYS_A_W_D_CLIP_NAME = 'S_KEYS_A_W_D'; v1.C_KEYS_J_I_L_CLIP_NAME = 'S_KEYS_J_I_L'; v1.C_KEYS_LEFT_UP_RIGHT_CLIP_NAME = 'S_KEYS_LEFT_UP_RIGHT'; v1.C_KEYS_NUMPAD_4_8_6_CLIP_NAME = 'S_KEYS_NUMPAD_4_8_6'; v1.C_KEYS_AI_CLIP_NAME = 'S_KEYS_AI'; v1.C_KEYS_OFF_CLIP_NAME = 'S_KEYS_OFF'; v1.C_KEYS_BLANK = 'S_KEYS_BLANK'; v1.C_FULL_STAR_CLIP_NAME = 'S_STAR_FULL'; v1.C_EMPTY_STAR_CLIP_NAME = 'S_STAR_EMPTY'; v1.C_SOUNDFX_TOGGLE_CLIP_NAME = 'S_SOUNDFX_TOGGLE'; v1.C_MUSIC_TOGGLE_CLIP_NAME = 'S_MUSIC_TOGGLE'; v1.C_WAG_LOGO_CLIP_NAME = 'S_WAG_LOGO'; v1.C_MENU_MUSIC_SND = 'mus_in_menu'; v1.C_MENU_BKG_SND = 'snd_in_menu_wind_blow'; v1.C_SOUND_VOLUME = 30; v1.C_ENGINE_GO_SOUND_VOLUME = 100; v1.C_ENGINE_BREAKDOWN_SND = 'snd_engine_breakdown'; v1.C_ENGINE_START_SND = 'snd_engine_start'; v1.C_ENGINE_RESTART_SND = 'snd_engine_restart'; v1.C_MACHINE_GUN_SND = 'snd_machine_gun'; v1.C_BAD_BONUS_SND = 'snd_bad_bonus'; v1.C_GOOD_BONUS_SND = 'snd_good_bonus'; v1.C_FALLING_DOPPLER_SND = 'snd_falling_doppler'; v1.C_DOPPLER_DOWN_SND = 'snd_doppler_down'; v1.C_DOPPLER_UP_SND = 'snd_doppler_up'; v1.C_EXPLOSION_1_SND = 'snd_explosion_1'; v1.C_EXPLOSION_2_SND = 'snd_explosion_2'; v1.C_EXPLOSION_3_SND = 'snd_explosion_3'; v1.C_EXPLOSION_4_SND = 'snd_explosion_4'; v1.C_BULLET_HIT_DAMAGE_SND = 'snd_bullet_hit_damage'; v1.C_BULLET_HIT_DAMAGE_2_SND = 'snd_bullet_hit_damage2'; v1.C_BULLET_HIT_DAMAGE_3_SND = 'snd_bullet_hit_damage3'; v1.C_AFTERBURNER_WIND_BLOW_SND = 'snd_afterburner_wind_blow'; v1.C_DIVE_PLANE_SND = 'snd_dive_plane'; v1.C_DIVE_PLANE_OUT_SND = 'snd_diving_out'; v1.C_FALLING_DOPPLER_FREEFALL_SND = 'snd_falling_doppler_freefall'; v1.C_DOUBLE_KILL_SND = 'snd_double_kill'; v1.C_TRIPLE_KILL_SND = 'snd_triple_kill'; v1.C_BURNING_SCREW_SND = 'snd_burning_screw'; v1.C_COUNTDOWN_TICK_SND = 'snd_countdown_clock_tick'; v1.C_DOGFIGHT_SND = 'snd_dogfight_buzzer'; v1.C_MAGNETIC_DEFLECTOR_ON_SND = 'snd_magnetic_deflector'; v1.C_MEGNETIC_DEFLECTION_SND = ''; v1.C_HOMING_MISSILE_DROP_SND = 'snd_missile_drop'; v1.C_BOMB_DROP_SND = 'snd_bomb_drop'; v1.C_PARACHUTE_DROP_SND = 'snd_malicious_parachute'; v1.C_EMP_DISRUPTOR_ON_SND = 'snd_acoustic_rifle'; v1.C_EMP_DISRUPTOR_HIT_SND = ''; v1.C_ACOUSTIC_RIFLE_ON_SND = 'snd_emp'; v1.C_ACOUSTIC_RIFLE_HIT_SND = ''; v1.C_PLANE_SCALE = 80; v1.C_PLAYER_PLANE_RIGHT_ORIENTATION = [true, false, true, false]; v1.C_PLAYER_1_FACE_RIGHT_ORIENTATION = true; v1.C_PLAYER_2_FACE_RIGHT_ORIENTATION = false; v1.C_PLAYER_3_FACE_RIGHT_ORIENTATION = true; v1.C_PLAYER_4_FACE_RIGHT_ORIENTATION = false; v1.C_G = 0.24525; v1.C_ENGINE_THRUST_CONSTANT_TIME = 300; v1.C_ROLL_IMMORTALITY_TIME = 2000; v1.C_MAX_NUM_OF_PLAYERS = 4; v1.C_TUTORIAL_NUM_OF_LIVES = 99; v1.C_MAXIMAL_VELOCITY = 10; v1.C_DEFAULT_Y_POS = 565; v1.C_SPEED_UP_FACED_DOWN_COEF = 300; v1.C_SLOW_DOWN_FACED_UP_COEF = 150; v1.C_SINUS_FACED_UP_TRESHOLD = 0.75; v1.C_SINUS_FACED_DOWN_TRESHOLD = 0.75; v1.C_FORCE_ROLING_TIME = 5000; v1.C_MAX_NUMBER_OF_BULLETS = 20; v1.C_DEFAULT_GUN_RELOAD_INTERVAL = 500; v1.C_BULLET_VELOCITY = 11; v1.C_COLOR_ORANGE = 16763904; v1.C_COLOR_YELLOW = 16776960; v1.C_COLOR_GRAY = 13421772; v1.C_COLOR_DARK_GRAY = 7829367; v1.C_COLOR_GREEN = 65280; v1.C_COLOR_RED = 16711680; v1.C_COLOR_BROWN = 11171652; v1.C_COLOR_WHITE = 15658734; v1.C_COLOR_BLUE = 136; v1.C_COLOR_BLACK = 0; v1.C_COLOR_DARK_GREEN = 34816; v1.C_COLOR_DARK_RED = 8912896; v1.C_COLOR_GOLD = 13408512; v1.C_COLOR_DARK_GOLD = 10053120; v1.C_HITTEST_COMPUTE_DISTANCE = 500; v1.C_SPONSOR_WEBSITE = 'http://www.tremorgames.com'; v1.C_SPONSOR_BUTTONS_COLOR = Const.C_COLOR_DARK_GRAY; v1.C_COMPUTE_AI_EVERY_XTH_FRAME = 5; ASSetPropFlags(_global.Const.prototype, null, 1); } #endinitclip } movieClip 1678 __Packages.ToggleMenu { #initclip if (!_global.ToggleMenu) { var v1 = function (parentGame) { this.__parentGame = parentGame; this.__gameConf = this.__parentGame.getGameConfig(); LayMan.ResetToggMenuDepths(); var v4; v4 = 800; v4 = v4 - 3 * this.C_H - 3; this.btnToggleQuality = new MenuButton(MenuButton.C_RECT_BTN, '', v4, this.C_Y, 3 * this.C_H, this.C_H, this.C_CORNER_FEATHER, 0, _root._quality, 0, false, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); this.btnToggleQuality.SetLabelFormat(12, true, 'CENTER'); this.btnToggleQuality.AllowFadeOutAfterClick(false); this.btnToggleQuality.SetMaxAlpha(80); this.btnToggleQuality.SetHint('Toggle graphics quality to LOW/MEDIUM/HIGH/BEST.\nUse if you feel the game is slow.'); v4 = v4 - this.C_H - 3; this.btnToggleSoundFX = new MenuButton(MenuButton.C_CLIP_BTN, Const.C_SOUNDFX_TOGGLE_CLIP_NAME, v4, this.C_Y, this.C_H, this.C_H, this.C_CORNER_FEATHER, 0, '', 0, false, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); this.btnToggleSoundFX.setIsSkinStatic(true); this.btnToggleSoundFX.AllowFadeOutAfterClick(false); this.btnToggleSoundFX.SetMaxAlpha(80); this.btnToggleSoundFX.__skin.gotoAndStop(_global.GameConf.GetToggleSoundFXClipFrameStateName()); this.btnToggleSoundFX.SetHint('Toggle sound effects ON/OFF'); v4 = v4 - this.C_H - 3; this.btnToggleMusic = new MenuButton(MenuButton.C_CLIP_BTN, Const.C_MUSIC_TOGGLE_CLIP_NAME, v4, this.C_Y, this.C_H, this.C_H, this.C_CORNER_FEATHER, 0, '', 0, false, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); this.btnToggleMusic.setIsSkinStatic(true); this.btnToggleMusic.AllowFadeOutAfterClick(false); this.btnToggleMusic.SetMaxAlpha(80); this.btnToggleMusic.__skin.gotoAndStop(_global.GameConf.GetToggleMusicClipFrameStateName()); this.btnToggleMusic.SetHint('Toggle music ON/OFF'); v4 = v4 - 3 * this.C_H - 3; this.btnQuit = new MenuButton(MenuButton.C_RECT_BTN, '', v4, this.C_Y, 3 * this.C_H, this.C_H, this.C_CORNER_FEATHER, 0, 'MENU', 0, false, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); this.btnQuit.SetLabelFormat(12, true, 'CENTER'); this.btnQuit.AllowFadeOutAfterClick(false); this.btnQuit.SetMaxAlpha(80); this.btnQuit.SetHint('QUIT to main menu or PAUSE the game'); v4 = v4 - 3 * this.C_H - 3; this.SetClickReactions(); }; _global.ToggleMenu = v1; var v2 = v1.prototype; v2.SetClickReactions = function () { this.btnQuit.addEventListener('click', mx.utils.Delegate.create(this, this.QuitMsgBoxShow)); this.btnToggleFullScreen.addEventListener('click', mx.utils.Delegate.create(this, this.HitToggleFullScreen)); this.btnToggleSoundFX.addEventListener('click', mx.utils.Delegate.create(this, this.HitToggleSoundFx)); this.btnToggleMusic.addEventListener('click', mx.utils.Delegate.create(this, this.HitToggleMusic)); this.btnToggleQuality.addEventListener('click', mx.utils.Delegate.create(this, this.HitToggleQuality)); }; v2.HitDonate = function () { _root.getURL('javascript: open(\'http://www.nonoba.com\',\'popWin\',\'width=800,height=600,lef t=107,top=79,screenX=107,screenY=79,toolbar=0,loca tion=0,directories=0,status=0,menubar=0,scrollbars =0,resizable=0\');void(0);'); }; v2.QuitBtnShow = function () { this.btnQuit.FadeIn(); }; v2.QuitBtnHide = function () { this.btnQuit.FadeOut(); }; v2.QuitMsgBoxShow = function () { this.dlgBox = new gamemenu.components.MsgDialog('GAME PAUSED', 'Quit and return to\nmain menu?', gamemenu.components.MsgDialog.C_SIZE_VERY_SMALL, ['Yes', 'No']); this.dlgBox.addEventListener(MenuButton.EVT_CLICK, DelegatePlus.create(this, this.HandleDialogBtnClick)); this.dlgBox.FadeIn(); if (this.__gameConf.getGeneralControlsType() == enums.DefaultKeyTypes.MOUSE) { Mouse.show(); } this.__gameConf.PauseGame(); }; v2.QuitMsgBoxHide = function () { this.dlgBox.FadeOut(true); if (this.__gameConf.getGeneralControlsType() == enums.DefaultKeyTypes.MOUSE) { Mouse.hide(); } this.__gameConf.UnPauseGame(); }; v2.HandleDialogBtnClick = function (evtObj) { evtObj.target.FadeOut(true); if (this.__gameConf.getGeneralControlsType() == enums.DefaultKeyTypes.MOUSE) { Mouse.hide(); } switch (evtObj.buttonIdx) { case 0: this.QuitBtnHide(); this.__parentGame.DoTransition(TransitionFader.C_WORLD, TransitionFader.C_MAIN_MENU); break; case 1: this.__gameConf.UnPauseGame(); } }; v2.HitToggleSoundFx = function () { var v2; var v3; v2 = this.__gameConf.ToggleSoundFX(); if (v2) { this.btnToggleSoundFX.__skin.gotoAndStop('F_ON'); } else { this.btnToggleSoundFX.__skin.gotoAndStop('F_OFF'); } }; v2.HitToggleMusic = function () { var v2; v2 = this.__gameConf.ToggleMusic(); if (v2) { this.btnToggleMusic.__skin.gotoAndStop('F_ON'); } else { this.btnToggleMusic.__skin.gotoAndStop('F_OFF'); } }; v2.HitToggleQuality = function () { var v2; v2 = this.__gameConf.ToggleGFXQuality(); this.btnToggleQuality.SetLabel(v2); }; v2.HitToggleFullScreen = function () { if (Stage.displayState == 'normal') { Stage.displayState = 'fullScreen'; this.btnToggleFullScreen.SetLabel('FULL'); } else { Stage.displayState = 'normal'; this.btnToggleFullScreen.SetLabel('WND'); } }; v2.runJS = function (script) { getURL('javascript:' + script + '', ''); }; v2.DumpToHtml = function () { var v3; var v2; v2 = UtilHtmDump.getHtm(); v3 = 'writeConsole(\'' + v2 + '\'); ' + 'function writeConsole(content) { ' + 'top.consoleRef=window.open(\'\',\'myconsole\', \'width=350,height=250,menubar=0,toolbar=1,status=0,scrollbars=1,resizable=1\');' + 'top.consoleRef.document.writeln(\'<html><head><title>Console</title></head><body bgcolor=white>\'+content+\'</body></html>\'); ' + 'top.consoleRef.document.close(); ' + ' } void(0);'; this.runJS(v3); }; v2.FadeIn = function () { this.btnToggleQuality.FadeIn(); this.btnToggleSoundFX.FadeIn(); this.btnToggleMusic.FadeIn(); }; v2.FadeOut = function () { this.btnToggleQuality.FadeIn(); this.btnToggleSoundFX.FadeIn(); this.btnToggleMusic.FadeIn(); }; v2.C_X = 685; v2.C_Y = 5; v2.C_W = 93; v2.C_H = 20; v2.C_CORNER_FEATHER = 10; v2.C_DEPTH_TYPE = LayMan.C_S_TOGG_MENU; v2.C_HINT_DEPTH_TYPE = LayMan.C_S_TOGG_MENU_HINTS; ASSetPropFlags(_global.ToggleMenu.prototype, null, 1); } #endinitclip } movieClip 1679 __Packages.MenuButton { #initclip if (!_global.MenuButton) { var v1 = function (btnType, clipNameToAttach, x, y, width, height, feather, color, label, labelBorder, deadbutton, def_DepthType, def_HintDepthType) { this.__isSkinStatic = false; this.__destroyAfterFadeOut = false; if (def_DepthType == undefined) { this.defDepthType = LayMan.C_S_MENU; } else { this.defDepthType = def_DepthType; } if (def_HintDepthType == undefined) { this.defHintDepthType = LayMan.C_S_MENU_HINTS; } else { this.defHintDepthType = def_HintDepthType; } this.__skinClipName = clipNameToAttach; this.__fadeOutAfterClickAllowed = true; this.__buttonType = btnType; this.defaultX = x; this.defaultY = y; this.__feather = feather; this.__color = color; this.__txtColor = Const.C_COLOR_GRAY; this.__label = label; this.C_LABEL_BORDER = labelBorder; this.__deadButton = deadbutton; mx.events.EventDispatcher.initialize(this); if (btnType == 'RECT_BTN') { this.__skin = LayMan.RegisterEmptyClip('', this.defDepthType); this.DrawButton(this.__skin, 0, 0, width, height, this.__feather, this.__color); } if (btnType == 'CLIP_BTN') { if (clipNameToAttach == '') { this.__skin = LayMan.RegisterEmptyClip('', this.defDepthType); } else { this.__skin = LayMan.RegisterClip(clipNameToAttach, this.defDepthType); } } this.__skinClipName = clipNameToAttach; this.__skin._x = this.defaultX - this.distance; this.__skin._y = this.defaultY; this.__skin._alpha = 0; this.__skin.useHandCursor = true; this.__label = label; this.__txtField = LayMan.CreateTextField(x + this.C_LABEL_BORDER, y + this.C_LABEL_BORDER, width - 2 * this.C_LABEL_BORDER, height - 2 * this.C_LABEL_BORDER, this.defDepthType); this.__txtField.selectable = false; this.__txtField.type = 'static'; this.__txtField.text = String(this.__label); this.__txtField.multiline = true; this.__txtField.embedFonts = true; this.__txtField._alpha = 100; this.__txtField.wordWrap = true; this.__txtFieldFormat = new TextFormat(); this.__txtFieldFormat.font = 'fntFrutiger'; this.SetLabelFormat(MenuButton.C_DEFAULT_LABEL_FONT_SIZE, true, 'center'); this.__curState = enums.ButtonStates.HIDDEN; this.__skin.enabled = false; this.__txtField.enabled = false; this.InitVariables(); this.__clickSnd = new Sound(this.__skin); this.__clickSnd.attachSound(this.C_CLICK_SND); this.InitializeHint(); }; _global.MenuButton = v1; var v2 = v1.prototype; v2.InitializeHint = function () { var v2; var v3; v2 = LayMan.RegisterEmptyClip('', this.defHintDepthType); v3 = LayMan.GetDepthIndex(this.defHintDepthType); this.__hintTxtField = LayMan.CreateTextField(0, 0, this.C_HINT_WIDTH / 3, this.C_HINT_WIDTH / 3, this.defHintDepthType); this.__hintTxtField.selectable = false; this.__hintTxtField.type = 'dynamic'; this.__hintTxtField.text = String(''); this.__hintTxtField.multiline = true; this.__hintTxtField.embedFonts = true; this.__hintTxtField._alpha = 100; this.__hintTxtField.wordWrap = true; this.__hintTxtField.background = true; this.__hintTxtField.backgroundColor = 0; this.__hintTxtField.border = true; this.__hintTxtField.borderColor = 16777215; this.__hintTxtField.autoSize = 'left'; this.__hintTxtField.wordWrap = false; this.__hintTxtFormat = new TextFormat(); this.__hintTxtFormat.font = 'fntFrutiger'; this.__hintTxtFormat.size = 12; this.__hintTxtFormat.align = 'left'; this.__hintTxtFormat.color = 16777215; this.__hintTxtField.setTextFormat(this.__hintTxtFormat); this.__hintTxtField._visible = false; this.__hintTxtField.enabled = false; }; v2.SetHint = function (txt) { this.__hintTxtField.text = String(txt); this.__hintTxtField.setTextFormat(this.__hintTxtFormat); }; v2.AdjustHintPosition = function (txt) { if (_root._xmouse + this.__hintTxtField._width > Const.C_SCENE_WIDTH) { this.__hintTxtField._x = Const.C_SCENE_WIDTH - this.__hintTxtField._width; } else { this.__hintTxtField._x = _root._xmouse; } if (_root._ymouse + this.__hintTxtField._height > Const.C_SCENE_HEIGHT) { this.__hintTxtField._y = Const.C_SCENE_HEIGHT - this.__hintTxtField._height; } else { this.__hintTxtField._y = _root._ymouse + 10; } }; v2.InitDelegateFunctions = function () { this.__skin.onEnterFrame = mx.utils.Delegate.create(this, this.onEnterFrame); }; v2.DerefDelegateFunctions = function () { this.__skin.onEnterFrame = null; this.__skin.onRollOver = null; this.__skin.onRollOut = null; this.__skin.onPress = null; this.__skin.onDragOver = null; this.__skin.onDragOut = null; this.__skin.onRelease = null; this.__skin.onReleaseOutside = null; }; v2.InitActionDelegateFunctions = function () { this.__skin.onRollOver = mx.utils.Delegate.create(this, this.onRollOver); this.__skin.onRollOut = mx.utils.Delegate.create(this, this.onRollOut); this.__skin.onPress = mx.utils.Delegate.create(this, this.onPress); this.__skin.onDragOver = mx.utils.Delegate.create(this, this.onDragOver); this.__skin.onDragOut = mx.utils.Delegate.create(this, this.onDragOut); this.__skin.onRelease = mx.utils.Delegate.create(this, this.onRelease); this.__skin.onReleaseOutside = mx.utils.Delegate.create(this, this.onReleaseOutside); }; v2.DerefActionDelegateFunctions = function () { this.__skin.onRollOver = null; this.__skin.onRollOut = null; this.__skin.onPress = null; this.__skin.onDragOver = null; this.__skin.onDragOut = null; this.__skin.onRelease = null; this.__skin.onReleaseOutside = null; }; v2.InitVariables = function () { if (this.__deadButton) { this.__skin.enabled = false; this.__txtField.enabled = false; this.__hintTxtField.enabled = false; } if (this.__curState == enums.ButtonStates.HIDDEN) { this.__skin.enabled = false; this.__txtField.enabled = false; this.__hintTxtField.enabled = false; } this.minVelocity = 1; this.velocityDisperse = 4; this.SetFadeSpeedInFrames(MenuButton.C_DEFAULT_FADE_SPEED_IN_FRAMES); this.setTxtFieldFormat(false); this.__skin._x = this.defaultX - this.distance; this.__skin._y = this.defaultY; this.__skin._alpha = 0; this.stopSkin(); this.__skin._visible = false; this.__txtField._x = this.defaultX - this.distance + this.C_LABEL_BORDER; this.__txtField._y = this.defaultY + this.C_LABEL_BORDER; this.__txtField._alpha = 0; this.__txtField._visible = false; this.__txtField.enabled = false; }; v2.SetFadeSpeedInFrames = function (frames) { this.travelFrames = frames; this.velocity = this.minVelocity + this.velocityDisperse * Math.random(); this.distance = this.velocity * this.travelFrames; this.alphaStep = this.maxAlpha / this.travelFrames; this.labelAlphaStep = 100 / this.travelFrames; }; v2.DrawButton = function (clip, xPos, yPos, w, h, feather, color) { var v3; var v4; v3 = w - 2 * feather; if (v3 <= 0) { v3 = 0; } v4 = h - 2 * feather; if (v4 <= 0) { v4 = 0; } clip.beginFill(color); clip.moveTo(feather, 0); clip.lineTo(feather + v3, 0); clip.curveTo(2 * feather + v3, 0, 2 * feather + v3, feather); clip.lineTo(2 * feather + v3, feather + v4); clip.curveTo(2 * feather + v3, 2 * feather + v4, feather + v3, 2 * feather + v4); clip.lineTo(feather, 2 * feather + v4); clip.curveTo(0, 2 * feather + v4, 0, feather + v4); clip.lineTo(0, feather); clip.curveTo(0, 0, feather, 0); clip.endFill(); }; v2.RedrawButtonRect = function (w, h) { this.__skin.clear(); this.DrawButton(this.__skin, 0, 0, w, h, this.__feather, this.__color); }; v2.setTxtFieldFormat = function (isMouseAbove) { if (isMouseAbove) { this.__txtFieldFormat.color = Const.C_COLOR_ORANGE; } else { this.__txtFieldFormat.color = this.__txtColor; } this.__txtField.setTextFormat(this.__txtFieldFormat); }; v2.SetLabelFormat = function (size, bold, align) { if (size != undefined) { this.__txtFieldFormat.size = size; } if (bold != undefined) { this.__txtFieldFormat.bold = bold; } if (align != undefined) { this.__txtFieldFormat.align = align; } this.setTxtFieldFormat(false); this.__txtField.setTextFormat(this.__txtFieldFormat); }; v2.SetLabelColor = function (color) { this.__txtFieldFormat.color = color; this.__txtColor = color; this.__txtField.setTextFormat(this.__txtFieldFormat); }; v2.SetXY = function (x, y) { this.defaultX = x; this.defaultY = y; this.__skin._x = x; this.__skin._y = y; this.__txtField._x = x; this.__txtField._y = y + this.C_LABEL_BORDER; }; v2.ChangeState = function (state) { var v2; v2 = this.__curState; this.__curState = state; if (v2 == enums.ButtonStates.HIDDEN && this.__curState == enums.ButtonStates.FADING_IN) { this.InitDelegateFunctions(); this.__skin._x = this.defaultX - this.distance; this.__skin._y = this.defaultY; this.__skin._visible = true; this.__txtField._visible = true; this.__skin._alpha = 0; this.__txtField._alpha = 0; this.__skin._visible = true; this.__txtField._visible = true; this.__skin.enabled = false; this.__txtField.enabled = false; this.__hintTxtField.enabled = false; this.InitDelegateFunctions(); this.DerefActionDelegateFunctions(); this.__txtField._x = this.defaultX - this.distance + this.C_LABEL_BORDER; this.__txtField._y = this.defaultY + this.C_LABEL_BORDER; } if (v2 == enums.ButtonStates.FADING_IN && this.__curState == enums.ButtonStates.ACTIVE) { this.__skin._x = this.defaultX; this.__skin._y = this.defaultY; this.__txtField._x = this.defaultX + this.C_LABEL_BORDER; this.__txtField._y = this.defaultY + this.C_LABEL_BORDER; this.playSkin(); if (!this.__deadButton) { this.__skin.enabled = true; this.__txtField.enabled = true; this.__hintTxtField.enabled = true; } this.__skin._visible = true; this.__txtField._visible = true; if (!this.isTextBtnOnly()) { this.__skin._alpha = this.maxAlpha; } this.__txtField._alpha = 100; this.InitDelegateFunctions(); this.InitActionDelegateFunctions(); this.dispatchEvent({'target': this, 'type': MenuButton.EVT_ACTIVE}); } if (v2 == enums.ButtonStates.ACTIVE && this.__curState == enums.ButtonStates.FADING_OUT) { this.__skin.enabled = false; this.__txtField.enabled = false; this.__hintTxtField.enabled = false; this.__skin._visible = true; this.__txtField._visible = true; this.InitDelegateFunctions(); this.DerefActionDelegateFunctions(); } if (v2 == enums.ButtonStates.FADING_OUT && this.__curState == enums.ButtonStates.HIDDEN) { this.__skin._x = this.defaultX - this.distance; this.__skin._y = this.defaultY; this.stopSkin(); this.__skin._visible = false; if (!this.isTextBtnOnly()) { this.__skin._visible = false; } this.__txtField._x = this.defaultX - this.distance + this.C_LABEL_BORDER; this.__txtField._y = this.defaultY + this.C_LABEL_BORDER; this.__skin.enabled = false; this.__txtField.enabled = false; this.__hintTxtField.enabled = false; this.__skin._visible = false; this.__txtField._visible = false; this.__hintTxtField._visible = false; this.InitVariables(); if (this.__destroyAfterFadeOut) { this.DestroyBtn(); } this.DerefDelegateFunctions(); } if (v2 == enums.ButtonStates.HIDDEN && this.__curState == enums.ButtonStates.FADING_OUT) { this.DerefActionDelegateFunctions(); this.__skin.enabled = false; this.__txtField.enabled = false; this.__hintTxtField.enabled = false; this.__skin._visible = false; this.__txtField._visible = false; this.__hintTxtField._visible = false; if (this.__destroyAfterFadeOut) { this.DestroyBtn(); this.DerefDelegateFunctions(); } } if (v2 == enums.ButtonStates.FADING_IN && this.__curState == enums.ButtonStates.FADING_OUT) { this.DerefActionDelegateFunctions(); this.__skin.enabled = false; this.__txtField.enabled = false; this.__hintTxtField.enabled = false; this.__skin._visible = true; this.__txtField._visible = true; if (this.__destroyAfterFadeOut) { this.DestroyBtn(); this.DerefDelegateFunctions(); } } }; v2.onEnterFrame = function (o) { if (this.__curState == enums.ButtonStates.ACTIVE || this.__curState == enums.ButtonStates.HIDDEN) { return undefined; } switch (this.__curState) { case enums.ButtonStates.HIDDEN: break; case enums.ButtonStates.FADING_IN: this.__skin._x += this.velocity; if (!this.isTextBtnOnly()) { this.__skin._alpha += this.alphaStep; } this.__txtField._x += this.velocity; this.__txtField._alpha += this.labelAlphaStep; if (this.__skin._x + this.velocity >= this.defaultX || this.__txtField._x >= this.defaultX + this.C_LABEL_BORDER + this.velocity) { this.ChangeState(enums.ButtonStates.ACTIVE); } break; case enums.ButtonStates.ACTIVE: break; case enums.ButtonStates.FADING_OUT: this.__skin._x += this.velocity; this.__txtField._x += this.velocity; if (!this.isTextBtnOnly()) { this.__skin._alpha -= this.alphaStep; } this.__txtField._alpha -= this.labelAlphaStep; if (this.isTextBtnOnly()) { if (this.__txtField._alpha <= 0) { this.ChangeState(enums.ButtonStates.HIDDEN); } } else { if (this.__skin._alpha <= 0) { this.ChangeState(enums.ButtonStates.HIDDEN); } } } }; v2.FadeIn = function () { if (this.__curState != enums.ButtonStates.HIDDEN) { return undefined; } this.ChangeState(enums.ButtonStates.FADING_IN); }; v2.FadeOut = function (destroyAfterFadeOut) { if (!(this.__curState == enums.ButtonStates.ACTIVE || this.__curState == enums.ButtonStates.FADING_IN)) { return undefined; } this.__destroyAfterFadeOut = (destroyAfterFadeOut == undefined) ? false : destroyAfterFadeOut; this.ChangeState(enums.ButtonStates.FADING_OUT); this.__hintTxtField._visible = false; }; v2.SetMaxAlpha = function (alpha) { this.maxAlpha = alpha; }; v2.AllowFadeOutAfterClick = function (value) { this.__fadeOutAfterClickAllowed = value; }; v2.SetLabel = function (label) { this.__label = label; this.__txtField.text = String(this.__label); this.__txtField.setTextFormat(this.__txtFieldFormat); }; v2.getLabel = function () { return this.__label; }; v2.SetSkin = function (clipname) { var v7; var v6; var v2; var v5; var v4; var v3; v7 = this.__skin._x; v6 = this.__skin._y; v2 = this.__skin._alpha; v5 = this.__skin._rotation; v4 = this.__skin._xscale; v3 = this.__skin._yscale; this.__skin = LayMan.ReRegisterClipOnSameDepth(this.__skin, clipname); this.__skin._x = v7; this.__skin._y = v6; this.__skin._alpha = v2; this.__skin._rotation = v5; this.__skin._xscale = v4; this.__skin._yscale = v3; this.__skin.useHandCursor = false; if (this.__curState == enums.ButtonStates.ACTIVE) { this.InitActionDelegateFunctions(); } if (this.__curState == enums.ButtonStates.FADING_IN || this.__curState == enums.ButtonStates.FADING_OUT) { this.InitDelegateFunctions(); } }; v2.isTextBtnOnly = function () { if (this.__buttonType == MenuButton.C_CLIP_BTN && this.__skinClipName == '' && this.__label != '') { return true; } else { return false; } }; v2.getX = function () { if (this.__skin.mc_mask._x != undefined) { return this.__skin.mc_mask._x; } else { return this.__skin._x; } }; v2.getY = function () { if (this.__skin.mc_mask._y != undefined) { return this.__skin.mc_mask._y; } else { return this.__skin._y; } }; v2.getDefX = function () { return this.defaultX; }; v2.getDefY = function () { return this.defaultY; }; v2.getHeight = function () { if (this.__skin.mc_mask._height != undefined) { return this.__skin.mc_mask._height; } else { return this.__skin._height; } }; v2.getWidth = function () { if (this.__skin.mc_mask._width != undefined) { return this.__skin.mc_mask._width; } else { return this.__skin._width; } }; v2.setAutoSize = function (val) { this.__txtField.autoSize = val; }; v2.playSkin = function () { if (this.__isSkinStatic) { this.stopSkin(); return undefined; } var v2; for (v2 in this.__skin) { if (typeof this.__skin[v2] == 'movieclip') { this.__skin[v2].play(); } else { var v3; v3 = this.__skin[v2]; } } this.__skin.play(); }; v2.stopSkin = function () { var v2; for (v2 in this.__skin) { if (typeof this.__skin[v2] == 'movieclip') { this.__skin[v2].stop(); } else { var v3; v3 = this.__skin[v2]; } } this.__skin.stop(); }; v2.DestroyBtn = function () { var v2; this.stopSkin(); v2 = LayMan.RemoveClip(this.__skin); LayMan.RemoveTextField(this.__txtField); LayMan.RemoveTextField(this.__hintTxtField); this.__skin = null; this.__txtField = null; this.__hintTxtField = null; this.DerefDelegateFunctions(); }; v2.Destroy = function () { this.DestroyBtn(); }; v2.isDisplayed = function () { if (this.__curState == enums.ButtonStates.ACTIVE) { return true; } else { return false; } }; v2.setDisabledButton = function (disable, changeColor) { this.__deadButton = disable; this.__skin.enabled = !this.__deadButton; this.__txtField.enabled = !this.__deadButton; if (changeColor) { if (disable) { this.SetLabelColor(Const.C_COLOR_DARK_GRAY); } else { this.SetLabelColor(Const.C_COLOR_GRAY); } } this.__hintTxtField._visible = false; }; v2.setIsSkinStatic = function (isStatic) { this.__isSkinStatic = isStatic; if (this.__isSkinStatic) { this.stopSkin(); } else { this.playSkin(); } }; v2.onDragOver = function (o) { this.dispatchEvent({'target': this, 'type': MenuButton.EVT_DRAG_OVER}); if (this.__hintTxtField.enabled) { this.__hintTxtField._visible = false; } }; v2.onDragOut = function (o) { this.dispatchEvent({'target': this, 'type': MenuButton.EVT_DRAG_OUT}); if (this.__hintTxtField.enabled) { this.__hintTxtField._visible = false; } }; v2.onRollOver = function (o) { if (this.__deadButton || this.__skin.enabled == false) { return undefined; } this.setTxtFieldFormat(true); if (this.__hintTxtField.text != '' && this.__hintTxtField.enabled == true) { this.AdjustHintPosition(); this.__hintTxtField._visible = true; } this.dispatchEvent({'target': this, 'type': MenuButton.EVT_ROLL_OVER}); }; v2.onRollOut = function (o) { if (this.__deadButton || this.__skin.enabled == false) { return undefined; } this.setTxtFieldFormat(false); if (this.__hintTxtField.text != '') { this.__hintTxtField._visible = false; } this.dispatchEvent({'target': this, 'type': MenuButton.EVT_ROLL_OUT}); }; v2.onPress = function (o) { if (this.__deadButton) { return undefined; } if (this.__fadeOutAfterClickAllowed) { this.ChangeState(enums.ButtonStates.FADING_OUT); if (!this.__deadButton) { this.__skin.enabled = false; } } this.dispatchEvent({'target': this, 'type': MenuButton.EVT_CLICK}); if (_global.GameConf.isSoundFXEnabled()) { this.__clickSnd.start(); } this.__hintTxtField._visible = false; }; v2.onRelease = function (o) { this.dispatchEvent({'target': this, 'type': MenuButton.EVT_RELEASE}); if (this.__hintTxtField.enabled) { this.__hintTxtField._visible = true; } }; v2.onReleaseOutside = function (o) { this.dispatchEvent({'target': this, 'type': MenuButton.EVT_RELEASE_OUTSIDE}); if (this.__hintTxtField.enabled) { this.__hintTxtField._visible = true; } }; v2.getCurrentState = function () { return this.__curState; }; v2.unclickButton = function () { if (this.__deadButton || this.__skin.enabled == false) { return undefined; } this.setTxtFieldFormat(false); if (this.__hintTxtField.text != '') { this.__hintTxtField._visible = false; } }; v1.C_DEFAULT_LABEL_FONT_SIZE = 24; v1.EVT_CLICK = 'click'; v1.EVT_ROLL_OVER = 'rollover'; v1.EVT_ROLL_OUT = 'rollout'; v1.EVT_DRAG_OVER = 'dragover'; v1.EVT_DRAG_OUT = 'dragout'; v1.EVT_RELEASE = 'release'; v1.EVT_RELEASE_OUTSIDE = 'releaseoutside'; v1.EVT_ACTIVE = 'active'; v1.C_DEFAULT_FADE_SPEED_IN_FRAMES = 10; v1.C_RECT_BTN = 'RECT_BTN'; v1.C_CLIP_BTN = 'CLIP_BTN'; v2.C_LABEL_BORDER = 10; v2.maxAlpha = 80; v2.C_CLICK_SND = 'snd_click'; v2.C_HINT_WIDTH = 200; ASSetPropFlags(_global.MenuButton.prototype, null, 1); } #endinitclip } movieClip 1680 __Packages.mx.events.EventDispatcher { #initclip if (!_global.mx) { _global.mx = new Object(); } if (!_global.mx.events) { _global.mx.events = new Object(); } if (!_global.mx.events.EventDispatcher) { var v1 = function () {}; mx.events.EventDispatcher = v1; var v2 = v1.prototype; v1._removeEventListener = function (queue, event, handler) { if (queue != undefined) { var v4 = queue.length; var v1; v1 = 0; while (v1 < v4) { var v2 = queue[v1]; if (v2 == handler) { queue.splice(v1, 1); return undefined; } ++v1; } } }; v1.initialize = function (object) { if (mx.events.EventDispatcher._fEventDispatcher == undefined) { mx.events.EventDispatcher._fEventDispatcher = new mx.events.EventDispatcher(); } object.addEventListener = mx.events.EventDispatcher._fEventDispatcher.addEventListener; object.removeEventListener = mx.events.EventDispatcher._fEventDispatcher.removeEventListener; object.dispatchEvent = mx.events.EventDispatcher._fEventDispatcher.dispatchEvent; object.dispatchQueue = mx.events.EventDispatcher._fEventDispatcher.dispatchQueue; }; v2.dispatchQueue = function (queueObj, eventObj) { var v7 = '__q_' + eventObj.type; var v4 = queueObj[v7]; if (v4 != undefined) { var v5; for (v5 in v4) { var v1 = v4[v5]; var v3 = typeof v1; if (v3 == 'object' || v3 == 'movieclip') { if (v1.handleEvent != undefined) { v1.handleEvent(eventObj); } if (v1[eventObj.type] != undefined) { if (mx.events.EventDispatcher.exceptions[eventObj.type] == undefined) { v1[eventObj.type](eventObj); } } } else { v1.apply(queueObj, [eventObj]); } } } }; v2.dispatchEvent = function (eventObj) { if (eventObj.target == undefined) { eventObj.target = this; } this[eventObj.type + 'Handler'](eventObj); this.dispatchQueue(this, eventObj); }; v2.addEventListener = function (event, handler) { var v3 = '__q_' + event; if (this[v3] == undefined) { this[v3] = new Array(); } _global.ASSetPropFlags(this, v3, 1); mx.events.EventDispatcher._removeEventListener(this[v3], event, handler); this[v3].push(handler); }; v2.removeEventListener = function (event, handler) { var v2 = '__q_' + event; mx.events.EventDispatcher._removeEventListener(this[v2], event, handler); }; v1._fEventDispatcher = undefined; v1.exceptions = {'move': 1, 'draw': 1, 'load': 1}; ASSetPropFlags(mx.events.EventDispatcher.prototype, null, 1); } #endinitclip } movieClip 1681 __Packages.enums.ButtonStates { #initclip if (!_global.enums) { _global.enums = new Object(); } if (!_global.enums.ButtonStates) { var v1 = function () {}; enums.ButtonStates = v1; var v2 = v1.prototype; v1.HIDDEN = 0; v1.FADING_IN = 1; v1.ACTIVE = 2; v1.FADING_OUT = 3; ASSetPropFlags(enums.ButtonStates.prototype, null, 1); } #endinitclip } movieClip 1682 __Packages.MenuTutorial { #initclip if (!_global.MenuTutorial) { var v1 = function (gameConfig) { this.__myGameConfig = gameConfig; this.__gameType = GameConfig.getGameType(); }; _global.MenuTutorial = v1; var v2 = v1.prototype; v2.CreateTutorial = function () { LayMan.ResetMenuDepths(); this.__pagesArray = new Array(); this.__pagesCnt = 0; this.__mask1 = LayMan.RegisterClip(this.C_M1, this.C_DEPTH_TYPE); this.__mask2 = LayMan.RegisterClip(this.C_M2, this.C_DEPTH_TYPE); this.__mask1._visible = false; this.__mask2._visible = false; this.CreateAllPages(); this.CreatePrevNextCloseButtons(); this.__pagesCnt = this.__pagesArray.length; }; v2.DestroyTutorial = function () { var v2; v2 = 0; while (v2 < this.__pagesArray.length) { this.__pagesArray[v2].DestroyPage(); ++v2; } var v3; v3 = LayMan.RemoveClip(this.__mask1); v3 = LayMan.RemoveClip(this.__mask2); this.__pagesArray.splice(0); this.__pagesArray = null; this.bPrev.DestroyBtn(); this.bNext.DestroyBtn(); this.bClose.DestroyBtn(); delete this.bPrev; this.bPrev = null; delete this.bNext; this.bNext = null; delete this.bClose; this.bClose = null; this.__pagesArray.splice(); delete this.__pagesArray; this.__pagesArray = null; }; v2.AddDesc = function (thisPage, SubTitle, Desc) { var v2; var v6; var v5; var v7; var v10; v6 = thisPage.getVacantRowX(); v5 = thisPage.getVacantRowY(); v7 = this.C_DEF_PAGE_WIDTH; v10 = this.C_DEF_PAGE_HEIGHT; if (SubTitle != undefined && SubTitle != '') { var v3; v3 = new MenuButton(MenuButton.C_CLIP_BTN, '', v6, v5, v7 - 2 * this.C_DEF_PADDING, 30, MainMenu.C_BTN_FEATHER, 0, SubTitle, 0, true, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v3.AllowFadeOutAfterClick(false); v3.SetLabelColor(Const.C_COLOR_ORANGE); v3.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v3.setAutoSize('center'); v3.SetMaxAlpha(100); thisPage.AddItem(v3); thisPage.incVacantRowY(this.C_DESC_FONT_SIZE + 5); v5 = thisPage.getVacantRowY(); } v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', v6, v5, v7 - 3 * this.C_DEF_PADDING, 50, MainMenu.C_BTN_FEATHER, 0, Desc, 0, true, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v2.AllowFadeOutAfterClick(false); v2.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v2.setAutoSize('center'); v2.SetMaxAlpha(100); thisPage.AddItem(v2); var v8; v8 = v2.__txtField._height; thisPage.incVacantRowY(v8 + this.C_DEF_PADDING); }; v2.AddClipDesc = function (thisPage, SubTitle, clipName, clipMask, Desc) { var v8; var v6; var v10; var v14; v8 = thisPage.getVacantRowX(); v6 = thisPage.getVacantRowY(); v10 = this.C_DEF_PAGE_WIDTH; v14 = this.C_DEF_PAGE_HEIGHT; if (SubTitle != undefined && SubTitle != '') { var v4; v4 = new MenuButton(MenuButton.C_CLIP_BTN, '', v8, v6, v10 - 2 * this.C_DEF_PADDING, 30, MainMenu.C_BTN_FEATHER, 0, SubTitle, 0, true, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v4.AllowFadeOutAfterClick(false); v4.SetLabelColor(Const.C_COLOR_ORANGE); v4.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v4.setAutoSize('center'); v4.SetMaxAlpha(100); thisPage.AddItem(v4); thisPage.incVacantRowY(this.C_DESC_FONT_SIZE + 5); v6 = thisPage.getVacantRowY(); } var v5; v5 = new MenuButton(MenuButton.C_CLIP_BTN, clipName, v8, v6, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v5.AllowFadeOutAfterClick(false); v5.SetMaxAlpha(100); thisPage.AddItem(v5); var v9; var v7; v9 = this.getWidth(v5.__skin, clipMask); v7 = this.getHeight(v5.__skin, clipMask); var v2; v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', v8 + v9 + this.C_DEF_PADDING, v6, v10 - (v9 + 3 * this.C_DEF_PADDING), v7, MainMenu.C_BTN_FEATHER, 0, Desc, MainMenu.C_LARGE_FONT_BORDER, true, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v2.AllowFadeOutAfterClick(false); v2.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v2.SetMaxAlpha(100); thisPage.AddItem(v2); var v11; v11 = v2.__txtField._height > v7 ? v2.__txtField._height : v7; thisPage.incVacantRowY(v11 + this.C_DEF_PADDING); }; v2.AddClipClipDesc = function (thisPage, SubTitle, clip1Name, clip1Mask, clip2Name, clip2Mask, Desc) { var v7; var v6; var v16; var v19; v7 = thisPage.getVacantRowX(); v6 = thisPage.getVacantRowY(); v16 = this.C_DEF_PAGE_WIDTH; v19 = this.C_DEF_PAGE_HEIGHT; if (SubTitle != undefined && SubTitle != '') { var v5; v5 = new MenuButton(MenuButton.C_CLIP_BTN, '', v7, v6, v16 - 2 * this.C_DEF_PADDING, 30, MainMenu.C_BTN_FEATHER, 0, SubTitle, 0, true, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v5.AllowFadeOutAfterClick(false); v5.SetLabelColor(Const.C_COLOR_ORANGE); v5.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v5.setAutoSize('center'); v5.SetMaxAlpha(100); thisPage.AddItem(v5); thisPage.incVacantRowY(this.C_DESC_FONT_SIZE + 5); v6 = thisPage.getVacantRowY(); } var v2; v2 = new MenuButton(MenuButton.C_CLIP_BTN, clip1Name, v7, v6, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v2.AllowFadeOutAfterClick(false); v2.SetMaxAlpha(100); thisPage.AddItem(v2); var v8; var v13; v8 = this.getWidth(v2.__skin, clip1Mask); v13 = this.getHeight(v2.__skin, clip1Mask); var v9; v9 = new MenuButton(MenuButton.C_CLIP_BTN, clip2Name, v7 + v8 + 2 * this.C_DEF_PADDING, v6, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v9.AllowFadeOutAfterClick(false); v9.SetMaxAlpha(100); thisPage.AddItem(v9); var v11; var v12; v11 = this.getWidth(v2.__skin, clip2Mask); v12 = this.getHeight(v2.__skin, clip2Mask); var v4; var v10; v10 = v13 > v12 ? v13 : v12; v4 = new MenuButton(MenuButton.C_CLIP_BTN, '', v7 + v8 + v11 + 3 * this.C_DEF_PADDING, v6, this.C_DEF_PAGE_WIDTH - (v8 + v11 + 5 * this.C_DEF_PADDING), v10, MainMenu.C_BTN_FEATHER, 0, Desc, MainMenu.C_LARGE_FONT_BORDER, true, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v4.AllowFadeOutAfterClick(false); v4.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v4.SetMaxAlpha(100); thisPage.AddItem(v4); var v14; v14 = v10 > v4.__txtField._height ? v10 : v4.__txtField._height; thisPage.incVacantRowY(v14 + this.C_DEF_PADDING); }; v2.AddClipClipClipDesc = function (thisPage, SubTitle, clip1Name, clip1Mask, clip2Name, clip2Mask, clip3Name, clip3Mask, Desc) { var v10; var v5; var v19; var v23; v10 = thisPage.getVacantRowX(); v5 = thisPage.getVacantRowY(); v19 = this.C_DEF_PAGE_WIDTH; v23 = this.C_DEF_PAGE_HEIGHT; if (SubTitle != undefined && SubTitle != '') { var v4; v4 = new MenuButton(MenuButton.C_CLIP_BTN, '', v10, v5, v19 - 2 * this.C_DEF_PADDING, 30, MainMenu.C_BTN_FEATHER, 0, SubTitle, 0, true, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v4.AllowFadeOutAfterClick(false); v4.SetLabelColor(Const.C_COLOR_ORANGE); v4.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v4.setAutoSize('center'); v4.SetMaxAlpha(100); thisPage.AddItem(v4); thisPage.incVacantRowY(this.C_DESC_FONT_SIZE + 5); v5 = thisPage.getVacantRowY(); } var v9; v9 = new MenuButton(MenuButton.C_CLIP_BTN, clip1Name, v10, v5, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v9.AllowFadeOutAfterClick(false); v9.SetMaxAlpha(100); thisPage.AddItem(v9); var v11; var v16; v11 = this.getWidth(v9.__skin, clip1Mask); v16 = this.getHeight(v9.__skin, clip1Mask); var v8; v8 = new MenuButton(MenuButton.C_CLIP_BTN, clip2Name, v10 + v11 + 2 * this.C_DEF_PADDING, v5, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v8.AllowFadeOutAfterClick(false); v8.SetMaxAlpha(100); thisPage.AddItem(v8); var v12; var v15; v12 = this.getWidth(v8.__skin, clip2Mask); v15 = this.getHeight(v8.__skin, clip2Mask); var v7; v7 = new MenuButton(MenuButton.C_CLIP_BTN, clip3Name, v10 + v11 + v12 + 3 * this.C_DEF_PADDING, v5, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v7.AllowFadeOutAfterClick(false); v7.SetMaxAlpha(100); thisPage.AddItem(v7); var v13; var v14; v13 = this.getWidth(v7.__skin, clip3Mask); v14 = this.getHeight(v7.__skin, clip3Mask); var v3; var v6; v6 = v16 > v15 ? v16 : v15; v6 = v6 > v14 ? v6 : v14; v3 = new MenuButton(MenuButton.C_CLIP_BTN, '', v10 + v11 + v12 + v13 + 4 * this.C_DEF_PADDING, v5, this.C_DEF_PAGE_WIDTH - (v11 + v12 + v13 + 7 * this.C_DEF_PADDING), v6, MainMenu.C_BTN_FEATHER, 0, Desc, MainMenu.C_LARGE_FONT_BORDER, true, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v3.AllowFadeOutAfterClick(false); v3.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v3.SetMaxAlpha(100); thisPage.AddItem(v3); var v17; v17 = v6 > v3.__txtField._height ? v6 : v3.__txtField._height; thisPage.incVacantRowY(v17 + this.C_DEF_PADDING); }; v2.CreateBlankPage = function (thisPage, pageTitle, prevPage, nextPage) { var v6; var v5; var v7; var v8; v6 = this.C_DEF_PAGE_POS_X; v5 = this.C_DEF_PAGE_POS_Y; v7 = this.C_DEF_PAGE_WIDTH; v8 = this.C_DEF_PAGE_HEIGHT; thisPage.setVacantRowX(v6 + this.C_DEF_PADDING); thisPage.setVacantRowY(v5); var v3; v3 = new MenuButton(MenuButton.C_RECT_BTN, '', v6, v5, v7, v8, MainMenu.C_BTN_FEATHER, 0, pageTitle, MainMenu.C_SMALL_FONT_BORDER, true, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v3.SetLabelColor(Const.C_COLOR_ORANGE); v3.SetLabelFormat(this.C_TITLE_FONT_SIZE, false, 'left'); v3.AllowFadeOutAfterClick(false); thisPage.AddItem(v3); var v2; v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', v6 + v7 - (70 + this.C_DEF_PADDING), v5, 70, 40, MainMenu.C_BTN_FEATHER, 0, String(this.__pagesCnt + 1), MainMenu.C_SMALL_FONT_BORDER, true, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v2.SetLabelColor(Const.C_COLOR_ORANGE); v2.SetLabelFormat(this.C_TITLE_FONT_SIZE, false, 'right'); v2.AllowFadeOutAfterClick(false); v2.SetMaxAlpha(100); thisPage.AddItem(v2); thisPage.incVacantRowY(this.C_TITLE_FONT_SIZE + this.C_DEF_PADDING + 5); }; v2.CreatePrevNextCloseButtons = function () { var v6; var v4; var v7; var v5; v6 = this.C_DEF_PAGE_POS_X; v4 = this.C_DEF_PAGE_POS_Y; v7 = this.C_DEF_PAGE_WIDTH; v5 = this.C_DEF_PAGE_HEIGHT; var v2 = 15; var v3 = 0; this.bPrev = new MenuButton(MenuButton.C_RECT_BTN, '', v6 + 10, v4 + v5 - 40, 70, 30, v2, 0, 'Prev', v3, false, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); this.bPrev.SetMaxAlpha(100); this.bPrev.SetLabelFormat(this.C_BTN_FONT_SIZE, false, 'center'); this.bPrev.AllowFadeOutAfterClick(false); this.bPrev.addEventListener('click', mx.utils.Delegate.create(this, this.PrevPage)); this.bPrev.SetHint('Go to previous page'); this.bNext = new MenuButton(MenuButton.C_RECT_BTN, '', v6 + 15 + this.bPrev.getWidth(), v4 + v5 - 40, 70, 30, v2, 0, 'Next', v3, false, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); this.bNext.SetMaxAlpha(100); this.bNext.SetLabelFormat(this.C_BTN_FONT_SIZE, false, 'center'); this.bNext.AllowFadeOutAfterClick(false); this.bNext.addEventListener('click', mx.utils.Delegate.create(this, this.NextPage)); this.bNext.SetHint('Go to next page'); this.bClose = new MenuButton(MenuButton.C_RECT_BTN, '', v6 + v7 - 80, v4 + v5 - 40, 70, 30, v2, 0, 'Close', v3, false, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); this.bClose.SetMaxAlpha(100); this.bClose.SetLabelFormat(this.C_BTN_FONT_SIZE, false, 'center'); this.bClose.AllowFadeOutAfterClick(false); this.bClose.addEventListener('click', mx.utils.Delegate.create(this, this.FadeOut)); this.bClose.SetHint('Close help'); }; v2.FadeIn = function () { _global.GameConf.PauseGame(); this.ShowTutorial(); }; v2.FadeOut = function () { _global.GameConf.UnPauseGame(); this.HideTutorial(); _global.GameConf.HideHelp(); }; v2.PrevPage = function () { this.__pagesArray[this.__currPageIdx].FadeOut(); if (this.__currPageIdx > 0) { --this.__currPageIdx; this.__pagesArray[this.__currPageIdx].FadeIn(); } if (this.__currPageIdx == this.__pagesArray.length - 2) { this.bNext.FadeIn(); } if (this.__currPageIdx == 0) { this.bPrev.FadeOut(); } }; v2.NextPage = function () { this.__pagesArray[this.__currPageIdx].FadeOut(); if (this.__currPageIdx < this.__pagesArray.length) { ++this.__currPageIdx; this.__pagesArray[this.__currPageIdx].FadeIn(); } if (this.__currPageIdx == 1) { this.bPrev.FadeIn(); } if (this.__currPageIdx == this.__pagesArray.length - 1) { this.bNext.FadeOut(); } }; v2.HideTutorial = function () { var v3; v3 = true; var v2; v2 = 0; while (v2 < this.__pagesArray.length) { this.__pagesArray[v2].FadeOut(v3); ++v2; } this.bPrev.FadeOut(v3); this.bNext.FadeOut(v3); this.bClose.FadeOut(v3); }; v2.ShowTutorial = function () { this.CreateTutorial(); this.__pagesArray[this.__currPageIdx].FadeIn(); if (this.__currPageIdx != 0) { this.bPrev.FadeIn(); } if (this.__currPageIdx != this.__pagesArray.length - 1) { this.bNext.FadeIn(); } this.bClose.FadeIn(); }; v2.CreateAllPages = function () { this.CreatePage1('Introduction', null); this.CreatePage2('Controls - Basics', null); this.CreatePage3('Controls - Take off', null); this.CreatePage4a('Wrapping', null); this.CreatePage4('Flight physics', null); this.CreatePage4b('Collisions', null); this.CreatePage5('Damage taking', null); this.CreatePage6('Bonuses - introduction', null); this.CreatePage7('Bonuses - good', null); this.CreatePage8('Bonuses - bad', null); this.CreatePage9('Score stats - 1', null); this.CreatePage10('Score stats - 2', null); this.CreatePage11('The end', null); }; v2.CreatePage1 = function (pageTitle, prevPage, nextPage) { var v2; v2 = new MenuPage(pageTitle, undefined); this.CreateBlankPage(v2, pageTitle, prevPage, nextPage); var v3; if (this.__gameType == enums.GameTypes.TUTORIAL) { v3 = 'Welcome to Dogfight Aces pilot!\nThis flight manual will teach you several basic skills. Just follow these steps:'; this.AddDesc(v2, '', v3); v3 = 'Read these pages through.'; this.AddDesc(v2, 'Step 1', v3); v3 = 'After reading, close this manual and try all the maneuvers you have learned. Invoke this manual anytime by clicking at the \'Help\' button at the top of the screen.'; this.AddDesc(v2, 'Step 2', v3); } else { this.AddDesc(v2, '', 'Welcome to Dogfight Aces flight manual!'); this.AddDesc(v2, 'For more details, please read this flight manual through', ''); } this.__pagesArray.push(v2); ++this.__pagesCnt; }; v2.CreatePage2 = function (pageTitle, prevPage, nextPage) { var v2; v2 = new MenuPage(pageTitle, undefined); this.CreateBlankPage(v2, pageTitle, prevPage, nextPage); var v3; v3 = 'Hold the displayed button to rotate the plane in a counter-clockwise direction. Plane steering is showed for both plane types - the right oriented and left oriented.'; this.AddClipClipClipDesc(v2, 'CCW rotation', 'S_TUT_KEYS_ROTATE_CCW', this.__mask1, 'S_TUT_R_PLANE_ROTATE_CCW', this.__mask1, 'S_TUT_L_PLANE_ROTATE_CCW', this.__mask1, v3); v3 = 'Hold the displayed button to rotate the plane in a clockwise direction. Plane steering is showed for both plane types - the right oriented and left oriented.'; this.AddClipClipClipDesc(v2, 'CW rotation', 'S_TUT_KEYS_ROTATE_CW', this.__mask1, 'S_TUT_R_PLANE_ROTATE_CW', this.__mask1, 'S_TUT_L_PLANE_ROTATE_CW', this.__mask1, v3); v3 = 'Press/hold the SPACE or UP arrow key to fire from the machine gun.'; this.AddClipClipClipDesc(v2, 'Firing from gun', 'S_TUT_KEYS_FIRE_SPACE', this.__mask1, 'S_TUT_KEYS_FIRE', this.__mask1, 'S_TUT_R_PLANE_FIRE', this.__mask1, v3); this.__pagesArray.push(v2); ++this.__pagesCnt; }; v2.CreatePage3 = function (pageTitle, prevPage, nextPage) { var v3; v3 = new MenuPage(pageTitle, undefined); this.CreateBlankPage(v3, pageTitle, prevPage, nextPage); var v2; v2 = 'To take off you have to do following steps:'; this.AddDesc(v3, 'Taking off', v2); v2 = 'Start the engine by pressing the FIRE button.'; this.AddDesc(v3, 'Step 1', v2); v2 = 'After gaining enough speed, press one of the steering button that rotates the plane in a proper direction (CW or CCW) to rise up.'; this.AddDesc(v3, 'Step 2', v2); v2 = 'Press the displayed button sequence to take off. In this case, you see the example of a plane, that is oriented to the right (the airscrew heads to the right if the plane is on ground).'; this.AddClipClipClipDesc(v3, 'Examples', 'S_TUT_SPACE_TAKE_OFF', this.__mask1, 'S_TUT_R_KEYS_TAKE_OFF', this.__mask1, 'S_TUT_R_PLANE_TAKE_OFF', this.__mask1, v2); v2 = 'Press the displayed button sequence to take off. In this case, you see the example of a plane, that is oriented to the left (the airscrew heads to the left if the plane is on ground).'; this.AddClipClipClipDesc(v3, '', 'S_TUT_SPACE_TAKE_OFF', this.__mask1, 'S_TUT_L_KEYS_TAKE_OFF', this.__mask1, 'S_TUT_L_PLANE_TAKE_OFF', this.__mask1, v2); this.__pagesArray.push(v3); ++this.__pagesCnt; }; v2.CreatePage4a = function (pageTitle, prevPage, nextPage) { var v2; v2 = new MenuPage(pageTitle, undefined); this.CreateBlankPage(v2, pageTitle, prevPage, nextPage); var v3; v2.incVacantRowY(this.C_DEF_PADDING); v3 = 'The plane\'s movement on the screen is wrapped around left and right screen border. If your plane flies to the right screen border, it appears on the left and vice versa. '; this.AddClipClipDesc(v2, 'Planes', 'S_TUT_R_PLANE_WRAP_SCREEN', this.__mask1, 'S_TUT_R_PLANE_WRAP_SCREEN_ARENA', this.__mask1, v3); v3 = 'Bullets are wrapping around screen borders too. The more distance the bullets travel, the less penetration effect they have. Bullets with a low penetration look faded and have high chance to miss and cause no damage to the target. '; this.AddClipDesc(v2, 'Bullets', 'S_TUT_DAMAGE_IND_MISS_PLANE', this.__mask1, v3); v3 = 'Wrapping brings some chaos into the game, but a skilled player can use it as a shock effect. If you\'re able to aim and hunt down enemy planes through the screen borders, you can change the result of the dogfight. Knowing how to turn wrapping behaviour to your advantage is critical, especially in multiplayer mode. '; this.AddDesc(v2, 'Strategy tip', v3); this.__pagesArray.push(v2); ++this.__pagesCnt; }; v2.CreatePage4 = function (pageTitle, prevPage, nextPage) { var v2; v2 = new MenuPage(pageTitle, undefined); this.CreateBlankPage(v2, pageTitle, prevPage, nextPage); var v3; v2.incVacantRowY(this.C_DEF_PADDING); v3 = 'If your plane flies up too steeply, the engine stalls. Plane with stalled engine falls down according to gravity laws without any possibility to control the direction of the free fall.\nNOTE: Engine can stall even if your plane remains at the top screen border for a longer time.'; this.AddClipDesc(v2, 'Stall', 'S_TUT_R_PLANE_STALL', this.__mask1, v3); v3 = 'If the engine stalls, you can restart it by steering your nose down to the ground. After gaining enough speed the engine restarts automaticaly, and you are able to control the flight direction again.'; this.AddClipDesc(v2, 'Engine restart', 'S_TUT_R_PLANE_RESTART', this.__mask1, v3); v3 = 'If your altitude is high enough, you can steer your nose down to the ground to gain more speed. You can cumulate enormous speed by repeating this manoeuvre, but be careful, the more speed the less agility the plane has.'; this.AddClipDesc(v2, 'Speed up', 'S_TUT_R_PLANE_SPEEDUP', this.__mask1, v3); this.__pagesArray.push(v2); ++this.__pagesCnt; }; v2.CreatePage4b = function (pageTitle, prevPage, nextPage) { var v2; v2 = new MenuPage(pageTitle, undefined); this.CreateBlankPage(v2, pageTitle, prevPage, nextPage); var v3; v2.incVacantRowY(this.C_DEF_PADDING); v3 = 'Planes in the air automatically fly by without collision.'; this.AddClipDesc(v2, 'Planes fly by', 'S_TUT_COLISION_PLANE_OVERLAY', this.__mask1, v3); v3 = 'Plane wrecks that are out of control can collide with your plane.\n'; this.AddClipDesc(v2, 'Wreck collision', 'S_TUT_COLISION_WRECK', this.__mask1, v3); v3 = 'You can still collide with other planes and destroy them if you have Screwcutter bonus. For more info please read further pages about bonuses.'; this.AddClipDesc(v2, 'Screw cutter', 'S_TUT_GOOD_BONUS_SCREWCUTTER', this.__mask2, v3); this.__pagesArray.push(v2); ++this.__pagesCnt; }; v2.CreatePage5 = function (pageTitle, prevPage, nextPage) { var v2; v2 = new MenuPage(pageTitle, undefined); this.CreateBlankPage(v2, pageTitle, prevPage, nextPage); v2.incVacantRowY(this.C_DEF_PADDING); var v3; v3 = 'Hitting the plane to the engine area can cause engine damage. Planes with damaged engine fly slowly and are unable to speed up (s. prev. page \'Flight physics - speed up\')\nNOTE: Additional hits to the engine destroy it and the plane falls down.'; this.AddClipClipDesc(v2, '', 'S_TUT_DAMAGE_INDI_ENGINE', this.__mask1, 'S_TUT_DAMAGE_IND_ENGINE_PLANE', this.__mask1, v3); v3 = 'Hitting the plane to the tail area can cause tail damage. Planes with damaged tail are harder to maneuvre.\nNOTE: Additional hits to the tail destroy it and the plane falls down.'; this.AddClipClipDesc(v2, '', 'S_TUT_DAMAGE_INDI_TAIL', this.__mask1, 'S_TUT_DAMAGE_IND_TAIL_PLANE', this.__mask1, v3); v3 = 'Hitting the plane to the machine gun area can cause gun damage. Planes with damaged machine gun fire at lower rate.\nNOTE: As the machine gun is not a vital device, the plane with destroyed gun is still operable, but is almost unable to fire.'; this.AddClipClipDesc(v2, '', 'S_TUT_DAMAGE_INDI_GUN', this.__mask1, 'S_TUT_DAMAGE_IND_GUN_PLANE', this.__mask1, v3); v3 = 'Hitting the approximate area of plane\'s cockpit can cause a \'Pilot hit\' damage.\nNOTE: Pilot is usually injured or killed after one shot, so the plane is out of control and immediately falls down.'; this.AddClipDesc(v2, '', 'S_TUT_DAMAGE_IND_PILOT_HIT_PLANE', this.__mask1, v3); this.__pagesArray.push(v2); ++this.__pagesCnt; }; v2.CreatePage6 = function (pageTitle, prevPage, nextPage) { var v2; v2 = new MenuPage(pageTitle, undefined); this.CreateBlankPage(v2, pageTitle, prevPage, nextPage); v2.incVacantRowY(this.C_DEF_PADDING); var v3; v3 = 'Bonuses are small crates hung on parachutes which fall from the sky in approximately 30 second intervals. Catching the crate gives the plane a temporal advantage or handicap. Bonus is some kind of double edge. It may help you to win the fight or crumple your effort. So be careful, you never know which crate contains good or bad bonus. Despite of this, it is highly recommended to use the bonuses, because in average, only every 5th bonus is bad.'; this.AddDesc(v2, 'About bonuses', v3); v3 = ' - Good bonuses can repair your damaged plane.'; this.AddDesc(v2, 'Damage repair', v3); v3 = ' - Bonuses are good and bad.\n - Bonuses spawn approx. every 30 seconds\n - Bonuses with lasting effect have approx. 10 second duration\n - There is only 20% chance to catch a bad bonus\n - You can shoot the parachute down to prevent enemy plane from catching it\n'; ' - A good bonus can repair your plane'; this.AddDesc(v2, 'Summary', v3); v3 = 'Catch me!'; this.AddClipDesc(v2, 'Bonus parachute', 'S_TUT_BONUS_PARACHUTE', this.__mask1, v3); this.__pagesArray.push(v2); ++this.__pagesCnt; }; v2.CreatePage7 = function (pageTitle, prevPage, nextPage) { var v2; v2 = new MenuPage(pageTitle, undefined); this.CreateBlankPage(v2, pageTitle, prevPage, nextPage); v2.incVacantRowY(this.C_DEF_PADDING); var v3; v3 = 'Screwcutter bonus gives you temporal ability to destroy enemy planes by your burning airscrew. Your plane is immune to bullets and collisions with wreck planes.\nHINT: Destroy falling wrecks by screwcutter for additional score.'; this.AddClipDesc(v2, 'Screw cutter', 'S_TUT_GOOD_BONUS_SCREWCUTTER', this.__mask2, v3); v3 = 'Gun berserk bonus gives you temporal ability to fire at 4 times higher rate than usual.'; this.AddClipDesc(v2, 'Gun berserk', 'S_TUT_GOOD_BONUS_GUN_BERSERK', this.__mask2, v3); v3 = 'Afterburner bonus gives you temporal ability to fly at high speed. Your plane is immune to bullets, collisions with enemy wreck planes and stalling.'; this.AddClipDesc(v2, 'Afterburner', 'S_TUT_GOOD_BONUS_AFTERBURNER', this.__mask2, v3); v3 = 'Extra life bonus instantly gives you additional life.'; this.AddDesc(v2, '+1 Extra life', v3); this.__pagesArray.push(v2); ++this.__pagesCnt; }; v2.CreatePage8 = function (pageTitle, prevPage, nextPage) { var v2; v2 = new MenuPage(pageTitle, undefined); this.CreateBlankPage(v2, pageTitle, prevPage, nextPage); v2.incVacantRowY(this.C_DEF_PADDING); var v3; v3 = 'Engine failure temporarily lowers your speed so you become an easy target for enemy planes.'; this.AddClipDesc(v2, 'Engine failure', 'S_TUT_BAD_BONUS_ENGINE_FAILURE', this.__mask2, v3); v3 = 'Gun jam temporarily degrades the cadence of your machine gun to 1/4.'; this.AddClipDesc(v2, 'Gun jam', 'S_TUT_BAD_BONUS_GUN_JAM', this.__mask2, v3); v3 = 'Drunken pilot temporarily switches your control keys for steering. Key for CCW rotation becomes key for CW rotation and vice versa.'; this.AddClipClipDesc(v2, 'Drunken pilot', 'S_TUT_KEYS_DRUNKEN_PILOT', this.__mask1, 'S_TUT_BAD_BONUS_DRUNKEN_PILOT', this.__mask1, v3); this.__pagesArray.push(v2); ++this.__pagesCnt; }; v2.CreatePage9 = function (pageTitle, prevPage, nextPage) { var v3; v3 = new MenuPage(pageTitle, undefined); this.CreateBlankPage(v3, pageTitle, prevPage, nextPage); v3.incVacantRowY(this.C_DEF_PADDING); var v2; v2 = 'After you finish the dogfight, several score statistics will inform you about your skills:'; this.AddDesc(v3, '', v2); v2 = 'Number of enemies that plane has hunted down. Number of kills is increased, when you destroy enemy plane so it begins to fall down.\nHINT: Hunt for damaged planes to get a kill.'; this.AddDesc(v3, 'Kills', v2); v2 = 'Number of double kills that plane has achieved. Double kill is added to score, when two enemies are hunted down within a time limit of ' + String(Score.C_TIME_TO_DOUBLE_KILL / 1000) + ' few seconds.'; this.AddDesc(v3, 'Double Kills', v2); v2 = 'Number of tripple kills that plane has achieved. Triple kill is added to score, when three enemies are hunted down within a time limit of ' + String(Score.C_TIME_TO_TRIPPLE_KILL / 1000) + ' few seconds after double kill. If triple kill appears, the double kill count decreases by one.'; this.AddDesc(v3, 'Tripple Kills', v2); v2 = 'Maximum number of enemies that plane hunts down until it looses life.'; this.AddDesc(v3, 'Killing streak', v2); v2 = 'Number of kills that the plane achieved by using good bonuses with lasting effect.'; this.AddDesc(v3, 'Buffed kills', v2); this.__pagesArray.push(v3); ++this.__pagesCnt; }; v2.CreatePage10 = function (pageTitle, prevPage, nextPage) { var v3; v3 = new MenuPage(pageTitle, undefined); this.CreateBlankPage(v3, pageTitle, prevPage, nextPage); v3.incVacantRowY(this.C_DEF_PADDING); var v2; v2 = 'Number of engine restarts succesfuly performed. (s. page Flight physics - Engine restart)'; this.AddDesc(v3, 'Engine restarts', v2); v2 = 'Number of lives that have left after the game has finished.'; this.AddDesc(v3, 'Saved lives', v2); v2 = 'Shot accuracy in percents.'; this.AddDesc(v3, 'Shot accuracy', v2); v2 = 'Average time the plane remained in the air without losing life in seconds.'; this.AddDesc(v3, 'Avg survival time', v2); v2 = 'Sum of all previous score stats.'; this.AddDesc(v3, 'Total score', v2); v2 = 'Rank of the player. Rank is computed from the total score. The rank scale has 11 levels from 0 to 10.'; this.AddDesc(v3, 'Rank', v2); this.__pagesArray.push(v3); ++this.__pagesCnt; }; v2.CreatePage11 = function (pageTitle, prevPage, nextPage) { var v2; v2 = new MenuPage(pageTitle, undefined); this.CreateBlankPage(v2, pageTitle, prevPage, nextPage); v2.incVacantRowY(this.C_DEF_PADDING); var v3; if (this.__gameType == enums.GameTypes.TUTORIAL) { v3 = 'Pilot, now you know all the important things. Close this manual and try to take off and fly. After being comfortable with the controls, hit \'Dummy\' buttons to add one or more enemies.'; } else { v3 = 'Pilot, now you know all the important things.\nLet\'s jump into the plane again and hunt down all your opponents!'; } this.AddDesc(v2, '', v3); v3 = ''; this.AddDesc(v2, 'Good luck!', v3); this.__pagesArray.push(v2); ++this.__pagesCnt; }; v2.getWidth = function (mc, mask) { if (mask == undefined) { return mc._width; } else { return mask._width; } }; v2.getHeight = function (mc, mask) { if (mask == undefined) { return mc._height; } else { return mask._height; } }; v2.isDisplayed = function () { return this.__pagesArray[this.__currPageIdx].isDisplayed(); }; v2.C_DEF_PAGE_POS_X = 12; v2.C_DEF_PAGE_POS_Y = 30; v2.C_DEF_PAGE_WIDTH = 776; v2.C_DEF_PAGE_HEIGHT = 565; v2.C_DEF_PADDING = 15; v2.C_BTN_FONT_SIZE = 18; v2.C_TITLE_FONT_SIZE = 18; v2.C_DESC_FONT_SIZE = 15; v2.C_M1 = 'S_MASK_100_100'; v2.C_M2 = 'S_MASK_200_100'; v2.C_DEPTH_TYPE = LayMan.C_S_MENU; v2.C_HINT_DEPTH_TYPE = LayMan.C_S_MENU_HINTS; ASSetPropFlags(_global.MenuTutorial.prototype, null, 1); } #endinitclip } movieClip 1683 __Packages.enums.DefaultKeyTypes { #initclip if (!_global.enums) { _global.enums = new Object(); } if (!_global.enums.DefaultKeyTypes) { var v1 = function () {}; enums.DefaultKeyTypes = v1; var v2 = v1.prototype; v1.getGeneralControlType = function (idx) { idx %= enums.DefaultKeyTypes.C_GENERAL_CONTROL_TYPES.length; if (idx < 0) { idx = enums.DefaultKeyTypes.C_GENERAL_CONTROL_TYPES.length - 1; } return enums.DefaultKeyTypes.C_GENERAL_CONTROL_TYPES[idx]; }; v1.MOUSE_MULTI = 0; v1.A_W_D = 1; v1.J_I_L = 2; v1.LEFT_UP_RIGHT_ONLY = 3; v1.NUMPAD_4_8_6 = 4; v1.AI = 5; v1.OFF = 6; v1.LEFT_UP_RIGHT = 7; v1.MOUSE = 8; v1.count = 7; v1.C_KEY_TYPES_CLIP_NAMES = ['S_KEYS_MOUSE_MULTI', 'S_KEYS_A_W_D', 'S_KEYS_J_I_L', 'S_KEYS_LEFT_UP_RIGHT', 'S_KEYS_NUMPAD_4_8_6', 'S_KEYS_AI', 'S_KEYS_OFF', 'S_KEYS_LEFT_UP_RIGHT', 'S_KEYS_MOUSE']; v1.C_GENERAL_CONTROL_TYPES = [enums.DefaultKeyTypes.MOUSE, enums.DefaultKeyTypes.LEFT_UP_RIGHT]; ASSetPropFlags(enums.DefaultKeyTypes.prototype, null, 1); } #endinitclip } movieClip 1684 __Packages.config.levels.WorldConfig { #initclip if (!_global.config) { _global.config = new Object(); } if (!_global.config.levels) { _global.config.levels = new Object(); } if (!_global.config.levels.WorldConfig) { var v1 = function (gameConfig) { this.__gameConfig = gameConfig; this.__currLevelId = GameConfig.C_SP_END_INIT; }; config.levels.WorldConfig = v1; var v2 = v1.prototype; v1.getLevelInfo = function (id, infoType) { return config.levels.WorldConfig.LevelInfoArray[id][infoType]; }; v1.isLevelLocked = function (id) { var v1; if (WebApi.isUserLoggedIn()) { v1 = GameConfig.isLevelLocked(id); return v1; } v1 = GameConfig.isLevelLocked(id); return v1; }; v1.getAdviseInfo = function (levelId) { return config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_SHOP_ADVISE_TXT); }; v2.getLevelConfigObj = function () { this.__currLevelId = GameConfig.getCurrentLevelId(); this.__gameType = GameConfig.getGameType(); this.__currentLevelConfig = this.CreateLevelConfig(this.__currLevelId, this.__gameType); return this.__currentLevelConfig; }; v2.CreateSinglePlayerLevel = function (levelId) { switch (levelId) { case config.levels.WorldConfig.SP_LEVEL_TUTORIAL: var v13; v13 = new config.levels.LevelTutorial(levelId, this.__gameConfig); return v13.getLevelConfig(); case config.levels.WorldConfig.SP_LEVEL_01: var v19; v19 = new config.levels.Level_01(config.levels.WorldConfig.SP_LEVEL_01, this.__gameConfig); return v19.getLevelConfig(); break; case config.levels.WorldConfig.SP_LEVEL_02: var v16; v16 = new config.levels.Level_02(levelId, this.__gameConfig); return v16.getLevelConfig(); break; case config.levels.WorldConfig.SP_LEVEL_03: var v14; v14 = new config.levels.Level_03(levelId, this.__gameConfig); return v14.getLevelConfig(); break; case config.levels.WorldConfig.SP_LEVEL_04: var v11; v11 = new config.levels.Level_04(levelId, this.__gameConfig); return v11.getLevelConfig(); break; case config.levels.WorldConfig.SP_LEVEL_05: var v9; v9 = new config.levels.Level_05(levelId, this.__gameConfig); return v9.getLevelConfig(); break; case config.levels.WorldConfig.SP_LEVEL_06: var v7; v7 = new config.levels.Level_06(levelId, this.__gameConfig); return v7.getLevelConfig(); break; case config.levels.WorldConfig.SP_LEVEL_07: var v5; v5 = new config.levels.Level_07(levelId, this.__gameConfig); return v5.getLevelConfig(); break; case config.levels.WorldConfig.SP_LEVEL_08: var v3; v3 = new config.levels.Level_08(levelId, this.__gameConfig); return v3.getLevelConfig(); break; case config.levels.WorldConfig.SP_LEVEL_09: var v22; v22 = new config.levels.Level_09(levelId, this.__gameConfig); return v22.getLevelConfig(); break; case config.levels.WorldConfig.SP_LEVEL_10: var v20; v20 = new config.levels.Level_10(levelId, this.__gameConfig); return v20.getLevelConfig(); break; case config.levels.WorldConfig.SP_LEVEL_11: var v17; v17 = new config.levels.Level_11(levelId, this.__gameConfig); return v17.getLevelConfig(); break; case config.levels.WorldConfig.SP_LEVEL_12: var v15; v15 = new config.levels.Level_12(levelId, this.__gameConfig); return v15.getLevelConfig(); break; case config.levels.WorldConfig.SP_LEVEL_13: var v12; v12 = new config.levels.Level_13(levelId, this.__gameConfig); return v12.getLevelConfig(); break; case config.levels.WorldConfig.SP_LEVEL_14: var v10; v10 = new config.levels.Level_14(levelId, this.__gameConfig); return v10.getLevelConfig(); break; case config.levels.WorldConfig.SP_LEVEL_15: var v8; v8 = new config.levels.Level_15(levelId, this.__gameConfig); return v8.getLevelConfig(); break; case config.levels.WorldConfig.SP_LEVEL_16: var v6; v6 = new config.levels.Level_16(levelId, this.__gameConfig); return v6.getLevelConfig(); break; case config.levels.WorldConfig.SP_LEVEL_17: var v4; v4 = new config.levels.Level_17(levelId, this.__gameConfig); return v4.getLevelConfig(); break; case config.levels.WorldConfig.SP_LEVEL_18: var v23; v23 = new config.levels.Level_18(levelId, this.__gameConfig); return v23.getLevelConfig(); break; case config.levels.WorldConfig.SP_LEVEL_19: var v21; v21 = new config.levels.Level_19(levelId, this.__gameConfig); return v21.getLevelConfig(); break; case config.levels.WorldConfig.SP_LEVEL_20: var v18; v18 = new config.levels.Level_20(levelId, this.__gameConfig); return v18.getLevelConfig(); } }; v2.CreateDefenceLevel = function (levelId) { var v2; v2 = new config.levels.DefenceWaveLevel(levelId, this.__gameConfig); return v2.getLevelConfig(); }; v2.CreateMultiplayerLevel = function () { var v2; v2 = new config.levels.MultiplayerLevel(this.__gameConfig); return v2.getLevelConfig(); }; v2.CreateLevelConfig = function (levelId, gameType) { gameType = (gameType == undefined) ? enums.GameTypes.INS_SINGLEPLAYER : gameType; if (gameType == enums.GameTypes.INS_SINGLEPLAYER || gameType == enums.GameTypes.TUTORIAL || gameType == enums.GameTypes.SINGLE_LEVEL) { return this.CreateSinglePlayerLevel(levelId); } if (gameType == enums.GameTypes.DEFENCE) { return this.CreateDefenceLevel(levelId); } if (gameType == enums.GameTypes.MULTIPLAYER) { return this.CreateMultiplayerLevel(); } }; v2.SetLevel = function (levelId) { if (this.__currLevelId < config.levels.WorldConfig.C_LEVELS_COUNT) { this.__currLevelId = levelId; GameConfig.setCurrentLevelId(this.__currLevelId); return true; } else { return false; } }; v2.GotoNextLevel = function (planeIdx) { var v4; v4 = GameConfig.getGameType(); switch (v4) { case enums.GameTypes.INS_SINGLEPLAYER: var v5; var v3; if (planeIdx == enums.PlaneTypes.FOKKER) { v3 = config.levels.WorldConfig.C_FOKKER_LAST_LEVEL_ID; } else { v3 = config.levels.WorldConfig.C_NON_FOKKER_LAST_LEVEL_ID; } v5 = this.__currLevelId; if (this.__currLevelId <= config.levels.WorldConfig.C_SP_MAX_LEVEL_ID) { if (this.__currLevelId == config.levels.WorldConfig.C_BONUS_LEVEL_ID) { this.__currLevelId = GameConfig.C_SP_END_FOKKER; } if (planeIdx == enums.PlaneTypes.FOKKER) { if (this.__currLevelId == config.levels.WorldConfig.SP_LEVEL_18) { this.__currLevelId = config.levels.WorldConfig.C_BONUS_LEVEL_ID; } else { if (this.__currLevelId > 0) { ++this.__currLevelId; } } } else { if (this.__currLevelId == config.levels.WorldConfig.SP_LEVEL_19) { this.__currLevelId = GameConfig.C_SP_END_OTHER; } else { ++this.__currLevelId; } } GameConfig.setCurrentLevelId(this.__currLevelId); return true; } else { this.__currLevelId = GameConfig.C_SP_END_FOKKER; return false; } break; case enums.GameTypes.DEFENCE: ++this.__currLevelId; GameConfig.setCurrentLevelId(this.__currLevelId); break; default: } }; v2.isFinalLevel = function (planeIdx) { if (this.__currLevelId == config.levels.WorldConfig.C_BONUS_LEVEL_ID && planeIdx == enums.PlaneTypes.FOKKER) { return true; } if (this.__currLevelId == config.levels.WorldConfig.SP_LEVEL_19 && planeIdx != enums.PlaneTypes.FOKKER) { return true; } return false; }; v2.CreateSPLevel01 = function (levelId) { var v2; v2 = new config.levels.LevelConfig(); v2.setConfigItem(config.levels.LevelConfig.TITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_TITLE_TXT)); v2.setConfigItem(config.levels.LevelConfig.SUBTITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_SUBTITLE_TXT)); v2.setConfigItemArr(config.levels.LevelConfig.OBJECTIVE_CLIP_DESC, ['S_MISSION_OBJECTIVE', undefined, 'S_MISSION_OBJECTIVE', undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_OBJECTIVE_TXT)]); v2.setConfigItemArr(config.levels.LevelConfig.WEATHER_CLIP_DESC, ['S_MISSION_OBJECTIVE', undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_WEATHER_TXT)]); v2.setConfigItemArr(config.levels.LevelConfig.HINTS_CLIP_DESC, ['S_MISSION_OBJECTIVE', undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_HINT_TXT)]); v2.setConfigItem(config.levels.LevelConfig.LOCATION, enums.LocationTypes.NEVADA_DESERT); v2.setConfigItem(config.levels.LevelConfig.WEATHER, enums.WeatherTypes.SUNNY); v2.setConfigItem(config.levels.LevelConfig.WIND_DIR, new Vector2D(0, 0)); var v4; v4 = new Array(); var v3; v3 = new Array(); v3[entities.Obstacles.Ring.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.RING; v3[entities.Obstacles.Ring.C_ARG_TYPE_X] = 110; v3[entities.Obstacles.Ring.C_ARG_TYPE_Y] = 120; v3[entities.Obstacles.Ring.C_ARG_TYPE_ROTATION] = 45; v4.push(v3); v3 = new Array(); v3[entities.Obstacles.Ring.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.RING; v3[entities.Obstacles.Ring.C_ARG_TYPE_X] = 700; v3[entities.Obstacles.Ring.C_ARG_TYPE_Y] = 320; v3[entities.Obstacles.Ring.C_ARG_TYPE_ROTATION] = 0; v4.push(v3); v3 = new Array(); v3[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v3[entities.Obstacles.Target.C_ARG_TYPE_X] = 900; v3[entities.Obstacles.Target.C_ARG_TYPE_Y] = 500; v3[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 1; v3[entities.Obstacles.Target.C_ARG_TYPE_GROUP_ID] = 1; v4.push(v3); v3 = new Array(); v3[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v3[entities.Obstacles.Target.C_ARG_TYPE_X] = 900; v3[entities.Obstacles.Target.C_ARG_TYPE_Y] = 250; v3[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 1; v3[entities.Obstacles.Target.C_ARG_TYPE_GROUP_ID] = 1; v4.push(v3); v3 = new Array(); v3[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v3[entities.Obstacles.Target.C_ARG_TYPE_X] = 10; v3[entities.Obstacles.Target.C_ARG_TYPE_Y] = 500; v3[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 1; v3[entities.Obstacles.Target.C_ARG_TYPE_GROUP_ID] = 2; v4.push(v3); v3 = new Array(); v3[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v3[entities.Obstacles.Target.C_ARG_TYPE_X] = 10; v3[entities.Obstacles.Target.C_ARG_TYPE_Y] = 250; v3[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 1; v3[entities.Obstacles.Target.C_ARG_TYPE_GROUP_ID] = 2; v4.push(v3); v3 = new Array(); v3[entities.Obstacles.InfoTable.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.INFO_TABLE; v3[entities.Obstacles.InfoTable.C_ARG_TYPE_X] = 600; v3[entities.Obstacles.InfoTable.C_ARG_TYPE_Y] = 200; v3[entities.Obstacles.InfoTable.C_ARG_TYPE_CLIP_NAME] = 'S_INFO_TABLE'; v3[entities.Obstacles.InfoTable.C_ARG_TYPE_AUTO_FLY_IN_TIME] = 7; v3[entities.Obstacles.InfoTable.C_ARG_TYPE_AUTO_FLY_OUT_TIME] = 14; v3[entities.Obstacles.InfoTable.C_ARG_TYPE_CYCLE_TIME] = 4; v3[entities.Obstacles.InfoTable.C_ARG_TYPE_FLY_IN_GROUP_ID] = undefined; v3[entities.Obstacles.InfoTable.C_ARG_TYPE_FLY_OUT_GROUP_ID] = undefined; v3[entities.Obstacles.InfoTable.C_ARG_TYPE_GROUP_ID] = undefined; v4.push(v3); v3 = new Array(); v3[entities.Obstacles.InfoTable.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.INFO_TABLE; v3[entities.Obstacles.InfoTable.C_ARG_TYPE_X] = 0; v3[entities.Obstacles.InfoTable.C_ARG_TYPE_Y] = 200; v3[entities.Obstacles.InfoTable.C_ARG_TYPE_CLIP_NAME] = 'S_INFO_TABLE'; v3[entities.Obstacles.InfoTable.C_ARG_TYPE_AUTO_FLY_IN_TIME] = undefined; v3[entities.Obstacles.InfoTable.C_ARG_TYPE_AUTO_FLY_OUT_TIME] = 5; v3[entities.Obstacles.InfoTable.C_ARG_TYPE_CYCLE_TIME] = 3; v3[entities.Obstacles.InfoTable.C_ARG_TYPE_FLY_IN_GROUP_ID] = 1; v3[entities.Obstacles.InfoTable.C_ARG_TYPE_FLY_OUT_GROUP_ID] = 2; v3[entities.Obstacles.InfoTable.C_ARG_TYPE_GROUP_ID] = undefined; v4.push(v3); v2.setConfigItemArr(config.levels.LevelConfig.AIR_OBSTACLES_ARRAY, v4); var v7; v7 = this.__gameConfig.getPlayersPlaneConfig(); var v10; v10 = new PlaneConfig(enums.PlaneTypes.HANRIOT, enums.PlaneStartPosTypes.THIRD, enums.DefaultKeyTypes.AI, enums.AIProfiles.NORMAL, config.levels.WorldConfig.C_SP_NUM_OF_LIVES); var v9; v9 = new PlaneConfig(enums.PlaneTypes.PFALZ, enums.PlaneStartPosTypes.FOURTH, enums.DefaultKeyTypes.AI, enums.AIProfiles.NORMAL, config.levels.WorldConfig.C_SP_NUM_OF_LIVES); var v6; v6 = new PlaneConfig(enums.PlaneTypes.FOKKER, enums.PlaneStartPosTypes.SECOND, enums.DefaultKeyTypes.AI, enums.AIProfiles.NORMAL, config.levels.WorldConfig.C_SP_NUM_OF_LIVES); v2.setConfigItemArr(config.levels.LevelConfig.PLANES_POS_AND_CONF, new Array(v7, v6)); var v8 = [enums.BonusTypes.SCREWCUTTER]; v2.setConfigItemArr(config.levels.LevelConfig.BONUSES_ARRAY, v8); v2.setConfigItem(config.levels.LevelConfig.ARENA_SIZE_TYPE, enums.ArenaSizeTypes.SMALL); return v2; }; v1.getPlaneTypeFromIdxNotMy = function (myIdx, idx) { var v1; var v5; var v2 = -1; v1 = 0; while (v1 < enums.PlaneTypes.COUNT) { if (myIdx != v1) { ++v2; } if (v2 == idx) { return v1; } ++v1; } return -1; }; v2.WebApiSendLevelCompletionStats = function (planeObj, isSendingBeforeLevel) { var v7; v7 = GameConfig.getGameType(); if (v7 == enums.GameTypes.INS_SINGLEPLAYER) { var v2; isSendingBeforeLevel = (isSendingBeforeLevel == undefined) ? false : isSendingBeforeLevel; if (isSendingBeforeLevel) { v2 = this.__currLevelId - 1; } else { v2 = this.__currLevelId; } WebApi.AddStat(WebApi.C_LEVELS_COMPLETED, v2); var v5; v5 = planeObj.getPlaneType(); v5 = enums.PlaneTypes.FOKKER; if (v5) { var v6; v6 = this.__gameConfig.getScoreHolder(); var v3; v3 = v6.getScoreValue(enums.ScoreTypes.KILLS, enums.ScoreTypes.C_STAT_TYPE_TOTAL); if (v3 >= WebApi.C_RED_BARON_KILLS && v2 == config.levels.WorldConfig.C_FOKKER_LAST_LEVEL_ID) { WebApi.AddStat(WebApi.C_LEVELS_COMPLETED_RED_BARON, 1); } } } }; v1.addMoreStatHardMode = function (planeType) { if (enums.PlaneTypes.isPlaneWithHardMode(planeType)) { return 1; } else { return 0; } }; v1.C_DEFAULT_NUM_OF_LIVES = 3; v1.C_TUTORIAL_NUM_OF_LIVES = 99; v1.C_SP_NUM_OF_LIVES = config.levels.WorldConfig.C_DEFAULT_NUM_OF_LIVES; v1.C_LIVES_3_PLANES = 4; v1.C_LIVES_4_PLANES = 5; v1.C_MULTIPLAYER_NUM_OF_LIVES = 7; v1.SP_LEVEL_TUTORIAL = 0; v1.SP_LEVEL_01 = 1; v1.SP_LEVEL_02 = 2; v1.SP_LEVEL_03 = 3; v1.SP_LEVEL_04 = 4; v1.SP_LEVEL_05 = 5; v1.SP_LEVEL_06 = 6; v1.SP_LEVEL_07 = 7; v1.SP_LEVEL_08 = 8; v1.SP_LEVEL_09 = 9; v1.SP_LEVEL_10 = 10; v1.SP_LEVEL_11 = 11; v1.SP_LEVEL_12 = 12; v1.SP_LEVEL_13 = 13; v1.SP_LEVEL_14 = 14; v1.SP_LEVEL_15 = 15; v1.SP_LEVEL_16 = 16; v1.SP_LEVEL_17 = 17; v1.SP_LEVEL_18 = 18; v1.SP_LEVEL_19 = 19; v1.SP_LEVEL_20 = 20; v1.C_INFO_LEVEL_LOCKED = 0; v1.C_INFO_TITLE_TXT = 1; v1.C_INFO_SUBTITLE_TXT = 2; v1.C_INFO_MISSION_TXT = 3; v1.C_INFO_OBJECTIVE_TXT = 4; v1.C_INFO_WEATHER_TXT = 5; v1.C_INFO_HINT_TXT = 6; v1.C_INFO_SHOP_ADVISE_TXT = 7; v1.LevelInfoArray = [[false, 'Learn how to fly rookie!', 'xxx', 'xxx', 'xxx', 'xxx', 'xxx', 'xxx'], [false, 'Level 1 - Qualification', 'The first ring chaser', 'Welcome to secret dogfight tournament! First off, you must finish two simple qualification rounds before getting to the real fight. Prove your maneuvering skills.', '- Fly through all rings as fast as you can', 'Clear sky.', 'Avoid steep climbing to prevent engine stalls.', 'Thrust should be upgraded as soon as possible, to help prevent engine stalls.'], [true, 'Level 2 - Qualification', 'Sharpshooters\'s garden', 'Here you can show your targetting and shooting skills. Go ahead!', '- Shoot down all targets as fast as you can\n- The balloon target is optional', 'Some clouds will obscure your view.', 'Destroy the balloon first to get more points.', 'Trouble manuevering? Buy thrust, agility and speed upgrades to improve the maneuverability.'], [true, 'Level 3 - Tournament', 'The first encounter', 'Nice job with the qualification rounds! Now it is time to cope with your first opponent. He\'s weak. Take him down and hit as many secondary targets as possible to get the best score.', '- Shoot down your first opponent', 'Clear sky', 'Learn how to maneuver effectively to take your opponent down.', 'Get armor upgrade as soon as possible to be able to sustain more damage.'], [true, 'Level 4 - Tournament', 'Whisper of the twins', 'Twin machine gun is always bad in enemy hands. This guy has a better plane and damage, but you can surely beat him.', '- Shoot down your opponent\n- Avoid flying under or through the storm cloud\n- Destroy at least one balloon', 'Attention! Storm cloud is moving across the site! One hit of thunderbolt can bring you down! Flying through the storm cloud slows you down as well.', 'Hit & run tactics could compensate your vulnerability and lack of damage.', 'Time to spare some money for better weapons, don\'t you think?'], [true, 'Level 5 - Tournament', 'Heatseeker ravage', 'The more agile you are, the better chance to survive. Homing missiles fired by this opponent can really hurt!', '- Shoot down your opponent\n- Creep behind the balloons to avoid his missiles', 'Some clouds will obscure your view.', 'Creeping behind observation balloons offer good cover against missiles. \'Afterburner\' bonus parachute could help as well.', 'Some devices (yellow) are cheap and very useful. You should accumulate some cash to buy them.'], [true, 'Level 6 - Tournament', 'Heavy load', 'Well, your next oponent is tough. Beware of his burst gun and impact bombs. His weapons could be deadly if you get too close! Good luck!', '- Shoot down your opponent\n- Avoid collision with birds', 'Few clouds will obscure your view. Flocks of migrating birds are crossing the site. Avoid them or you risk serious damage!', 'Hunt your opponent down from behind or from a safe distance. Bonus with \'Gun berserk\' ability is ready to help you, but \'Gun jam\' bonus could cripple your efforts. Good luck!', 'Feel free to set your plane up to meet your needs. There is no ideal configuration.'], [true, 'Level 7 - Qualification - Quarterfinal', 'The second ring chaser', 'Congratulations! You have passed the basic tournament level. To enter the quarterfinal, you have to finish this qualification round.', '- Fly through all the rings as fast as you can\n- Hit all hanging targets', 'Some clouds will obscure your view.', 'Catch the bonus parachute to gain an \'Afterburner\' boost of speed.', 'Did you know that you are able to combine machine gun with other machine guns (twin, burst)?'], [true, 'Level 8 - Tournament', 'Trinity of the skies', 'Welcome to the first quarterfinal match! The sky is a bit overcrowded with airplanes. Can you hunt down two opponents?', '- Shoot down all opponents\n- Avoid collision with airship\n- The balloon must survive!', 'Clear sky.', 'Avoid collision with the airship crossing the site!', ''], [true, 'Level 9 - Tournament', 'Stormy day', 'A strong storm is coming close to tournament site. Bad weather is an unbeatable foe. Use the weather to your benefit and hunt down those who cannot cope with it.', '- Shoot down all opponents\n- Avoid flying under or through the storm cloud', 'Beware of passing storm clouds! Thunderbolts can hurt you! Strong wind may complicate the flight.', 'Beware of lightning bolts from the storm clouds! They can bring you down in a second. Flying through the storm cloud slows you down significantly. Watch the windsock for wind strength and direction.', ''], [true, 'Level 10 - Tournament', 'Envious pact', 'Your skills are getting noticed and these two guys are shaking in their boots. They made a pact to hunt you down! Break their planes into pieces before they rip you apart!', '- Shoot down all opponents\n- Prevail the 1 vs 2 numerical superiority\n- Destroy all balloons', 'Some clouds will obscure your view.', 'Watch your six and get behind those flying targets.\n Beware of the plane with the EMP Distruptor, he can stall your engine! Bring him down from safe distance.', ''], [true, 'Level 11 - Tournament', 'Migration paths', 'In this round, bird flocks and two pilots will be your foes. Avoid the flocks and destroy those two tin cans!', '- Shoot down your opponent\n- Avoid collision with several bird flocks', 'Clear sky. Flocks of migrating birds are crossing the site. Avoid them or you risk serious damage!', 'No hints today.', ''], [true, 'Level 12 - Tournament', 'Night crawlers', 'This is the last round of quarterfinal. Clear all the flying tin cans from the sky and enjoy the midnight fireworks.', '- Shoot down all opponents\n- All balloons must survive!', 'Partly cloudy and starry night.', 'Enemies will break fire at balloons if you get close to them. Distract them from balloons and destroy them! Be careful to not hit balloons with your devastating arsenal!', ''], [true, 'Level 13 - Qualification - Semifinal', 'Annihilator\'s loophole', 'Excellent! You\'ve done a great job so far! The quarterfinal is behind you. Now focus on the semifinal qualification round to enter the semifinal duels.', ' - Shoot as many targets as possible within time limit\n- Destroy the airship last (optional)\n- \'Gun berserk\' bonus can help you to win', 'Cloudy weather can impair the visibility conditions.', 'If you destroy airship too early, you will complete the mission, but you won\'t be able to destroy other objects for a better score.', ''], [true, 'Level 14 - Tournament', 'Turnie burnie', 'Caution! Tornado and strong wind is present at the tournament site! Avoid it at all cost, but try to get the enemies sucked in. Catch the \'Screwcutter \'bonus from the parachute and destroy the enemies with your burning propeller.', '- Shoot down all opponents\n- Do not approach to tornado', 'Attention! Tornado is heading towards the tournament site! Avoid it if possible.', '\'Screwcutter\' bonus allows you to collide with your enemies and destroy them with your burning propeller. While in screwcutter mode, no weapon can hurt you.', ''], [true, 'Level 15 - Tournament', 'The balloon defence', 'Grouped in pairs, your task is to defend your balloons with the Allied pilot at all cost. At least one balloon must survive by the end of the time limit! Beat your oponents by destroying their observation balloons.', '- Destroy the red team\'s balloons within time limit\n- Green flagged aircraft - your ally will help you', 'Clear sky', 'Be careful to not hit our ally. Allies have the same flag color as you. Destroying enemy balloons quickly could make an easy ride from this mission.', ''], [true, 'Level 16 - Tournament', 'Hunt for prey', 'This guy has one of the best planes of the WWI period. Hopefully you and your two allied pilots are able to crack his pride! Beware, his weapons and devices are really advanced!', '- Shoot down advanced opponent\n- Your two allies marked with the same color flag\n will help you', 'Clear sky. Flocks of migrating birds are crossing the site. Avoid them!', 'Killing your ally decreases your chance to down the strong oponent... But it still improves your score! :-)', ''], [true, 'Level 17 - Tournament', 'Bitter taste of finale', 'Well, the tournament has come to the end! Only one shall remain in this all vs all dogfight!', '- Shoot down all opponents', 'Cloudy weather can impair the visibility conditions.', 'Watch your six and creep behind the balloons and targets.', ''], [true, 'Level 18 - Tournament', 'Conspiracy nightmare', 'These guys cannot stand that someone is better then them. Envious pilots have conspired against you and want to kill you at night! Your night flee has been betrayed and they are on the hunt! Prove that you are not the prey! Hunt them down! All of them!', '- Shoot down all opponents\n- Prevail the 1 vs 3 numerical superiority', 'Clean and starry night.', 'Watch your six and creep behind the balloons and targets.', ''], [true, 'Level 19 - Wrath of the Red Baron', 'Wrath of the Red Baron', 'Manfred von Ritchhofen. The ace of all aces. Everyone thought he was dead... But he\'s not. He\'s here fully loaded and very angry that someone seems to be better than him! Shoot him down and rewrite history!', '- Shoot down the Red Baron and win the tournament', 'Few clouds can obstruct your view.', 'There are two possibilities how to win this duel. Think and win!', ''], [true, 'Level 20 - Revenge of the Red Baron', 'Revenge of the Red Baron', 'Prove that you the \'Red Baron\' are the only Ace of Ace that ever lived. Take off your Airship and turn your 4 opponents into scrap!', '- Prevail the 1 vs 4 epic battle', 'Sunny. No clouds.', 'Good luck!', '']]; v1.C_SP_MAX_LEVEL_ID = config.levels.WorldConfig.SP_LEVEL_20; v1.C_BONUS_LEVEL_ID = config.levels.WorldConfig.SP_LEVEL_20; v1.C_NON_FOKKER_LAST_LEVEL_ID = config.levels.WorldConfig.SP_LEVEL_19; v1.C_FOKKER_LAST_LEVEL_ID = config.levels.WorldConfig.SP_LEVEL_20; v1.C_LEVELS_COUNT = config.levels.WorldConfig.LevelInfoArray.length; ASSetPropFlags(config.levels.WorldConfig.prototype, null, 1); } #endinitclip } movieClip 1685 __Packages.enums.PlaneTypes { #initclip if (!_global.enums) { _global.enums = new Object(); } if (!_global.enums.PlaneTypes) { var v1 = function () {}; enums.PlaneTypes = v1; var v2 = v1.prototype; v1.isPlaneWithHardMode = function (planeType) { var v1; var v2; v2 = enums.PlaneTypes.C_PLANE_WITH_HARD_MODE.length; v1 = 0; while (v1 < v2) { if (enums.PlaneTypes.C_PLANE_WITH_HARD_MODE[v1] == planeType) { return true; } ++v1; } return false; }; v1.getPlaneInfo = function (id, infoType) { return enums.PlaneTypes.PlaneInfoList[id][infoType]; }; v1.getPlaneClip = function (id) { return enums.PlaneTypes.C_PLAYER_PLANE_CLIP_NAME[id]; }; v1.isPlaneDefaultlyLocked = function (id) { return enums.PlaneTypes.C_PLANE_DEFAULT_LOCKED[id]; }; v1.COUNT = 7; v1.CAMEL = 0; v1.HANRIOT = 1; v1.PFALZ = 2; v1.ALBATROS = 3; v1.SPAD_7 = 4; v1.SPAD_13 = 5; v1.FOKKER = 6; v1.C_INFO_PLANE_NAME = 0; v1.C_INFO_PILOT_NAME = 1; v1.C_INFO_PLANE_CLIP = 2; v1.C_INFO_PLANE_ATTR_CLIP = 3; v1.C_INFO_PILOT_CLIP = 4; v1.C_INFO_PLANE_DESC = 5; v1.C_INFO_PILOT_DESC = 6; v1.PlaneInfoList = [['Sopwith Camel', 'Donald MacLaren', 'S_PLANE_CAMEL', 'S_PILOT_1', 'S_PILOT_MACLAREN', 'An agile, highly maneuverable and universal biplane. As one of the most successful flying machines of the World War I, the Sopwith F.1 Camel accounted for more aerial victories than any other Allied aircraft.', 'MacLaren a Canadian ace joined the Royal Flying Corps in 1917. With 54 victories, he was the highest scoring ace to fly the Sopwith Camel.'], ['Hanriot HD1', 'Silvio Scaroni', 'S_PLANE_HANRIOT', 'S_PILOT_1', 'S_PILOT_SCARONI', 'Designed by Pierre Dupont in 1916. This airplane was rejected by French Air Service at the end of 1916 only to become a standard Belgian and Italian fighter of World War I. Its lack of speed is compensated with sturdiness reliability and agility.', 'Silvio Scaroni entered the Italian Air Service in 1915. Once he was equipped with the Hanriot HD.1, he scored many victories and become the highest scoring ace in his squadron and in all of Italy.'], ['Pfalz D.III', 'Ernst Udet', 'S_PLANE_PFALZ', 'S_PILOT_1', 'S_PILOT_UDET', 'This German designed aircraft was introduced into air service in August 1917. Compared to other aircrafts Pfalz D.III is not a great fighter but is reliable and very fast in a dive. During World War I it was mainly used for attacking and destroying observation balloons with great success.', 'At first this German ace served as a messenger. He learned to fly by taking private lessons and became one of the most talented pilots of the German Air Force. He is the highest scoring German ace to survive World War I.'], ['Albatros D.III', 'Godwin Brumowski', 'S_PLANE_ALBATROS', 'S_PILOT_1', 'S_PILOT_BRUMOWSKI', 'This machine was designed in Germany and frequently used by Austrian-Hungarian Air Service. Despite the fact that it cannot compete with other fighters in speed, it is an agile and heavily armed aircraft.', 'Brumowski is the Austro-Hungarian Empire\'s highest scoring ace. Recognized as an extraordinary leader, he was given command of all Austro-Hungarian fighter squadrons. Due to his albatros painting, his squadron was easily recognizable and fearsome to oponent pilots.'], ['SPAD S.VII', 'Rene Fonck', 'S_PLANE_SPAD_7', 'S_PILOT_1', 'S_PILOT_FONCK', 'Units at the front of World War I were equipped with SPAD VII. in August 1916. It is an above average fighter that is durable and fast, but difficult to shoot down. It was flown by almost all French aces.', 'Rene is the highest scoring ace for France and Allies in World War I period. This very talented pilot gained his reputation for studying the tactics of his oponents and conserving his ammunition during a dogfight.'], ['SPAD S.XIII', 'Edward Rickenbacker', 'S_PLANE_SPAD_13', 'S_PILOT_1', 'S_PILOT_RICKENBACKER', 'A very powerfull and fast fighter of the late World War I period, however, it is difficult to fly by unexperienced pilots. Only seasoned aces were able to tame this excellent machine.', 'As a pilot awarded with a Medal of Honor, Edward Rickenbacker is the American \'Ace of Aces\'. A talented pilot who recorded several official victories against German air forces during World War I.'], ['Fokker Dr.I.', 'Manfred von Richthoffen', 'S_PLANE_FOKKER', 'S_PILOT_1', 'S_PILOT_RICHTHOFFEN', 'The legendary triplane fighter is not so fast as contemporary biplanes but it can easily outclimb any other airplane. Low weight, high maneuverability, and unique design make it an outstanding plane in a dogfight.', 'The most famous ace of the World War I period. Manfred von Richthofen better known as \'Red Baron\' or \'Red Devil\' scored the most victories of all aces. He was shot down as he flew over the trenches in pursuit of Wilfrid May on 21 April 1918. But many people believe that he is still alive...']]; v1.C_PLAYER_PLANE_CLIP_NAME = ['S_PLANE_CAMEL_LEFT', 'S_PLANE_HENRIOT_LEFT', 'S_PLANE_PFALZ_LEFT', 'S_PLANE_ALBATROS_3_LEFT', 'S_PLANE_SPAD_7_LEFT', 'S_PLANE_SPAD_13_LEFT', 'S_PLANE_FOKKER_LEFT']; v1.C_PLAYER_PLANE_COLOR = [Const.C_COLOR_BROWN, Const.C_COLOR_ORANGE, Const.C_COLOR_WHITE, Const.C_COLOR_BLUE, Const.C_COLOR_GREEN, Const.C_COLOR_BLACK, Const.C_COLOR_RED]; v1.C_PLANE_DEFAULT_LOCKED = [false, false, false, false, true, true, true]; v1.C_PLANE_WITH_HARD_MODE = [enums.PlaneTypes.SPAD_7, enums.PlaneTypes.SPAD_13, enums.PlaneTypes.FOKKER]; ASSetPropFlags(enums.PlaneTypes.prototype, null, 1); } #endinitclip } movieClip 1686 __Packages.AirPlaneFSM { #initclip if (!_global.AirPlaneFSM) { var v1 = function () {}; _global.AirPlaneFSM = v1; var v2 = v1.prototype; v2.InitPlaneStateMachine = function () { this.__planeTransitionCount = 0; this.__planeStateTransitions = new Array(); this.__planeStateTransitions.push(new Array()); this.__planeStateTransitions[this.__planeTransitionCount].push(enums.PlaneStates.INIT); this.__planeStateTransitions[this.__planeTransitionCount].push(enums.PlaneStates.ROLLING); ++this.__planeTransitionCount; this.__planeStateTransitions.push(new Array()); this.__planeStateTransitions[this.__planeTransitionCount].push(enums.PlaneStates.ROLLING); this.__planeStateTransitions[this.__planeTransitionCount].push(enums.PlaneStates.FLYING); ++this.__planeTransitionCount; this.__planeStateTransitions.push(new Array()); this.__planeStateTransitions[this.__planeTransitionCount].push(enums.PlaneStates.ROLLING); this.__planeStateTransitions[this.__planeTransitionCount].push(enums.PlaneStates.EXPLODING); ++this.__planeTransitionCount; this.__planeStateTransitions.push(new Array()); this.__planeStateTransitions[this.__planeTransitionCount].push(enums.PlaneStates.FLYING); this.__planeStateTransitions[this.__planeTransitionCount].push(enums.PlaneStates.BREAKDOWN); ++this.__planeTransitionCount; this.__planeStateTransitions.push(new Array()); this.__planeStateTransitions[this.__planeTransitionCount].push(enums.PlaneStates.FLYING); this.__planeStateTransitions[this.__planeTransitionCount].push(enums.PlaneStates.BULLETHIT); ++this.__planeTransitionCount; this.__planeStateTransitions.push(new Array()); this.__planeStateTransitions[this.__planeTransitionCount].push(enums.PlaneStates.FLYING); this.__planeStateTransitions[this.__planeTransitionCount].push(enums.PlaneStates.EXPLODING); ++this.__planeTransitionCount; this.__planeStateTransitions.push(new Array()); this.__planeStateTransitions[this.__planeTransitionCount].push(enums.PlaneStates.BREAKDOWN); this.__planeStateTransitions[this.__planeTransitionCount].push(enums.PlaneStates.FLYING); ++this.__planeTransitionCount; this.__planeStateTransitions.push(new Array()); this.__planeStateTransitions[this.__planeTransitionCount].push(enums.PlaneStates.BREAKDOWN); this.__planeStateTransitions[this.__planeTransitionCount].push(enums.PlaneStates.BULLETHIT); ++this.__planeTransitionCount; this.__planeStateTransitions.push(new Array()); this.__planeStateTransitions[this.__planeTransitionCount].push(enums.PlaneStates.BREAKDOWN); this.__planeStateTransitions[this.__planeTransitionCount].push(enums.PlaneStates.EXPLODING); ++this.__planeTransitionCount; this.__planeStateTransitions.push(new Array()); this.__planeStateTransitions[this.__planeTransitionCount].push(enums.PlaneStates.BULLETHIT); this.__planeStateTransitions[this.__planeTransitionCount].push(enums.PlaneStates.EXPLODING); ++this.__planeTransitionCount; this.__planeStateTransitions.push(new Array()); this.__planeStateTransitions[this.__planeTransitionCount].push(enums.PlaneStates.EXPLODING); this.__planeStateTransitions[this.__planeTransitionCount].push(enums.PlaneStates.INIT); ++this.__planeTransitionCount; this.__planeStateTransitions.push(new Array()); this.__planeStateTransitions[this.__planeTransitionCount].push(enums.PlaneStates.INIT); this.__planeStateTransitions[this.__planeTransitionCount].push(enums.PlaneStates.END); ++this.__planeTransitionCount; this.__planeStateTransitions.push(new Array()); this.__planeStateTransitions[this.__planeTransitionCount].push(enums.PlaneStates.ROLLING); this.__planeStateTransitions[this.__planeTransitionCount].push(enums.PlaneStates.END); ++this.__planeTransitionCount; this.__planeStateTransitions.push(new Array()); this.__planeStateTransitions[this.__planeTransitionCount].push(enums.PlaneStates.FLYING); this.__planeStateTransitions[this.__planeTransitionCount].push(enums.PlaneStates.END); ++this.__planeTransitionCount; this.__planeStateTransitions.push(new Array()); this.__planeStateTransitions[this.__planeTransitionCount].push(enums.PlaneStates.BREAKDOWN); this.__planeStateTransitions[this.__planeTransitionCount].push(enums.PlaneStates.END); ++this.__planeTransitionCount; this.__planeStateTransitions.push(new Array()); this.__planeStateTransitions[this.__planeTransitionCount].push(enums.PlaneStates.BULLETHIT); this.__planeStateTransitions[this.__planeTransitionCount].push(enums.PlaneStates.END); ++this.__planeTransitionCount; this.__planeStateTransitions.push(new Array()); this.__planeStateTransitions[this.__planeTransitionCount].push(enums.PlaneStates.EXPLODING); this.__planeStateTransitions[this.__planeTransitionCount].push(enums.PlaneStates.END); ++this.__planeTransitionCount; this.__planeCurrentState = enums.PlaneStates.INIT; this.__planePreviousState = -1; this.__isCollidingWithPlanes = false; this.__isCollidingWithBonus = false; this.__isCollidingWithBullets = false; this.__isRotateControlEnabled = false; this.__isFireControlEnabled = false; this.__isTakeOffControlEnabled = true; this.__lastHitTimer = new Timer(this.C_LAST_HIT_TIME_ELAPSE); this.__lastAttackerPlaneObj = undefined; this.__lastHitWeaponId = -1; }; v2.storeLastHit = function (lastAttackerPlaneObj, weaponId) { this.__lastHitTimer.StopTimer(); this.__lastHitTimer.StartTimer(); this.__lastAttackerPlaneObj = lastAttackerPlaneObj; this.__lastHitWeaponId = weaponId; }; v2.evaluateLastHit = function () { if (this.__lastHitTimer.isTimerStarted() && !this.__lastHitTimer.TimeIntervalElapsed()) { if (this.__planePreviousState == enums.PlaneStates.BREAKDOWN && this.__planeCurrentState == enums.PlaneStates.EXPLODING && enums.ItemTypes.isStallingWeapon(this.__lastHitWeaponId)) { if (this.__lastAttackerPlaneObj != undefined) { this.__lastAttackerPlaneObj.ScoreAddKills(this.getObstacleType()); } } } this.__lastAttackerPlaneObj = undefined; this.__lastHitWeaponId = -1; }; v2.isStateTransitionAllowed = function (oldState, newState) { var v2; v2 = 0; while (v2 < this.__planeTransitionCount) { if (this.__planeStateTransitions[v2][0] == oldState && this.__planeStateTransitions[v2][1] == newState) { return true; } ++v2; } return false; }; v2.ChangePlaneState = function (newState) { if (!this.isStateTransitionAllowed(this.__planeCurrentState, newState)) { return undefined; } this.__planePreviousState = this.__planeCurrentState; this.__planeCurrentState = newState; this.ExecActionsOfPlaneStateTransitions(); if (this.__isAIControlled) { this.__AIAgent.ForceChangeState(newState); } }; v2.ExecActionsOfPlaneStateTransitions = function () {}; v2.InitCentrifugalVariables = function () { this.__velCentrif = new Vector2D(0, 0); this.__accCentrifDir = new Vector2D(0, 0); this.__velCentrifSize = 0; }; v2.ComputeCentrifugalAcceleration = function (alpha, direction, inDirectionVelocity) { if (this.__isRotateDisabledDueToScrollNoWrap) { return undefined; } this.__accCentrifDir.setXY(direction.__y, -1 * direction.__x); var v2; v2 = Math.PI * alpha * inDirectionVelocity / 180 * this.__mass; this.__velCentrifSize += v2; }; v2.ComputeCentrifugalVelocity = function () { if (this.__isRotateDisabledDueToScrollNoWrap) { return undefined; } this.__velCentrif.setVec(this.__accCentrifDir); this.__velCentrif.Multiply(this.__velCentrifSize); this.__velCentrifSize /= this.__mass; }; v2.ResetCentrifugalVariables = function () { this.__velCentrif.setXY(0, 0); this.__accCentrifDir.setXY(0, 0); this.__velCentrifSize = 0; }; v2.getObstacleType = function () { return this.__obstacleType; }; v2.getTargetType = function () { return this.__targetType; }; v2.InitMouseControls = function () { this.__mouseCross = LayMan.RegisterClip('S_MOUSE_CROSSHAIR', LayMan.C_S_LAST_LAYER_GROUP); this.__mouseListener = new Object(); this.__mouseListener.onMouseDown = mx.utils.Delegate.create(this, this.MouseBtnDownAction); this.__mouseListener.onMouseUp = mx.utils.Delegate.create(this, this.MouseBtnUpAction); this.__mouseCross.onEnterFrame = mx.utils.Delegate.create(this, this.UpdatePlaneControlDecision); Mouse.addListener(this.__mouseListener); Mouse.hide(); }; v2.MouseBtnDownAction = function () { this.__isMouseBtnLeftPressed = true; }; v2.MouseBtnUpAction = function () { this.__isMouseBtnLeftPressed = false; }; v2.isMouseBtnPressed = function () { if (this.__mouseListener == undefined) { return false; } return this.__isMouseBtnLeftPressed; }; v2.UpdatePlaneControlDecision = function () { this.__mouseCross._x = _root._xmouse; this.__mouseCross._y = _root._ymouse; var v4; var v3; v4 = this.__direction.getAlphaDeg(); var v5; v5 = new Vector2D(_root._xmouse, _root._ymouse); v5.SubXY(this.__x, this.__y); var v9 = v5.__x; var v8 = this.__direction.__x; var v10 = this.__direction.__y; v3 = v5.getAlphaDeg(); if (v4 < 0) { v4 = 360 + v4; } if (v3 < 0) { v3 = 360 + v3; } var v7; v7 = v5.Length(); var v6; v6 = 0.25 + 2 * UtilMath.getIndirectRatioFncValue(v7, 50, 300); v6 = 2; if (Math.abs(v4 - v3) < v6) { this.__controlDecisionResult = 0; return undefined; } if (this.isTurnRadiusDangerous() && Math.abs(v3 - v4) > 90 && this.__planeCurrentState == enums.PlaneStates.FLYING) { if (v8 > 0) { this.__controlDecisionResult = 1; } else { this.__controlDecisionResult = 2; } return undefined; } if (v3 > v4) { if (Math.abs(v3 - v4) > 180) { this.__controlDecisionResult = 1; } else { this.__controlDecisionResult = 2; } return undefined; } else { if (Math.abs(v3 - v4) > 180) { this.__controlDecisionResult = 2; return undefined; } this.__controlDecisionResult = 1; return undefined; } }; v2.isCCWTurning = function () { if (this.__controlDecisionResult == 1) { return true; } else { return false; } }; v2.isCWTurning = function () { if (this.__controlDecisionResult == 2) { return true; } else { return false; } }; v2.DestroyMouse = function () { if (this.__mouseListener != undefined) { Mouse.show(); Mouse.removeListener(this.__mouseListener); delete this.__mouseListener; LayMan.RemoveClip(this.__mouseCross); } }; v2.getGroupId = function () { return this.__groupId; }; v2.InitGrpFlag = function (clip) { if (GrpMan.getIsGroupColorShowed() && this.__groupId != GrpMan.C_DEFAULT_GROUP_ID) { var v2; v2 = GrpMan.getGroupColor(this.__groupId); LayMan.SetTint(clip.grpFlag, v2, 100); clip.grpFlag.gotoAndPlay('F_BEGIN'); } }; v2.isGroundCollision = function () { if (this.__y > Const.C_SCENE_HEIGHT - 30) { return true; } else { return false; } }; v2.setTxtFieldFormat = function () { var v2; v2 = new TextFormat(); v2.color = 16777215; v2.size = AirPlaneFSM.C_LIVES_FONT_SIZE; v2.bold = true; v2.font = 'Arial'; this.__livesTextField.setTextFormat(v2); }; v2.InitLivesTextField = function (numOfLives) { var v2; var v3; v2 = LayMan.RegisterEmptyClip('', LayMan.C_S_OTHER); v3 = LayMan.GetDepthIndex(LayMan.C_S_OTHER); this.__livesTextField = LayMan.CreateTextField(this.__x - 20, Const.C_DEFAULT_Y_POS + 13, 50, 50, LayMan.C_S_OTHER); this.__livesTextField.selectable = false; this.__livesTextField.type = 'dynamic'; this.__livesTextField.text = AirPlaneFSM.C_LIVES_PREFIX + String(numOfLives); this.setTxtFieldFormat(); }; v2.CheckScreenBordersWrap = function () { if (this.__x > Const.C_SCENE_WIDTH) { this.__x = 0; } if (this.__x < 0) { this.__x = Const.C_SCENE_WIDTH; } if (this.__y < 0) { this.__y = 0; } }; v2.setCVelocities = function (speedAttribValue) { this.c_normalVelocity = PlaneConfig.C_SPEED_STEPS[speedAttribValue]; this.c_startingVelocity = this.c_normalVelocity + this.c_normalVelocity * 0.2; this.c_minimalVelocity = PlaneConfig.C_SPEED_STEPS[0] / 2; }; v2.getCMinVelocity = function () { return this.c_minimalVelocity; }; v2.getCNormalVelocity = function () { return this.c_normalVelocity; }; v2.getCRotationStep = function () { return this.c_rotationStep; }; v2.getCGunCooldownCoef = function () { return this.c_gunCooldownCoef; }; v2.setCRotationStep = function (agilityAttribValue) { this.c_rotationStep = PlaneConfig.C_AGILITY_STEPS[agilityAttribValue]; this.__rotationStep = this.c_rotationStep; }; v2.setCGunCooldownCoef = function (firepowerAttribValue) { this.c_gunCooldownCoef = PlaneConfig.C_COOLDOWN_COEF_STEPS[firepowerAttribValue]; }; v2.setCThrust = function (thrustAttribValue) { this.c_engineThrust = PlaneConfig.C_THRUST_STEPS[thrustAttribValue]; }; v2.setCMaxHitsToComponent = function (armorAttribValue) { this.c_maxHitsToComponent = PlaneConfig.C_ARMOUR_STEPS[armorAttribValue]; }; v2.InitWeaponsArray = function (planeConfig, firepowerCoefAttribute, skyType, parentObj) { this.__weaponsArray = new Array(); var v3; var v4; v4 = planeConfig.getBuyedItemList(); var v2; var v9; v9 = v4.length; var v5; v2 = 0; while (v2 < v9) { v5 = String(enums.ItemTypes.getItemInfo(v4[v2], enums.ItemTypes.CLASS)); if (v5 == enums.ItemTypes.CLASS_PRIMARY_WEAPON) { ++this.__weaponsPrimaryCount; v3 = new entities.weapons.Weapon(v4[v2], this.__weaponsPrimaryCount, parentObj, this.__myWorld, firepowerCoefAttribute, skyType); this.__weaponsArray.push(v3); } if (v5 == enums.ItemTypes.CLASS_SECONDARY_WEAPON) { ++this.__weaponsSecondaryCount; v3 = new entities.weapons.Weapon(v4[v2], this.__weaponsSecondaryCount, parentObj, this.__myWorld, firepowerCoefAttribute, skyType); this.__weaponsArray.push(v3); } ++v2; } this.__weaponsCount = this.__weaponsArray.length; }; v2.ApplyPlaneConfigToThePlane = function (planeConfig, skyType, parentObj) { this.ApplyAttributesOnPlane(planeConfig); this.InitWeaponsArray(planeConfig, this.getCGunCooldownCoef(), skyType, parentObj); this.InitDevicesArray(planeConfig, skyType, parentObj); this.ApplyDeviceEffects(planeConfig); }; v2.ApplyAttributesOnPlane = function (planeConfig) { var v2; v2 = planeConfig.getPlaneAttribute(PlaneConfig.C_ATTR_FIREPOWER); this.setCGunCooldownCoef(v2); v2 = planeConfig.getPlaneAttribute(PlaneConfig.C_ATTR_SPEED); this.setCVelocities(v2); v2 = planeConfig.getPlaneAttribute(PlaneConfig.C_ATTR_AGILITY); this.setCRotationStep(v2); v2 = planeConfig.getPlaneAttribute(PlaneConfig.C_ATTR_THRUST); this.setCThrust(v2); v2 = planeConfig.getPlaneAttribute(PlaneConfig.C_ATTR_ARMOUR); this.setCMaxHitsToComponent(v2); }; v2.ApplyDeviceEffects = function (planeConfig) { var v5; var v3; v3 = planeConfig.getBuyedItemList(); var v1; var v4; v4 = v3.length; var v2; v1 = 0; while (v1 < v4) { v2 = String(enums.ItemTypes.getItemInfo(enums.ItemTypes.CLASS)); if (v2 == enums.ItemTypes.CLASS_DEVICE) { v5 = v3[v1]; } ++v1; } }; v2.SetCooldownOnWeapon = function (cooldownType, howMany) { if (howMany == undefined) { howMany = this.__planeDamage.getDamageHits(enums.DamageTypes.GUN); } var v2; v2 = 0; while (v2 < this.__weaponsCount) { this.__weaponsArray[v2].SetCooldownOnWeapon(cooldownType, howMany); ++v2; } }; v2.InitDevicesArray = function (planeConfig, skyType, parentObj) { this.__devicesArray = new Array(); var v10; v10 = planeConfig.getBuyedItemList(); var v2; var v12; v12 = v10.length; var v11; v2 = 0; while (v2 < v12) { v11 = String(enums.ItemTypes.getItemInfo(v10[v2], enums.ItemTypes.CLASS)); if (v11 == enums.ItemTypes.CLASS_DEVICE) { switch (v10[v2]) { case enums.ItemTypes.EMERGENCY_PARACHUTE: var v7; v7 = new entities.devices.EmergencyParachute(parentObj, this.__myWorld, skyType); this.__devicesArray.push(v7); break; case enums.ItemTypes.GAUSS_ACCELERATOR: this.UpgradeWeapon(enums.ItemTypes.MACHINE_GUN); this.UpgradeWeapon(enums.ItemTypes.TWIN_MACHINE_GUN); this.UpgradeWeapon(enums.ItemTypes.TAIL_GUN); this.UpgradeWeapon(enums.ItemTypes.BURST_GUN); break; case enums.ItemTypes.GUIDANCE_SYSTEM: this.UpgradeWeapon(enums.ItemTypes.HOMING_MISSILES); break; case enums.ItemTypes.PROXIMITY_DETECTOR: this.UpgradeWeapon(enums.ItemTypes.IMPACT_BOMBS); break; case enums.ItemTypes.BONUS_XRAY: var v8; v8 = this.__myWorld.getBonusObj(); v8.ShowBonusContentXRay(); break; case enums.ItemTypes.AUTO_REPAIR_PACK: var v6; v6 = new entities.devices.AutoRepairPack(parentObj, this.__myWorld, skyType); this.__devicesArray.push(v6); break; case enums.ItemTypes.TARGETTING_SYSTEM: var v5; v5 = new entities.devices.TargettingSystem(parentObj, this.__myWorld, skyType); this.__devicesArray.push(v5); break; case enums.ItemTypes.MAGNETIC_DEFLECTOR: var v9; v9 = new entities.devices.MagneticDeflector(parentObj, this.__myWorld, skyType); this.__devicesArray.push(v9); } } ++v2; } this.__devicesCount = this.__devicesArray.length; }; v2.UpgradeWeapon = function (id) { var v2; v2 = 0; while (v2 < this.__weaponsCount) { if (this.__weaponsArray[v2].getItemId() == id) { this.__weaponsArray[v2].UpgradeWeapon(); } ++v2; } }; v2.DevicesExecuteNow = function (deviceId) { var v2; if (deviceId == undefined) { v2 = 0; while (v2 < this.__devicesCount) { this.__devicesArray[v2].ExecuteNow(); ++v2; } } else { v2 = 0; while (v2 < this.__devicesCount) { if (this.__devicesArray[v2].getDeviceId() == deviceId) { this.__devicesArray[v2].ExecuteNow(); return undefined; } ++v2; } } }; v2.isPlanefacedDown = function () { if (this.__face_right_orientation == true) { if (this.__clip._rotation >= 75 && this.__clip._rotation <= 105) { return true; } } else { if (this.__clip._rotation >= -105 && this.__clip._rotation <= -75) { return true; } } }; v2.isPlanefacedUp = function () { var v2; v2 = -1 * this.__direction.__y; if (v2 >= Const.C_SINUS_FACED_UP_TRESHOLD) { return true; } else { return false; } }; v2.UpdateFlipPlane = function (GFX) { var v4 = this.__direction.__x; var v2; var v3; if (this.__xDirOld >= 0 && v4 < 0) { v3 = true; } else { v3 = false; } if (this.__xDirOld <= 0 && v4 > 0) { v2 = true; } else { v2 = false; } if (v2 || v3) { this.__planeFlipTimer.StopTimer(); this.__planeFlipTimer.StartTimer(); } if (this.__planeFlipTimer.isTimerStarted() && this.__planeFlipTimer.TimeIntervalElapsed()) { this.__planeFlipTimer.StopTimer(); this.FlipPlane(false, GFX); } this.__xDirOld = this.__direction.__x; }; v2.FlipPlane = function (isInit, GFX) { var v3; v3 = this.__clip._yscale; var v2 = this.__direction.__x; if (this.__face_right_orientation) { if (v2 < 0 && this.__clip._yscale > 0) { this.__clip._yscale = -1 * this.__clip._yscale; } if (v2 > 0 && this.__clip._yscale < 0) { this.__clip._yscale = -1 * this.__clip._yscale; } } else { if (v2 > 0 && this.__clip._yscale > 0) { this.__clip._yscale = -1 * this.__clip._yscale; } if (v2 < 0 && this.__clip._yscale < 0) { this.__clip._yscale = -1 * this.__clip._yscale; } } this.__boundingBoxClip._yscale = this.__clip._yscale; this.__boundingBoxBulletsClip._yscale = this.__clip._yscale; if (isInit) { return undefined; } if (v3 != this.__clip._yscale) { this.__clip.gotoAndPlay('F_TOP'); GFX.SyncWithFlipPlane(); } }; v2.getInArenaPositionX = function () { return this.__x - this.__myWorld.getScrollOriginX(); }; v2.getInArenaPositionY = function () { return this.__clip._y; }; v2.getRotationCircleRadius = function () { var v3; v3 = UtilMath.DegToRad(this.__rotationStep); var v2; v2 = 0.5 * this.__inDirectionVelocity / Math.sin(v3); return v2; }; v2.isTurnRadiusDangerous = function () { var v4; v4 = this.getAltitude(); var v2; v2 = this.getRotationCircleRadius(); v2 *= 1.25; UtilShapes.DrawCircle(World.dmc, this.__x, this.__y + v2, v2, 43520); var v3; v3 = v4 - 2 * v2; if (v3 < 0) { return true; } else { return false; } }; v2.getAltitude = function () { return Const.C_DEFAULT_Y_POS - this.__y; }; v2.getAIAgent = function () { return this.__AIAgent; }; v2.isSafeToTurnCCW = function () { var v3; v3 = this.__direction.__x; var v2; v2 = this.getAltitude(); if (v3 < 0 && v2 < 10) { return false; } return true; }; v2.isSafeToTurnCW = function () { var v3; v3 = this.__direction.__x; var v2; v2 = this.getAltitude(); if (v3 > 0 && v2 < 10) { return false; } return true; }; v2.InitForceRollingClock = function (isAIControlled, xpos, ypos) { if (!isAIControlled) { this.__forceRollingClock = new entities.other.GameClock(Const.C_FORCE_ROLING_TIME / 1000, false, xpos - 53, ypos - 273, 103, 15, 'center', false, 'S_PLANE_ROLL_FORCE_CLOCK', 200); this.__forceRollingClock.SetColors(Const.C_COLOR_WHITE, Const.C_COLOR_WHITE, Const.C_COLOR_WHITE); this.__forceRollingClock.SetTimeText('Autolaunch\n'); this.__forceRollingClock.addEventListener(entities.other.GameClock.EVT_TIMEOUT, mx.utils.Delegate.create(this, this.ForceToRolling)); this.__forceRollingClock.Start(); } else { this.__forceRollingClock = undefined; } }; v2.ForceToRolling = function (evt) { this.__clip.airscrew.play(); this.__SFX.PlayEngineStart(); this.__forceRollingTimer.StopTimer(); this.__forceRollingClock.Stop(); this.ChangePlaneState(enums.PlaneStates.ROLLING); }; v2.InitPlaneOutOfScreenTimer = function () { this.__planeOutOfScreenTimer = new Timer(this.C_PLANE_OUT_OF_SCREEN_LIMIT); }; v2.CheckOutOfScreenTimer = function () { if (this.__planeOutOfScreenTimer.isTimerStarted() && this.__planeOutOfScreenTimer.TimeIntervalElapsed()) { this.ChangePlaneState(enums.PlaneStates.BREAKDOWN); } }; v2.SendAllStatsToPortal = function () { this.__score.SendAllStatsToPortal(); }; v2.Pause = function (evtObj) { if (evtObj.state == true) { if (this.__clip._visible) { } } else { if (this.__clip._visible) { } } }; v2.EnableRender = function () {}; v2.DisableRender = function () {}; v2.getKeyControlType = function () { return this.__keyControlType; }; v2.getPlaneType = function () { return this.__planeType; }; v2.SetAchPilotKiller = function () { if (this.__isFirstPilotHit && !this.__isAIControlled) { WebApi.UnlockAchievement(WebApi.C_ACH_TYPE_OTHER, WebApi.C_ACH_OTHER_PILOTHIT); this.__isFirstPilotHit = false; } }; v2.C_CRITICAL_VELOCITY_REACH_STALL_TYPE = 0; v2.C_EMP_HIT_STALL_TYPE = 1; v2.C_MALICIOUS_PARACHUTE_HIT_STALL_TYPE = 2; v2.C_ACOUSTIC_RIFLE_HIT_STALL_TYPE = 3; v2.C_CRITICAL_VELOCITY_REACH_STALL_TIME = 1000; v2.C_EMP_HIT_STALL_TIME = 500; v2.C_MALICIOUS_PARACHUTE_HIT_STALL_TIME = 1000; v2.C_ACOUSTIC_RIFLE_HIT_STALL_TIME = 1000; v1.C_LIVES_PREFIX = 'x'; v1.C_LIVES_FONT_SIZE = 18; v2.__velCentrifSize = 0; v2.__mass = 1.125; v2.__isPhysXEnabled = true; v2.__weaponsPrimaryCount = 0; v2.__weaponsSecondaryCount = 0; v2.C_LAST_HIT_TIME_ELAPSE = 10000; v2.__isMouseBtnLeftPressed = false; v2.__controlDecisionResult = 0; v2.C_PLANE_FLIP_TIME = 1000; v2.__xDirOld = 0; v2.C_FORCE_ROLLING_CLOCK_CLIP_NAME = ''; v2.C_PLANE_OUT_OF_SCREEN_LIMIT = 10000; v2.__isFirstBreakDown = true; v2.__isFirstRestart = true; v2.__isFirstSuicide = true; v2.__isFirstPilotHit = true; ASSetPropFlags(_global.AirPlaneFSM.prototype, null, 1); } #endinitclip } movieClip 1687 __Packages.UtilMath { #initclip if (!_global.UtilMath) { var v1 = function () { var v1; var v3; var v2; v1 = 0; while (v1 < UtilMath.C_CIRCLE) { v3 = Math.sin(UtilMath.DegToRad(v1)); UtilMath.SinValueArray.push(v3); ++UtilMath.sinArraySize; v2 = Math.cos(UtilMath.DegToRad(v1)); UtilMath.CosValueArray.push(v2); ++UtilMath.cosArraySize; v1 += UtilMath.C_MIN_DEGREE_STEP; } }; _global.UtilMath = v1; var v2 = v1.prototype; v1.DegToRad = function (degree) { return Math.PI * degree / 180; }; v1.RadToDeg = function (radian) { return 180 * (radian / Math.PI); }; v1.Sin = function (deg) { deg |= 0; deg %= UtilMath.C_CIRCLE; if (deg < 0) { deg += 360; } return UtilMath.SinValueArray[deg]; }; v1.Cos = function (deg) { deg |= 0; deg %= UtilMath.C_CIRCLE; if (deg < 0) { deg += 360; } return UtilMath.CosValueArray[deg]; }; v1.Tan = function (deg) { var v2; var v1; v2 = UtilMath.Sin(deg); v1 = UtilMath.Cos(deg); if (v1 == 0) { return 1.0e+021; } else { return v2 / v1; } }; v1.padString = function (_str, _n, _pStr) { var v6 = _str; if (_pStr == undefined || _pStr == null || _pStr.length < 1) { _pStr = ' '; } if (_str.length < _n) { var v4 = ''; var v1 = 0; while (v1 < _n - _str.length) { v4 += _pStr; ++v1; } v6 = v4 + _str; } return v6; }; v1.getDirectRatioFncValue = function (x, RaisingFrom, RaisingTo) { var v1; var v2; if (x <= RaisingFrom) { return 0; } if (x >= RaisingTo) { return 1; } v2 = 1 / (RaisingTo - RaisingFrom); v1 = v2 * (x - RaisingFrom); return v1; }; v1.getIndirectRatioFncValue = function (x, FallingFrom, FallingTo) { var v1; var v2; if (x <= FallingFrom) { return 1; } if (x >= FallingTo) { return 0; } v2 = 1 / (FallingTo - FallingFrom); v1 = -1 * v2 * (x - FallingTo); return v1; }; v1.getRandomNaturalNumber = function (minValue, maxValue) { var v1; v1 = minValue + Math.round((maxValue - minValue) * Math.random()); return v1; }; v1.getRandomSign = function () { var v1; v1 = Math.round(Math.random()); if (v1 == 0) { return -1; } else { return 1; } }; v1.Max = function (a, b) { var v1; if (a <= b) { v1 = b; return v1; } v1 = a; return v1; }; v1.Min = function (a, b) { var v1; if (a >= b) { v1 = b; return v1; } v1 = a; return v1; }; v1.Sqrt2 = function (X) { var v2 = X * 0.25; var v1; var v3; do { v3 = X / v2; v2 = (v2 + v3) * 0.5; v1 = v2 - v3; if (v1 < 0) { v1 = -v1; } } while (v1 > 0.1); return v2; }; v1.Floor = function (X) { return X | 0; }; v1.Round = function (X) { return X + 0.5 | 0; }; v1.C_MIN_DEGREE_STEP = 1; v1.C_CIRCLE = 360; v1.SinValueArray = []; v1.CosValueArray = []; v1.sinArraySize = 0; v1.cosArraySize = 0; ASSetPropFlags(_global.UtilMath.prototype, null, 1); } #endinitclip } movieClip 1688 __Packages.World { #initclip if (!_global.World) { var v1 = function (parentGame) { World.__instance = this; mx.events.EventDispatcher.initialize(this); this.sox = 0; this.soy = 0; this.__numOfPlanes = 0; this.__numOfAlivePlanes = 0; World.__numOfObstacles = 0; this.__numOfSkyCloudsFar = 0; this.__numOfSkyCloudsNear = 0; this.__parentGame = parentGame; this.__toggleMenu = this.__parentGame.getToggleMenu(); this.__toggleMenu.QuitBtnShow(); this.__gameConfig = this.__parentGame.getGameConfig(); this.__gameType = GameConfig.getGameType(); if (this.__gameType == enums.GameTypes.MULTIPLAYER) { this.__gameConfig.loadGame(); } this.__worldConfig = this.__parentGame.getWorldConfig(); this.setIsScrolling(this.__gameType); this.CreateWorldFromConfig(this.__worldConfig); this.__gameConfig.setWorldPointer(this); this.__planesControlsInfoArray = new Array(); this.__inGameHint = new Hint(MenuButton.C_RECT_BTN, '', 100, 100, 600, 100, MainMenu.C_BTN_FEATHER, 0, '???', MainMenu.C_LARGE_FONT_BORDER, true, LayMan.C_S_OTHER); this.__inGameHint.SetLabelFormat(16, false, 'center'); this.__inGameHint.SetMaxAlpha(50); this.__flyLabels = new FlyLabels(); this.InitWorldSounds(); this.__gameMusic = new Music(); this.addEventListener(World.EVT_GAME_OVER, mx.utils.Delegate.create(this, this.ShowGameOverDialog)); this.InitScrolling(); this.__worldConfig.WebApiSendLevelCompletionStats(this.singlePlayerPlaneObj, true); this.InitGameOverListeners(); this.__syncEmptyClip = LayMan.RegisterEmptyClip('', LayMan.C_S_OTHER); this.__syncEmptyClip.onEnterFrame = mx.utils.Delegate.create(this, this.Update); this.__secondsToDogfight = this.C_DEFAULT_HALFSEC_TO_COUNTDOWN; this.__countdownTimer = new Timer(500); this.__countdownTimer.StartTimer(); if (this.__gameConfig.isGamePaused()) { this.__gameConfig.UnPauseGame(true); } this.AddKeysListener(); if (AirPlane.C_DEBUG) { if (World.dmc == undefined) { World.dmc = LayMan.RegisterEmptyClip('mc_PlaneAI_debug_drawing_canvas', LayMan.C_S_OTHER); } } this.__restartLevelBtn = new MenuButton(MenuButton.C_CLIP_BTN, 'S_RESTART_LEVEL_BTN', 0, 0, 30, 30, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_SMALL_FONT_BORDER, false, LayMan.C_S_OTHER); this.__restartLevelBtn.SetHint('Restart level'); this.__restartLevelBtn.AllowFadeOutAfterClick(false); this.__restartLevelBtn.FadeIn(); this.__restartLevelBtn.addEventListener(MenuButton.EVT_CLICK, DelegatePlus.create(this, this.RestartLevel)); World.__isRedBaronAirshipDestroyed = false; }; _global.World = v1; var v2 = v1.prototype; v2.AddKeysListener = function () { this.KeyListener = new Object(); this.KeyListener.onKeyDown = mx.utils.Delegate.create(this, this.HandleKeyDown); Key.addListener(this.KeyListener); }; v2.HandleKeyDown = function (evtObj) { var v4; v4 = Key.getAscii(); var v2; v2 = Key.getCode(); if (v4 == 80 || v4 == 112) { if (this.__gameConfig.isGamePaused()) { this.__toggleMenu.QuitMsgBoxHide(); } else { this.__toggleMenu.QuitMsgBoxShow(); } } if (Const.C_ENABLE_CHEAT == true) { if (v4 == 43) { var v5; v5 = enums.GameOverReasons.SUCCESS; this.dispatchEvent({'target': this, 'type': World.EVT_GAME_OVER, 'gameOverType': enums.GameOverTypes.MISSION_COMPLETED, 'gameOverReason': v5}); this.RemoveGameOverListeners(); if (this.KeyListener != undefined) { Key.removeListener(this.KeyListener); delete this.KeyListener; } } var v3; if (v2 >= 48 && v2 <= 57) { if (Key.isDown(16)) { v3 = v2 - 48 + 10 - 1; } else { v3 = v2 - 48 - 1; } if (v2 == 48) { v3 += 10; } this.__worldConfig.SetLevel(v3); v5 = enums.GameOverReasons.SUCCESS; this.dispatchEvent({'target': this, 'type': World.EVT_GAME_OVER, 'gameOverType': enums.GameOverTypes.MISSION_COMPLETED, 'gameOverReason': v5}); this.RemoveGameOverListeners(); if (this.KeyListener != undefined) { Key.removeListener(this.KeyListener); delete this.KeyListener; } } } }; v2.InitWorldSounds = function () { this.__sndCountDownTickClip = LayMan.RegisterEmptyClip('', LayMan.C_S_OTHER); this.__sndCountDownTick = new Sound(this.__sndCountDownTickClip); this.__sndCountDownTick.attachSound(Const.C_COUNTDOWN_TICK_SND); this.__sndDogfightClip = LayMan.RegisterEmptyClip('', LayMan.C_S_OTHER); this.__sndDogfight = new Sound(this.__sndDogfightClip); this.__sndDogfight.attachSound(Const.C_DOGFIGHT_SND); }; v2.DetectCollisions = function () { var v6; var v4; var v2; var v3; var v5; var v7; v6 = 0; while (v6 < this.__numOfPlanes) { v3 = this.__planesArray[v6]; v3.HitTestPlaneByBonus(this.__bonusParachute); v2 = 0; while (v2 < World.__numOfObstacles) { World.__sceneObstaclesArray[v2].HitTestByPlanes(v3); ++v2; } v4 = v6 + 1; while (v4 < this.__numOfPlanes) { v5 = this.__planesArray[v4]; v3.HitTestPlaneByPlane(v5); v5.HitTestPlaneByPlane(v3); ++v4; } v3.HitTestPlaneByBullet2(World.mpArr, World.mpSize); ++v6; } v2 = 0; while (v2 < World.__numOfObstacles) { World.__sceneObstaclesArray[v2].HitTestByProjectiles2(World.mpArr, World.mpSize); ++v2; } }; v2.MoveSkyClouds = function () { var v2; v2 = 0; while (v2 < this.__numOfSkyCloudsFar) { this.__skyCloudsFarArray[v2].Move(); ++v2; } v2 = 0; while (v2 < this.__numOfSkyCloudsNear) { this.__skyCloudsNearArray[v2].Move(); ++v2; } }; v2.MoveObstacles = function () { var v1; v1 = 0; while (v1 < World.__numOfObstacles) { World.__sceneObstaclesArray[v1].Update(v1); ++v1; } }; v2.getPlanesArray = function () { return this.__planesArray; }; v2.getObstaclesArray = function () { return World.__sceneObstaclesArray; }; v2.getBonusObj = function () { return this.__bonusParachute; }; v2.InitGameOverListeners = function () { this.__primaryTargetsCount = 0; this.__secondaryTargetsCount = 0; this.__curPrimaryTargetsKilled = 0; this.__curSecondaryTargetsKilled = 0; this.__primaryAlliesCount = 0; this.__secondaryAlliesCount = 0; this.__curPrimaryAlliesKilled = 0; this.__curSecondaryAlliesKilled = 0; this.__isGameEnded = false; var v2; var v3; v2 = 0; while (v2 < this.__numOfPlanes) { v3 = this.__planesArray[v2].getTargetType(); this.IncTargetCount(v3); this.__planesArray[v2].addEventListener(AirPlane.EVT_UNIT_DESTROYED, mx.utils.Delegate.create(this, this.DetectGameOver)); ++v2; } v2 = 0; while (v2 < World.__numOfObstacles) { v3 = World.__sceneObstaclesArray[v2].getTargetType(); this.IncTargetCount(v3); World.__sceneObstaclesArray[v2].addEventListener(AirPlane.EVT_UNIT_DESTROYED, DelegatePlus.create(this, this.DetectGameOver)); ++v2; } }; v2.RemoveGameOverListeners = function () { var v2; var v3; v2 = 0; while (v2 < this.__numOfPlanes) { v3 = this.__planesArray[v2].getTargetType(); this.__planesArray[v2].removeEventListener(AirPlane.EVT_UNIT_DESTROYED, mx.utils.Delegate.create(this, this.DetectGameOver)); ++v2; } v2 = 0; while (v2 < World.__numOfObstacles) { v3 = World.__sceneObstaclesArray[v2].getTargetType(); this.IncTargetCount(v3); World.__sceneObstaclesArray[v2].removeEventListener(AirPlane.EVT_UNIT_DESTROYED, DelegatePlus.create(this, this.DetectGameOver)); ++v2; } if (this.__gameClock != undefined) { this.__gameClock.removeEventListener(entities.other.GameClock.EVT_TIMEOUT, mx.utils.Delegate.create(this, this.DetectGameOver)); } }; v2.IncTargetCount = function (targetType) { switch (targetType) { case enums.TargetTypes.PRIMARY: ++this.__primaryTargetsCount; break; case enums.TargetTypes.SECONDARY: ++this.__secondaryTargetsCount; break; case enums.TargetTypes.PRIMARY_ALLY: ++this.__primaryAlliesCount; break; case enums.TargetTypes.SECONDARY_ALLY: ++this.__secondaryAlliesCount; break; default: } }; v2.DetectGameOver = function (evtObj) { if (this.__isGameEnded) { return undefined; } this.DetectGroupDestroyed(); var v6; v6 = evtObj.target.isAIControlled(); if (evtObj.objType == enums.ObstacleTypes.AIRPLANE && v6 && this.__gameType == enums.GameTypes.INS_SINGLEPLAYER && evtObj.target.getPlaneType() == enums.PlaneTypes.FOKKER && evtObj.target.getPlaneIdx() == enums.PlaneStartPosTypes.AIRSHIP && World.__isRedBaronAirshipDestroyed && (GameConfig.getCurrentLevelId() == 19 || GameConfig.getCurrentLevelId() == 20)) { this.dispatchEvent({'target': this, 'type': World.EVT_GAME_OVER, 'gameOverType': enums.GameOverTypes.MISSION_COMPLETED, 'gameOverReason': enums.GameOverReasons.SUCCESS}); this.RemoveGameOverListeners(); } if (evtObj.objType == enums.ObstacleTypes.AIRPLANE && !v6 && this.__gameType != enums.GameTypes.MULTIPLAYER) { this.__isGameEnded = true; this.dispatchEvent({'target': this, 'type': World.EVT_GAME_OVER, 'gameOverType': enums.GameOverTypes.MISSION_FAILED, 'gameOverReason': enums.GameOverReasons.OUT_OF_LIVES}); this.RemoveGameOverListeners(); return undefined; } if (evtObj.type == entities.other.GameClock.EVT_TIMEOUT) { this.__isGameEnded = true; if (this.__gameClock.isTimeoutPositive()) { this.dispatchEvent({'target': this, 'type': World.EVT_GAME_OVER, 'gameOverType': enums.GameOverTypes.MISSION_COMPLETED, 'gameOverReason': enums.GameOverReasons.TIMEOUT_POSITIVE}); } else { this.dispatchEvent({'target': this, 'type': World.EVT_GAME_OVER, 'gameOverType': enums.GameOverTypes.MISSION_FAILED, 'gameOverReason': enums.GameOverReasons.TIMEOUT}); } this.RemoveGameOverListeners(); return undefined; } if (evtObj.targType == enums.TargetTypes.PRIMARY) { ++this.__curPrimaryTargetsKilled; } if (evtObj.targType == enums.TargetTypes.SECONDARY) { ++this.__curSecondaryTargetsKilled; } if (evtObj.targType == enums.TargetTypes.PRIMARY_ALLY) { ++this.__curPrimaryAlliesKilled; } if (evtObj.targType == enums.TargetTypes.SECONDARY_ALLY) { ++this.__curSecondaryAlliesKilled; } var v5 = false; if (this.__primaryTargetsCount > 0 && this.__curPrimaryTargetsKilled >= this.__primaryTargetsCount) { v5 = true; } if (this.__gameType == enums.GameTypes.MULTIPLAYER && this.__curPrimaryTargetsKilled >= this.__primaryTargetsCount - 1) { v5 = true; } var v4 = false; if (this.__secondaryTargetsCount > 0 && this.__curSecondaryTargetsKilled > 0) { v4 = true; } if (this.__secondaryTargetsCount == 0) { v4 = true; } if (v5 && v4) { this.__isGameEnded = true; var v3; switch (this.__gameType) { case enums.GameTypes.INS_SINGLEPLAYER: v3 = enums.GameOverReasons.SUCCESS; break; case enums.GameTypes.SINGLE_LEVEL: v3 = enums.GameOverReasons.SUCCESS; break; case enums.GameTypes.DEFENCE: v3 = enums.GameOverReasons.SUCCESS; break; case enums.GameTypes.TUTORIAL: v3 = enums.GameOverReasons.TUTORIAL_COMPLETED; break; case enums.GameTypes.MULTIPLAYER: v3 = enums.GameOverReasons.MULTIPLAYER; } this.dispatchEvent({'target': this, 'type': World.EVT_GAME_OVER, 'gameOverType': enums.GameOverTypes.MISSION_COMPLETED, 'gameOverReason': v3}); this.RemoveGameOverListeners(); return undefined; } if (this.__primaryAlliesCount > 0 && this.__curPrimaryAlliesKilled > 0) { this.__isGameEnded = true; this.dispatchEvent({'target': this, 'type': World.EVT_GAME_OVER, 'gameOverType': enums.GameOverTypes.MISSION_FAILED, 'gameOverReason': enums.GameOverReasons.ALLY_PRIMARY_DEAD}); this.RemoveGameOverListeners(); return undefined; } if (this.__secondaryAlliesCount > 0 && this.__curSecondaryAlliesKilled >= this.__secondaryAlliesCount) { this.__isGameEnded = true; this.dispatchEvent({'target': this, 'type': World.EVT_GAME_OVER, 'gameOverType': enums.GameOverTypes.MISSION_FAILED, 'gameOverReason': enums.GameOverReasons.ALLY_SECONDARY_DEAD}); this.RemoveGameOverListeners(); return undefined; } if (this.__gameClock.isTimeoutPositive() && GrpMan.isLastManStanding()) { this.dispatchEvent({'target': this, 'type': World.EVT_GAME_OVER, 'gameOverType': enums.GameOverTypes.MISSION_COMPLETED, 'gameOverReason': enums.GameOverReasons.SUCCESS}); this.RemoveGameOverListeners(); } }; v2.DetectGroupDestroyed = function () { var v2; var v6; v6 = GrpMan.OBJS_IN_GROUP_COUNT.length; v2 = 0; while (v2 < v6) { if (GrpMan.isGroupEmpty(v2)) { this.dispatchEvent({'target': this, 'type': World.EVT_GROUP_DESTROYED, 'groupId': v2}); } ++v2; } }; v2.CountdownToDogfight = function () { if (this.__secondsToDogfight <= 0) { return false; } if (this.__countdownTimer.TimeIntervalElapsed()) { --this.__secondsToDogfight; if (this.__secondsToDogfight % 2 == 0) { this.PlayCountdownTickSound(); } this.__countdownTimer.StartTimer(); if (this.__secondsToDogfight == 0) { this.PlayDogfightSound(); FlyLabels.SetMoveFadeSteps(FlyLabels.C_SLOW_MOVEMENT, FlyLabels.C_SLOW_FADEOUT); this.PlaceCountdownLabel('Dogfight!'); var v2; var v3; v3 = this.__planesArray.length; v2 = 0; while (v2 < v3) { this.__planesArray[v2].StartRollingTimer(); this.__planesArray[v2].EnableRender(); ++v2; } this.__inGameHint.FadeOutHint(); this.PlayGameMusic(); this.__gameClock.Start(); return true; } var v4; v4 = this.__secondsToDogfight / 2; if (this.__secondsToDogfight % 2 == 0) { this.PlaceCountdownLabel(v4.toString()); } } return true; }; v2.PlayCountdownTickSound = function () { if (!this.__gameConfig.isSoundFXEnabled()) { return undefined; } this.__sndCountDownTick.start(); }; v2.PlayDogfightSound = function () { if (!this.__gameConfig.isSoundFXEnabled()) { return undefined; } this.__sndDogfight.start(); }; v2.PlaceCountdownLabel = function (txt) { var v6; var v4; var v5; var v3; var v2; v2 = 0.4 + 0.5 * Math.random(); v4 = Const.C_COLOR_ORANGE >> 16; v5 = Const.C_COLOR_ORANGE >> 8 & 255; v3 = Const.C_COLOR_ORANGE & 255; v4 *= v2; v5 *= v2; v3 *= v2; v6 = v4 << 16 | v5 << 8 | v3; label = this.__flyLabels.PlaceLabel(Const.C_SCENE_WIDTH / 2 - 125, Const.C_SCENE_HEIGHT / 2 - 18, txt); FlyLabels.SetLabelColor(label, v6); FlyLabels.SetLabelFormat(label, FlyLabels.C_FNT_SIZE_VERY_BIG, true, 'center'); FlyLabels.SetMoveFadeSteps(FlyLabels.C_FAST_MOVEMENT, FlyLabels.C_FAST_FADEOUT); var label; label = this.__flyLabels.PlaceLabel(Const.C_SCENE_WIDTH / 2 - 125, Const.C_SCENE_HEIGHT / 2 - 20, txt); FlyLabels.SetLabelColor(label, Const.C_COLOR_ORANGE); FlyLabels.SetLabelFormat(label, FlyLabels.C_FNT_SIZE_VERY_BIG, true, 'center'); FlyLabels.SetMoveFadeSteps(FlyLabels.C_FAST_MOVEMENT, FlyLabels.C_FAST_FADEOUT); }; v2.StopAllSoundFX = function () { this.__sndCountDownTick.stop(Const.C_COUNTDOWN_TICK_SND); this.__sndDogfight.stop(Const.C_DOGFIGHT_SND); var v2; var v3; v2 = 0; while (v2 < this.__planesArray.length) { v3 = this.__planesArray[v2].getSFXObject(); v3.StopAllSoundFX(); ++v2; } }; v2.HidePlaneControlKeysInfo = function () { var v2; var v3; v3 = this.__planesControlsInfoArray.length; v2 = 0; while (v2 < v3) { LayMan.RemoveClip(this.__planesControlsInfoArray[v2]); ++v2; } }; v2.ToggleVisibilityToPlaneControlKeysInfo = function () { var v2; var v3; v3 = this.__planesControlsInfoArray.length; v2 = 0; while (v2 < v3) { this.__planesControlsInfoArray[v2]._visible = !this.__planesControlsInfoArray[v2]._visible; ++v2; } }; v2.PlayGameMusic = function () { if (this.__gameConfig.isMusicEnabled() && this.__gameConfig.getPlayerPositionInGame() == 'GAME') { this.__gameMusic.PlayMusic(); } }; v2.StopGameMusic = function () { this.__gameMusic.StopMusic(); }; v2.Update = function () { FrameMan.Update(); World.dmc.clear(); if (this.__gameConfig.isGamePaused()) { return undefined; } Timer.UpdateFrameCounter(); this.MoveSkyClouds(); this.MoveObstacles(); if (this.CountdownToDogfight()) { return undefined; } var v2; v2 = 0; while (v2 < this.__numOfPlanes) { this.__planesArray[v2].Update(); ++v2; } v2 = 0; while (v2 < World.mpSize) { World.mpArr[v2].Update(v2); ++v2; } this.DetectCollisions(); this.scrollScreenFunction(); if (this.__gameClock != undefined) { this.__gameClock.Update(); } this.__parentGame.UpdateFPSText(); }; v2.FadeOutControlsInfo = function () { if (Key.isDown(38)) { this.__planesControlInfoTxt.FadeOut(true); this.__planesControlInfoGraphics.FadeOut(true); this.__planesControlInfoGraphics2.FadeOut(true); this.HidePlaneControlKeysInfo(); Key.removeListener(this.upKeyListener); this.upKeyListener.onKeyDown = null; delete this.upKeyListener; this.upKeyListener = null; } }; v2.ForceFadeOutControlsInfo = function () { this.__planesControlInfoTxt.FadeOut(true); this.__planesControlInfoGraphics.FadeOut(true); this.__planesControlInfoGraphics2.FadeOut(true); this.HidePlaneControlKeysInfo(); Key.removeListener(this.upKeyListener); this.upKeyListener.onKeyDown = null; delete this.upKeyListener; this.upKeyListener = null; }; v2.getNumOfPlanes = function () { return this.__numOfPlanes; }; v2.InitGameRound = function () {}; v2.Pause = function (state) { if (state) { this.__syncEmptyClip.onEnterFrame = undefined; } else { this.__syncEmptyClip.onEnterFrame = mx.utils.Delegate.create(this, this.Update); } this.dispatchEvent({'target': this, 'type': World.EVT_GAME_PAUSED, 'state': state}); }; v2.CreateTakeOffInfoButton = function (planeIdx) { var v4; var v3; var v5; var v2; v5 = 135; v2 = 205; v4 = 220 * planeIdx + 5; v3 = Const.C_DEFAULT_Y_POS - v2 - 15; this.__planesControlInfoTxt = new MenuButton(MenuButton.C_RECT_BTN, '', v4, v3, v5, v2, MainMenu.C_BTN_FEATHER, 0, 'This is your plane\nAfter countdown, hit displayed sequence to take off!', MainMenu.C_SMALL_FONT_BORDER, true, LayMan.C_S_OTHER); this.__planesControlInfoTxt.SetLabelFormat(13, false, 'center'); this.__planesControlInfoTxt.SetMaxAlpha(50); this.__planesControlInfoTxt.FadeIn(); this.upKeyListener = new Object(); this.upKeyListener.onKeyDown = mx.utils.Delegate.create(this, this.FadeOutControlsInfo); Key.addListener(this.upKeyListener); var v6; if (planeIdx % 2 == 0) { v6 = 'S_TUT_R_KEYS_TAKE_OFF'; } else { v6 = 'S_TUT_L_KEYS_TAKE_OFF'; } this.__planesControlInfoGraphics = new MenuButton(MenuButton.C_CLIP_BTN, v6, v4 + (v5 - 100) / 2, v3 + v2 - 120, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_SMALL_FONT_BORDER, true, LayMan.C_S_OTHER); this.__planesControlInfoGraphics.SetLabelFormat(13, false, 'center'); this.__planesControlInfoGraphics.SetMaxAlpha(100); this.__planesControlInfoGraphics.FadeIn(); this.__planesControlInfoGraphics2 = new MenuButton(MenuButton.C_CLIP_BTN, 'S_TUT_SPACE_TAKE_OFF', v4 + (v5 - 100) / 2, v3 + v2 - 80, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_SMALL_FONT_BORDER, true, LayMan.C_S_OTHER); this.__planesControlInfoGraphics2.SetLabelFormat(13, false, 'center'); this.__planesControlInfoGraphics2.SetMaxAlpha(100); this.__planesControlInfoGraphics2.FadeIn(); this.upKeyListener = new Object(); this.upKeyListener.onKeyDown = mx.utils.Delegate.create(this, this.FadeOutControlsInfo); Key.addListener(this.upKeyListener); }; v2.getParent = function () { return this.__parentGame; }; v2.InitScrolling = function () { this.sox = 0; this.soy = 0; if (this.__isScrolling) { this.scrollScreenFunction = this.ScrollScreen; var v2; v2 = 0; while (this.__planesArray.length) { if (!this.__planesArray[v2].isAIControlled()) { this.singlePlayerPlaneObj = this.__planesArray[v2]; this.singlePlayerPlaneType = this.singlePlayerPlaneObj.getPlaneType(); return undefined; } ++v2; } } else { this.scrollScreenFunction = null; } }; v2.ResetScrollingX = function () { if (Math.abs(this.sox) < this.C_DEFAULT_SCROLL_STEP) { return 0; } var v2; v2 = this.sox / 40; if (Math.abs(v2) < this.C_DEFAULT_SCROLL_STEP) { v2 = v2 > 0 ? this.C_DEFAULT_SCROLL_STEP : -this.C_DEFAULT_SCROLL_STEP; } return v2; }; v2.ResetScrollingY = function () { if (this.soy == 0) { return 0; } }; v2.isScrolling = function () { return this.__isScrolling; }; v2.setIsScrolling = function (gameType) { if (gameType != enums.GameTypes.MULTIPLAYER) { this.__isScrolling = true; } else { this.__isScrolling = false; } }; v2.ScrollScreen = function () { var v6; var v12; var v8; var v7; v6 = this.singlePlayerPlaneObj.getXPos(); v7 = this.singlePlayerPlaneObj.getXDiff(); v8 = this.singlePlayerPlaneObj.getCurrentState(); var v2; var v3; var v13; var v4; var v5; if (v8 == enums.PlaneStates.INIT || v8 == enums.PlaneStates.EXPLODING) { v2 = this.ResetScrollingX(); v3 = this.ResetScrollingY(); } else { if (this.sox >= Const.C_SCENE_MAX_WIDTH - Const.C_SCENE_WIDTH) { v5 = true; } else { v5 = false; } if (this.sox <= Const.C_SCENE_MIN_WIDTH) { v4 = true; } else { v4 = false; } if (v5 && v6 <= Const.C_SCENE_WIDTH * 0.5 && v7 < 0) { v5 = false; } if (v4 && v6 >= Const.C_SCENE_WIDTH * 0.5 && v7 > 0) { v4 = false; } if (v4 || v5) { v2 = 0; v3 = 0; } else { v2 = -1 * v7; v3 = 0; var v9; v9 = Const.C_SCENE_WIDTH * 0.5; var v11; v11 = v6 - v9; var v10 = 100; v2 -= v11 / v10; } } Scrolling.xDiff = v2; Scrolling.yDiff = v3; this.sox -= v2; this.soy -= v3; if (this.sox >= Const.C_SCENE_MAX_WIDTH - Const.C_SCENE_WIDTH) { this.sox = Const.C_SCENE_MAX_WIDTH - Const.C_SCENE_WIDTH; } if (this.sox <= Const.C_SCENE_MIN_WIDTH) { this.sox = Const.C_SCENE_MIN_WIDTH; } this.Scroll_L1(v2, v3); this.Scroll_L2(v2, v3); this.Scroll_L3(v2, v3); this.Scroll_L4(v2, v3); this.Scroll_L5(v2, v3); }; v2.Scroll_L1 = function (xDiff, yDiff) { var v2; var v3; v3 = this.__numOfSkyCloudsFar; v2 = 0; while (v2 < v3) { this.__skyCloudsFarArray[v2].Scroll(this.C_SCROLL_COEF_L1, xDiff, yDiff); ++v2; } }; v2.Scroll_L2 = function (xDiff, yDiff) { var v2; var v3; v3 = this.__sceneBkgArrCnt; v2 = 0; while (v2 < v3) { LayMan.ScrollClipByOrigin(this.__sceneBackgroundArray[v2], this.__sceneBackgroundDefPosArray[v2][0], this.__sceneBackgroundDefPosArray[v2][1], this.C_SCROLL_COEF_L2, this.sox, this.soy); ++v2; } }; v2.Scroll_L3 = function (xDiff, yDiff) { var v2; var v3; v3 = this.__farFgdArrCnt; v2 = 0; while (v2 < v3) { LayMan.ScrollClipByOrigin(this.__farForegroundClipArray[v2], this.__farForegroundClipDefPosArray[v2][0], this.__farForegroundClipDefPosArray[v2][1], this.C_SCROLL_COEF_L3, this.sox, this.soy); ++v2; } }; v2.Scroll_L4 = function (xDiff, yDiff) { var v2; var v3; v3 = this.__numOfPlanes; v2 = 0; while (v2 < v3) { this.__planesArray[v2].Scroll(this.C_SCROLL_COEF_L4, xDiff, yDiff); ++v2; } this.__bonusParachute.Scroll(this.C_SCROLL_COEF_L4, xDiff, yDiff); v3 = this.__closeFgrdArrCnt; v2 = 0; while (v2 < v3) { LayMan.ScrollClipByOrigin(this.__closeForegroundClipArray[v2], this.__closeForegroundClipDefPosArray[v2][0], this.__closeForegroundClipArray[v2][1], this.C_SCROLL_COEF_L4, this.sox, this.soy); ++v2; } v3 = World.__numOfObstacles; v2 = 0; while (v2 < v3) { if (World.__sceneObstaclesArray[v2].getObstacleType() == enums.ObstacleTypes.STATIC_OBSTACLE) { World.__sceneObstaclesArray[v2].Scroll(this.C_SCROLL_COEF_L3, xDiff, yDiff); } else { World.__sceneObstaclesArray[v2].Scroll(this.C_SCROLL_COEF_L4, xDiff, yDiff); } ++v2; } }; v2.Scroll_L5 = function (xDiff, yDiff) { var v2; var v3; v3 = this.__numOfSkyCloudsFar; v2 = 0; while (v2 < v3) { this.__skyCloudsNearArray[v2].Scroll(this.C_SCROLL_COEF_L5, xDiff, yDiff); ++v2; } }; v2.getScrollOriginX = function () { return -1 * this.sox; }; v2.getScrollOriginY = function () { return -1 * this.soy; }; v2.RegisterClipWithDefPos = function (clipArray, defPosArray, defPosX, defPosY, clipName, depthType) { var v1; v1 = LayMan.RegisterClip(clipName, depthType); v1._x = defPosX; v1._y = defPosY; clipArray.push(v1); var v2; v2 = new Array(); v2.push(defPosX); v2.push(defPosY); defPosArray.push(v2); return v1; }; v2.getsinglePlayerPlaneType = function () { return this.singlePlayerPlaneType; }; v2.CreateWorldFromConfig = function (wc) { var v2; v2 = wc.getLevelConfigObj(); this.InitArenaSize(Number(v2.getConfigItem(config.levels.LevelConfig.ARENA_SIZE_TYPE))); this.InitWind(Vector2D(v2.getConfigItem(config.levels.LevelConfig.WIND_DIR))); var v3; v3 = Number(v2.getConfigItem(config.levels.LevelConfig.SKY_TYPE)); this.InitLocation(Number(v2.getConfigItem(config.levels.LevelConfig.LOCATION)), v3, Number(v2.getConfigItem(config.levels.LevelConfig.WEATHER))); this.InitObstacles(v2.getConfigItemArr(config.levels.LevelConfig.AIR_OBSTACLES_ARRAY), v3); this.InitBonus(v2.getConfigItemArr(config.levels.LevelConfig.BONUSES_ARRAY), v3); this.InitPlanes(v2.getConfigItemArr(config.levels.LevelConfig.PLANES_POS_AND_CONF), v3); this.InitGameSubType(Number(v2.getConfigItem(config.levels.LevelConfig.GAME_SUBTYPE))); this.InitHintDialogs(v2.getConfigItemArr(config.levels.LevelConfig.HINT_DIALOG_ARRAY)); this.InitGameClock(Number(v2.getConfigItem(config.levels.LevelConfig.TIME_LIMIT_SEC)), Boolean(v2.getConfigItem(config.levels.LevelConfig.TIME_LIMIT_SEC_IS_POSITIVE))); this.__sceneBkgArrCnt = this.__sceneBackgroundArray.length; this.__farFgdArrCnt = this.__farForegroundClipArray.length; this.__closeFgrdArrCnt = this.__closeForegroundClipArray.length; }; v2.InitHintDialogs = function (dialogClipNameArray) { var v7; v7 = new Array(); var v5; var v6; if (GameConfig.isNeededToShowSecWpnDlgBought() && (this.__gameType == enums.GameTypes.INS_SINGLEPLAYER || this.__gameType == enums.GameTypes.DEFENCE)) { var v9; v9 = this.__gameConfig.getGeneralControlsType(); if (v9 == enums.DefaultKeyTypes.MOUSE) { v7.push('S_HGLD_SECONDARY_WEAPON_MOUSE'); } if (v9 == enums.DefaultKeyTypes.LEFT_UP_RIGHT) { v7.push('S_HGLD_SECONDARY_WEAPON_ARROWS'); } v7 = v7.concat(dialogClipNameArray); var v2; v2 = 0; while (v2 <= this.__planesArray.length) { if (!this.__planesArray[v2].isAIControlled()) { this.singlePlayerPlaneObj = this.__planesArray[v2]; this.singlePlayerPlaneType = this.singlePlayerPlaneObj.getPlaneType(); break; } ++v2; } var v10; v10 = this.singlePlayerPlaneObj.getPlaneConfig(); var v4; v4 = v10.getBuyedItemList(); var v8; v8 = v4.length; v2 = 0; while (v2 < v8) { var v3; v3 = Number(enums.ItemTypes.getItemInfo(v4[v2], enums.ItemTypes.CLASS_NO)); if (v3 == enums.ItemTypes.CLASS_NO_SECONDARY_WEAPON) { v5 = String(enums.ItemTypes.getItemInfo(v4[v2], enums.ItemTypes.CLIP_NAME)); v6 = String(enums.ItemTypes.getItemInfo(v4[v2], enums.ItemTypes.NAME)); break; } ++v2; } } else { v7 = dialogClipNameArray; } if (this.__gameType == enums.GameTypes.SINGLE_LEVEL) { v7 = undefined; } this.__hintDlg = new gamemenu.components.HintDialog(v7, v5, v6); }; v2.InitLocation = function (locationType, skyType, weatherType) { var v7; var v4; var v3; v4 = String(enums.LocationTypes.getLocationInfo(locationType, enums.LocationTypes.C_INFO_BKG_CLIP_NAME)); v3 = String(enums.LocationTypes.getLocationInfo(locationType, enums.LocationTypes.C_INFO_GROUND_CLIP_NAME)); this.CreateSky(skyType, weatherType); this.CreateBackground(skyType, v4); this.CreateForeground(skyType, v3); }; v2.CreateSky = function (skyType, weatherType) { var v2; v2 = String(enums.SkyTypes.getInfo(skyType, enums.SkyTypes.C_CLIP_NAME)); this.__sceneSky = LayMan.RegisterClip(v2, LayMan.C_S_BKG_FAR); this.__sceneSky._x = Const.C_SCENE_WIDTH / 2; this.__sceneSky._y = Const.C_SCENE_HEIGHT / 2; this.__sceneSky._visible = true; this.CreateSkyWeather(weatherType, skyType); }; v2.CreateSkyWeather = function (weatherType, skyType) { var v6; var v7; switch (weatherType) { case enums.WeatherTypes.SUNNY: v6 = 0; v7 = 3; break; case enums.WeatherTypes.PARTLY: v6 = 2; v7 = 7; break; case enums.WeatherTypes.CLOUDY: v6 = 4; v7 = 10; } var v2; var v4; var v3; this.__skyCloudsFarArray = new Array(); v2 = 0; while (v2 < v7) { v4 = Math.round((Const.C_SKYCLOUD_CLIP_COUNT - 1) * Math.random() + 1); v3 = new SkyCloud(true, this.__windDir.getX(), v4, skyType); this.__skyCloudsFarArray.push(v3); ++v2; } this.__skyCloudsNearArray = new Array(); v2 = 0; while (v2 < v6) { v4 = Math.round((Const.C_SKYCLOUD_CLIP_COUNT - 1) * Math.random() + 1); v3 = new SkyCloud(false, this.__windDir.getX(), v4, skyType); this.__skyCloudsNearArray.push(v3); ++v2; } this.__numOfSkyCloudsFar = this.__skyCloudsFarArray.length; this.__numOfSkyCloudsNear = this.__skyCloudsNearArray.length; }; v2.CreateBackground = function (skyType, clipName) { this.__sceneBackgroundArray = new Array(); this.__sceneBackgroundDefPosArray = new Array(); var v6 = 0; var v5 = 600; var v2; v2 = this.RegisterClipWithDefPos(this.__sceneBackgroundArray, this.__sceneBackgroundDefPosArray, 400, 600, clipName, LayMan.C_S_BKG_FAR); v2._xscale = 150; var v4 = v2._width; var v3; v3 = (v4 - Const.C_SCENE_WIDTH) / -2 * this.C_DEFAULT_SCROLL_STEP * Const.C_SCENE_MIN_WIDTH; this.C_SCROLL_COEF_L2 = v3; enums.SkyTypes.AdjustTint(v2, skyType, enums.SkyTypes.C_BKG_COLOR_AMOUNT); this.__sceneBackgroundArray.push(v2); }; v2.CreateForeground = function (skyType, clipName) { this.__closeForegroundClipArray = new Array(); this.__closeForegroundClipDefPosArray = new Array(); var v2; var v3 = 0; var v4 = 575; v2 = this.RegisterClipWithDefPos(this.__closeForegroundClipArray, this.__closeForegroundClipDefPosArray, v3, v4, clipName, LayMan.C_S_COLLIDE_FAR); v2._yscale = 60; v2.cacheAsBitmap = true; enums.SkyTypes.AdjustTint(v2, skyType, enums.SkyTypes.C_FGD_COLOR_AMOUNT); if (this.__isScrolling) { v2 = this.RegisterClipWithDefPos(this.__closeForegroundClipArray, this.__closeForegroundClipDefPosArray, v3, v4, clipName, LayMan.C_S_COLLIDE_FAR); v2._xscale = -100; v2._yscale = 60; v2.cacheAsBitmap = true; enums.SkyTypes.AdjustTint(v2, skyType, enums.SkyTypes.C_FGD_COLOR_AMOUNT); v2 = this.RegisterClipWithDefPos(this.__closeForegroundClipArray, this.__closeForegroundClipDefPosArray, v3 + 2 * v2._width - 2, v4, clipName, LayMan.C_S_COLLIDE_FAR); v2._xscale = -100; v2._yscale = 60; v2.cacheAsBitmap = true; enums.SkyTypes.AdjustTint(v2, skyType, enums.SkyTypes.C_FGD_COLOR_AMOUNT); } }; v2.InitWind = function (windDir) { if (windDir == undefined) { this.__windDir = new Vector2D(0, 0); } else { this.__windDir = windDir; } }; v2.InitPlanes = function (config, skyType) { this.__planesArray = new Array(); var v6; v6 = config.length; var v2; var v5; var v7 = 'Hello world!'; v2 = 0; while (v2 < v6) { var v3; v3 = config[v2].getDefaultKeyType(); if (v3 != enums.DefaultKeyTypes.OFF) { v5 = new AirPlane(v7, skyType, this, config[v2]); this.__planesArray.push(v5); } ++v2; } this.__numOfPlanes = v6; v2 = 0; while (v2 < this.__numOfPlanes) { this.__planesArray[v2].InitAI(); ++v2; } World.mpArr = new Array(); }; v2.InitBonus = function (allowedBonusesArr, skyType) { if (allowedBonusesArr != undefined || allowedBonusesArr.length > 0) { this.__bonusParachute = new Bonus(this, skyType, allowedBonusesArr); } }; v2.InitArenaSize = function (arenaSizeType) { Const.C_SCENE_MIN_WIDTH = enums.ArenaSizeTypes.getWidth(arenaSizeType, enums.ArenaSizeTypes.WIDTH_MIN); Const.C_SCENE_MAX_WIDTH = enums.ArenaSizeTypes.getWidth(arenaSizeType, enums.ArenaSizeTypes.WIDTH_MAX); }; v2.InitGameSubType = function (gameSubType) { if (this.__gameType == enums.GameTypes.INS_SINGLEPLAYER) { this.__inGameHint.FadeInHint(); } }; v2.InitObstacles = function (obstaclesDefArray, skyType) { World.__sceneObstaclesArray = new Array(); var v2; var v3; v3 = obstaclesDefArray.length; v2 = 0; while (v2 < v3) { this.CreateObstacle(obstaclesDefArray[v2], World.__sceneObstaclesArray, skyType); ++v2; } World.__numOfObstacles = World.__sceneObstaclesArray.length; }; v2.CreateObstacle = function (params, destinationArray, skyType) { if ((destinationArray == undefined) ? destinationArray) { } var v4; v4 = params[0]; switch (v4) { case enums.ObstacleTypes.RING: new entities.Obstacles.Ring(this, skyType, params); break; case enums.ObstacleTypes.STORM_CLOUD: new entities.Obstacles.StormCloud(this, skyType, params); break; case enums.ObstacleTypes.TORNADO: new entities.Obstacles.Tornado(this, skyType, params); break; case enums.ObstacleTypes.BIRD_FORMATION: new entities.Obstacles.BirdFormation(this, skyType, params); break; case enums.ObstacleTypes.AIRSHIP: new entities.Obstacles.Airship(this, skyType, params); break; case enums.ObstacleTypes.BALOON: new entities.Obstacles.Baloon(this, skyType, params); break; case enums.ObstacleTypes.TARGET: new entities.Obstacles.Target(this, skyType, params); break; case enums.ObstacleTypes.GROUND_FOG: new entities.Obstacles.GroundFog(this, skyType, params); break; case enums.ObstacleTypes.INFO_TABLE: new entities.Obstacles.InfoTable(this, skyType, params); break; case enums.ObstacleTypes.STATIC_OBSTACLE: new entities.Obstacles.StaticObs(this, skyType, params, this.__windDir.getX()); } }; v2.InitGameClock = function (timeLimitSec, isTimeLimitPositive) { if (timeLimitSec == undefined || timeLimitSec == NaN || timeLimitSec == -1) { return undefined; } var v3; v3 = (isTimeLimitPositive == undefined) ? false : isTimeLimitPositive; this.__gameClock = new entities.other.GameClock(timeLimitSec, v3); this.__gameClock.FadeIn(); this.__gameClock.addEventListener(entities.other.GameClock.EVT_TIMEOUT, mx.utils.Delegate.create(this, this.DetectGameOver)); }; v2.getWindDir = function () { return this.__windDir; }; v2.ShowGameOverDialog = function (evtObj) { Mouse.show(); var v3; this.PlayMissionEndSnd(evtObj.gameOverType); switch (evtObj.gameOverType) { case enums.GameOverTypes.MISSION_COMPLETED: this.UnlockLevelFinishedAchievement(); v3 = this.C_GO_DLG_MISSION_COMPLETE; this.FinishPlaneScoreComputing(); if (this.__gameType == enums.GameTypes.TUTORIAL) { v3 = this.C_GO_DLG_TUTORIAL_COMPLETE; } else { v3 = this.C_GO_DLG_MISSION_COMPLETE; } break; case enums.GameOverTypes.MISSION_FAILED: v3 = this.C_GO_DLG_MISSION_FAILED; WebApi.UnlockAchievement(WebApi.C_ACH_TYPE_OTHER, WebApi.C_ACH_OTHER_DEFEAT); } var v5; v5 = String(enums.GameOverReasons.getInfo(evtObj.gameOverReason, enums.GameOverReasons.C_INFO_DESC)); var v7; v7 = _global.GameConf.getScoreHolder(); var v6; v6 = v7.getScoreValue(enums.ScoreTypes.CURRENT_SCORE, enums.ScoreTypes.C_STAT_TYPE_CURRENT); var v4; if (this.__gameType == enums.GameTypes.TUTORIAL || this.__gameType == enums.GameTypes.MULTIPLAYER) { v4 = v5; } else { v4 = v5 + '\n\n' + 'Your score: ' + String(v6); } this.__gameConfig.PauseGame(); this.__gameOverDlg = new gamemenu.components.MsgDialog(this.C_GO_DLG_BTNS[v3][0], v4, gamemenu.components.MsgDialog.C_SIZE_SMALL, this.C_GO_DLG_BTNS[v3][1]); this.__gameOverDlg.addEventListener(MenuButton.EVT_CLICK, DelegatePlus.create(this, this.HandleDialogBtnClick, v3)); this.__gameOverDlg.FadeIn(); this.__gameConfig.saveGame(); }; v2.HandleDialogBtnClick = function (evtObj, dlgType) { if (dlgType == this.C_GO_DLG_MISSION_COMPLETE) { var v2; v2 = GameConfig.getCurrentLevelId(); WebApi.TrackEvent(WebApi.C_TR_EVT_LEVEL_COMPLETE, v2); if (GameConfig.getGameType() == enums.GameTypes.INS_SINGLEPLAYER) { if (v2 == config.levels.WorldConfig.C_NON_FOKKER_LAST_LEVEL_ID || v2 == config.levels.WorldConfig.C_FOKKER_LAST_LEVEL_ID) { this.__gameConfig.setCampaignCompleted(); } GameConfig.UnlockLevel(v2); } switch (evtObj.buttonIdx) { case 0: this.__gameOverDlg.FadeOut(true); this.__toggleMenu.QuitBtnHide(); this.__parentGame.DoTransition(TransitionFader.C_WORLD, TransitionFader.C_BRIEFING_MENU); this.SendAllStatsToPortalWhenLevelFinished(); break; case 1: this.__gameOverDlg.FadeOut(true); this.__toggleMenu.QuitBtnHide(); this.__parentGame.DoTransition(TransitionFader.C_WORLD, TransitionFader.C_SCORE_MENU); this.__worldConfig.WebApiSendLevelCompletionStats(this.singlePlayerPlaneObj); this.__worldConfig.GotoNextLevel(this.singlePlayerPlaneType); this.SendAllStatsToPortalWhenLevelFinished(); this.__gameConfig.saveGame(); break; case 2: MainMenu.ToAirplaneGamesSponsorSite(undefined, WebApi.C_MORE_GAMES_INGAME); } return undefined; } if (dlgType == this.C_GO_DLG_MISSION_FAILED) { WebApi.TrackEvent(WebApi.C_TR_EVT_LEVEL_FAILED, v2); switch (evtObj.buttonIdx) { case 0: this.__gameOverDlg.FadeOut(true); this.__toggleMenu.QuitBtnHide(); this.__parentGame.DoTransition(TransitionFader.C_WORLD, TransitionFader.C_BRIEFING_MENU); break; case 1: this.__parentGame.DoTransition(TransitionFader.C_WORLD, TransitionFader.C_MAIN_MENU); this.__gameOverDlg.FadeOut(true); break; case 2: MainMenu.RedirectToSponsorSite(true); } return undefined; } if (dlgType == this.C_GO_DLG_TUTORIAL_COMPLETE) { switch (evtObj.buttonIdx) { return undefined; case 0: this.__gameOverDlg.FadeOut(true); this.__toggleMenu.QuitBtnHide(); this.__parentGame.DoTransition(TransitionFader.C_WORLD, TransitionFader.C_MAIN_MENU); return undefined; } return undefined; } }; v2.FinishPlaneScoreComputing = function () { var v3; var v5; v5 = this.__planesArray.length; var v4; v3 = 0; while (v3 < v5) { v4 = this.__planesArray[v3]; var v2; v2 = this.__gameClock.getTimeFromClock(); v2 = (v2 == undefined) ? 0 : v2; v4.FinishScoreComputing(v2); ++v3; } }; v2.SendAllStatsToPortalWhenLevelFinished = function () { var v2; var v4; v4 = this.__planesArray.length; var v3; v2 = 0; while (v2 < v4) { v3 = this.__planesArray[v2]; v3.SendAllStatsToPortal(); ++v2; } }; v2.Destroy = function () { GrpMan.setIsGroupColorShowed(false); var v2; var v3; v3 = this.__planesArray.length; v2 = 0; while (v2 < v3) { this.__planesArray[v2].Destroy(); ++v2; } v3 = World.__sceneObstaclesArray.length; v2 = 0; while (v2 < v3) { World.__sceneObstaclesArray[v2].Destroy(); ++v2; } v3 = this.__closeForegroundClipArray.length; v2 = 0; while (v2 < v3) { LayMan.RemoveClip(this.__closeForegroundClipArray[v2]); ++v2; } v3 = this.__farForegroundClipArray.length; v2 = 0; while (v2 < v3) { LayMan.RemoveClip(this.__farForegroundClipArray[v2]); ++v2; } LayMan.RemoveClip(this.__sceneSky); v3 = this.__sceneBackgroundArray.length; v2 = 0; while (v2 < v3) { LayMan.RemoveClip(this.__sceneBackgroundArray[v2]); ++v2; } this.__bonusParachute.Destroy(); v3 = this.__skyCloudsFarArray.length; v2 = 0; while (v2 < v3) { this.__skyCloudsFarArray[v2].Destroy(); ++v2; } v3 = this.__skyCloudsNearArray.length; v2 = 0; while (v2 < v3) { this.__skyCloudsNearArray[v2].Destroy(); ++v2; } this.HidePlaneControlKeysInfo(); this.StopAllSoundFX(); this.__inGameHint.FadeOutHint(true); this.__planesControlInfoTxt.FadeOut(true); this.__planesControlInfoGraphics.FadeOut(true); this.__planesControlInfoGraphics2.FadeOut(true); v2 = 0; while (v2 < this.__dummyBtnArray.length) { this.__dummyBtnArray[v2].FadeOut(true); ++v2; } LayMan.RemoveClip(this.__sndCountDownTickClip); LayMan.RemoveClip(this.__sndDogfightClip); this.__gameMusic.Destroy(); this.__ingMenu.Destroy(); if (this.__gameClock != undefined) { this.__gameClock.Destroy(); } this.__flyLabels.Destroy(); this.__flyLabels = null; this.__syncEmptyClip.onEnterFrame = null; LayMan.RemoveClip(this.__syncEmptyClip); if (this.KeyListener != undefined) { Key.removeListener(this.KeyListener); delete this.KeyListener; } delete this.__sndMissionEnd; this.__restartLevelBtn.FadeOut(true); LayMan.ResetGeneralDepths(); }; v2.UnlockLevelFinishedAchievement = function () { if (this.__gameType == enums.GameTypes.INS_SINGLEPLAYER || this.__gameType == enums.GameTypes.TUTORIAL) { var v2; v2 = GameConfig.getCurrentLevelId(); WebApi.UnlockAchievement(WebApi.C_ACH_TYPE_LEVEL_FINISH, v2); } if (this.__gameType == enums.GameTypes.DEFENCE) { v2 = GameConfig.getCurrentLevelId(); if (v2 == 7) { WebApi.UnlockAchievement(WebApi.C_ACH_TYPE_OTHER, WebApi.C_ACH_OTHER_7_WAVES); } if (v2 == 14) { WebApi.UnlockAchievement(WebApi.C_ACH_TYPE_OTHER, WebApi.C_ACH_OTHER_14_WAVES); } } if (this.__gameType == enums.GameTypes.MULTIPLAYER) { WebApi.UnlockAchievement(WebApi.C_ACH_TYPE_OTHER, WebApi.C_ACH_OTHER_MULTIPLAYER); } }; v1.RegMPArr = function (obj) { World.mpArr.push(obj); ++World.mpSize; }; v1.UnRegMPArr = function (obj) { var v1; v1 = 0; while (v1 < World.mpSize) { if (World.mpArr[v1] == obj) { World.mpArr.splice(v1, 1); --World.mpSize; } ++v1; } }; v1.RegMObsArr = function (obj) { World.__sceneObstaclesArray.push(obj); ++World.__numOfObstacles; return World.__numOfObstacles - 1; }; v1.UnRegMObsArr = function (i) { World.__sceneObstaclesArray.splice(i, 1); --World.__numOfObstacles; }; v1.getInstance = function () { return World.__instance; }; v2.PlayMissionEndSnd = function (missionEndType) { this.StopGameMusic(); var v3; var v2; v3 = LayMan.RegisterEmptyClip(this.C_VICTORY_SND_NAME, LayMan.C_S_MENU); v2 = new Sound(v3); switch (missionEndType) { case enums.GameOverTypes.MISSION_COMPLETED: v2.attachSound(this.C_VICTORY_SND_NAME); break; case enums.GameOverTypes.MISSION_FAILED: v2.attachSound(this.C_FAIL_SND_NAME); } if (this.__gameConfig.isSoundFXEnabled()) { v2.start(0, 1); } }; v2.PostProcessCmd = function () { this.__hintDlg.FadeIn(); }; v2.RestartLevel = function (evtObj) { this.__parentGame.DoTransition(TransitionFader.C_WORLD, TransitionFader.C_WORLD); }; v1.EVT_GAME_OVER = 'EVT_GAME_OVER'; v1.EVT_GROUP_DESTROYED = 'EVT_GROUP_DESTROYED'; v1.EVT_GAME_PAUSED = 'EVT_GAME_PAUSED'; v1.EVT_OBSTACLE_REGISTER = 'EVT_OBSTACLE_REGISTER'; v1.EVT_OBSTACLE_UNREGISTER = 'EVT_OBSTACLE_UNREGISTER'; v2.__sceneBkgArrCnt = 0; v2.__farFgdArrCnt = 0; v2.__closeFgrdArrCnt = 0; v2.__numOfAlivePlanes = 0; v2.C_DEFAULT_HALFSEC_TO_COUNTDOWN = 6; v2.__secondsToDogfight = World.prototype.C_DEFAULT_HALFSEC_TO_COUNTDOWN; v2.C_CORNER_FEATHER = 7; v2.C_DEFAULT_SCROLL_STEP = 3; v2.C_SCROLL_COEF_L1 = 0.1; v2.C_SCROLL_COEF_L2 = 0.1; v2.C_SCROLL_COEF_L3 = 0.8; v2.C_SCROLL_COEF_L4 = 1; v2.C_SCROLL_COEF_L5 = 1.2; v2.C_GO_DLG_MISSION_COMPLETE = 0; v2.C_GO_DLG_MISSION_FAILED = 1; v2.C_GO_DLG_TUTORIAL_COMPLETE = 2; v2.C_GO_DLG_BTNS = [['VICTORY!', ['Try again', 'Continue', 'Airplane games']], ['DEFEAT!', ['Try again', 'Give up', 'Airplane games']], ['WELL DONE!', ['Ok']]]; v1.mpSize = 0; v2.C_VICTORY_SND_NAME = 'snd_victory'; v2.C_FAIL_SND_NAME = 'snd_fail'; v1.__isRedBaronAirshipDestroyed = false; ASSetPropFlags(_global.World.prototype, null, 1); } #endinitclip } movieClip 1689 __Packages.MainMenu { #initclip if (!_global.MainMenu) { var v1 = function (parentGame, initMenuIdx) { WebApi.setMainMenu(this); Mouse.show(); this.__parentGame = parentGame; this.__gameConf = this.__parentGame.getGameConfig(); this.__toggleMenu = this.__parentGame.getToggleMenu(); this.__pagesArray = new Array(); this.CreatePages(); this.__snd1Clip = LayMan.RegisterEmptyClip('', LayMan.C_S_OTHER); this.menuMusic = new Sound(this.__snd1Clip); this.menuMusic.attachSound(Const.C_MENU_MUSIC_SND); this.__snd2Clip = LayMan.RegisterEmptyClip('', LayMan.C_S_OTHER); this.menuBkgSound = new Sound(this.__snd2Clip); this.menuBkgSound.attachSound(Const.C_MENU_BKG_SND); this.Show(initMenuIdx); _global.GameConf.setMainMenuPointer(this); WebApi.ShowLogin(); this.AddUpdateListener(); this.InitHintBubbles(); if (this.__gameConf.isCampaignCompleted() && !this.__gameConf.isCampaignCompletedNotifShowed()) { this.__gameConf.setIsCampaignCompletedNotifShowed(false); WebApi.BuyItemOK('New features unlocked:\n - Defence mode\n - All airplanes\n - All weapons'); } }; _global.MainMenu = v1; var v2 = v1.prototype; v2.PlayMenuMusic = function () { if (_global.GameConf.isMusicEnabled() && _global.GameConf.getPlayerPositionInGame() == 'MENU') { this.menuMusic.start(0, 999); this.menuBkgSound.start(0, 999); } }; v2.StopMenuMusic = function () { this.menuMusic.stop(Const.C_MENU_MUSIC_SND); this.menuBkgSound.stop(Const.C_MENU_BKG_SND); }; v2.CreatePages = function () { var v2; var v7; v2 = new MenuPage('MainMenu', null); var v9 = 275; var v5 = 200; var v14 = 50; var v38; var v27; var v52; var v24; var v29; var v36; var v30; v38 = new MenuButton(MenuButton.C_CLIP_BTN, Const.C_DOGFIGHT_ACES_TITLE_CLIP_NAME, Const.C_SCENE_WIDTH / 2, v5 - 80, 400, 150, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true); v38.AllowFadeOutAfterClick(false); v38.SetMaxAlpha(100); v36 = new MenuButton(MenuButton.C_CLIP_BTN, '', Const.C_SCENE_WIDTH - 100, Const.C_SCENE_HEIGHT - 27, 100, 40, MainMenu.C_BTN_FEATHER, 0, Const.C_APP_VERSION, MainMenu.C_SMALL_FONT_BORDER, true); v36.SetLabelFormat(12, false, 'right'); v36.SetLabelColor(Const.C_COLOR_BLACK); v27 = new MenuButton(MenuButton.C_RECT_BTN, '', v9, v5, 270, 40, MainMenu.C_BTN_FEATHER, 0, 'Play', MainMenu.C_LARGE_FONT_BORDER, false); v5 += v14; v27.SetHint('Choose game mode to play'); v27.addEventListener('click', mx.utils.Delegate.create(this, this.FadeOutCtrlHintBubble)); v24 = new MenuButton(MenuButton.C_RECT_BTN, '', v9, v5, 270, 40, MainMenu.C_BTN_FEATHER, 0, 'Controls', MainMenu.C_LARGE_FONT_BORDER, false); v5 += v14; v24.SetHint('Choose aircraft controls - mouse/arrows'); v24.addEventListener('click', mx.utils.Delegate.create(this, this.FadeOutCtrlHintBubble)); v29 = new MenuButton(MenuButton.C_RECT_BTN, '', v9, v5, 270, 40, MainMenu.C_BTN_FEATHER, 0, 'Credits', MainMenu.C_LARGE_FONT_BORDER, false); v5 += v14; v29.addEventListener('click', mx.utils.Delegate.create(this, this.FadeOutCtrlHintBubble)); v29.SetHint('About author'); if (!WebApi.isInWebNetwork()) { v30 = new MenuButton(MenuButton.C_RECT_BTN, '', v9, v5, 270, 40, MainMenu.C_BTN_FEATHER, 0, 'Airplane games', MainMenu.C_LARGE_FONT_BORDER, false); v5 += v14; v30.addEventListener('click', DelegatePlus.create(this, MainMenu.ToAirplaneGamesSponsorSite, WebApi.C_MORE_GAMES_MAIN_MENU)); v30.SetHint('Play other games of sponsor'); v30.AllowFadeOutAfterClick(false); } v27.addEventListener('click', mx.utils.Delegate.create(v2, v2.FadeOut)); var v33; var v20; v33 = new MenuButton(MenuButton.C_CLIP_BTN, Const.C_WAG_LOGO_CLIP_NAME, 20, 495, 100, 100, MainMenu.C_BTN_FEATHER, Const.C_SPONSOR_BUTTONS_COLOR, '', MainMenu.C_LARGE_FONT_BORDER, true); v33.AllowFadeOutAfterClick(false); v33.__skin._xscale = 50; v33.__skin._yscale = 50; v20 = new MenuButton(MenuButton.C_CLIP_BTN, 'S_SPONSOR_LOGO', 680, 530, 130, 130, MainMenu.C_BTN_FEATHER, Const.C_SPONSOR_BUTTONS_COLOR, '', MainMenu.C_LARGE_FONT_BORDER, false); v20.__skin._xscale = 60; v20.__skin._yscale = 60; v20.addEventListener('click', DelegatePlus.create(this, MainMenu.ToSponsorSite, WebApi.C_MAIN_MENU_TREMOR_LOGO)); v20.SetMaxAlpha(100); v20.AllowFadeOutAfterClick(false); var v25; var v28; if (!WebApi.isInWebNetwork()) { v28 = new MenuButton(MenuButton.C_RECT_BTN, '', 5, 5, 110, 20, 10, 0, 'HOST THIS GAME', 0, false); v28.AllowFadeOutAfterClick(false); v28.SetLabelColor(Const.C_COLOR_WHITE); v28.SetLabelFormat(12, true, 'CENTER'); v28.addEventListener('click', mx.utils.Delegate.create(this, MainMenu.RedirectToSponsorSiteHost)); v5 += v14; v25 = new MenuButton(MenuButton.C_RECT_BTN, '', v9, v5, 270, 80, MainMenu.C_BTN_FEATHER, 0, 'Play with\nachievements', MainMenu.C_LARGE_FONT_BORDER, false); v25.AllowFadeOutAfterClick(false); v25.SetLabelColor(Const.C_COLOR_GREEN); v25.SetHint('Play with achievements at TREMOR GAMES'); v25.addEventListener('click', mx.utils.Delegate.create(this, MainMenu.RedirectToSponsorSiteAchi)); } v2.AddItem(v38); v2.AddItem(v36); v2.AddItem(v27); v2.AddItem(v24); v2.AddItem(v29); if (!WebApi.isInWebNetwork()) { v2.AddItem(v30); } v2.AddItem(v33); v2.AddItem(v20); if (!WebApi.isInWebNetwork()) { v2.AddItem(v25); v2.AddItem(v28); } this.__pagesArray.push(v2); v2 = new MenuPage('Instructions', this.__pagesArray[0]); v7 = this.__pagesArray[0]; this.__pagesArray.push(v2); v2 = new MenuPage('Credits', this.__pagesArray[0]); v7 = this.__pagesArray[0]; var v47; var v48; var v16; var v50; var v46; var v49; var v18; v29.addEventListener('click', mx.utils.Delegate.create(v2, v2.FadeIn)); var v44; var v43; var v45; v44 = 470; this.CreateBlankPage(v2, 'Credits'); v45 = v2.getVacantRowY() - 10; this.AddDesc(v2, '', 'A game by WideAngleGames (wideanglegames@gmail.com)'); this.AddDesc(v2, 'Design, art, programming', this.C_ABOUT_AUTHORS_ART_PRG); v43 = v2.getVacantRowY(); this.AddDesc(v2, 'Music', this.C_ABOUT_AUTHORS_MUSIC); this.AddDesc(v2, 'Sponsored by', ''); v18 = new MenuButton(MenuButton.C_CLIP_BTN, 'S_SPONSOR_LOGO', 150, 450, 80, 80, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_SMALL_FONT_BORDER, false); v18.__skin._xscale = 50; v18.__skin._yscale = 50; v18.SetLabelFormat(15, false, 'center'); v18.AllowFadeOutAfterClick(false); v18.SetMaxAlpha(100); v18.SetLabelColor(Const.C_SPONSOR_BUTTONS_COLOR); v18.addEventListener('click', DelegatePlus.create(this, MainMenu.ToSponsorSite, WebApi.C_MAIN_MENU_TREMOR_LOGO)); v16 = new MenuButton(MenuButton.C_RECT_BTN, '', 25, 540, 100, 40, MainMenu.C_BTN_FEATHER, 0, 'Back', MainMenu.C_LARGE_FONT_BORDER, false); v16.addEventListener('click', mx.utils.Delegate.create(v2, v2.FadeOut)); v16.addEventListener('click', mx.utils.Delegate.create(v7, v7.FadeIn)); v2.AddItem(v18); v2.AddItem(v16); this.__pagesArray.push(v2); v9 = 275; v5 = 200; v14 = 50; v2 = new MenuPage('Play', this.__pagesArray[0]); v7 = this.__pagesArray[0]; var v31; var v37; var v32; var v22; var v19; var v51; var v26; v27.addEventListener('click', mx.utils.Delegate.create(v2, v2.FadeIn)); v31 = new MenuButton(MenuButton.C_RECT_BTN, '', v9, v5, 270, 40, MainMenu.C_BTN_FEATHER, 0, 'Tutorial', MainMenu.C_LARGE_FONT_BORDER, false); v5 += v14; v31.SetHint('Learn how to play the game'); v31.addEventListener('click', mx.utils.Delegate.create(v2, v2.FadeOut)); v31.addEventListener('click', mx.utils.Delegate.create(this, this.GotoTutorial)); v37 = new MenuButton(MenuButton.C_RECT_BTN, '', v9, v5, 270, 40, MainMenu.C_BTN_FEATHER, 0, 'Campaign', MainMenu.C_LARGE_FONT_BORDER, false); v37.SetHint('Play single player campaign'); v32 = new MenuButton(MenuButton.C_CLIP_BTN, 'S_LOAD_GAME', v9 + 270 + 5, v5, 60, 40, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, false); v32.SetHint('Continue started campaign'); v5 += v14; var v41 = v2; v19 = new MenuButton(MenuButton.C_RECT_BTN, '', v9, v5, 270, 40, MainMenu.C_BTN_FEATHER, 0, 'Single level', MainMenu.C_LARGE_FONT_BORDER, false); v5 += v14; v19.SetHint('Choose any level from campaign and reach the highest possible score'); v19.addEventListener('click', mx.utils.Delegate.create(v2, v2.FadeOut)); v19.addEventListener('click', DelegatePlus.create(this, this.setGameType, enums.GameTypes.SINGLE_LEVEL, false)); v19.addEventListener('click', DelegatePlus.create(this, this.RefreshSingleLevelLocking)); this.__bDefencePlay = new MenuButton(MenuButton.C_RECT_BTN, '', v9, v5, 270, 40, MainMenu.C_BTN_FEATHER, 0, 'Baloon defence', MainMenu.C_LARGE_FONT_BORDER, false); if (WebApi.isInWebNetwork()) { if (WebApi.isItemBought(WebApi.C_TG_ITEM_DEFENCE_MODE) || this.__gameConf.isCampaignCompleted()) { this.__bDefencePlay.setDisabledButton(false, true); this.__bDefencePlay.SetLabel('Baloon defence'); this.__bDefencePlay.SetHint('Play balloon defence mode (protect the baloons)'); } else { this.__bDefencePlay.setDisabledButton(true, true); this.__bDefencePlay.SetLabel('Defence' + WebApi.C_LOCKED_TXT); this.__bDefencePlay.SetHint('Play balloon defence mode (protect the baloons)'); this.__bDefenceLock.AllowFadeOutAfterClick(false); this.__bDefenceLock = new MenuButton(MenuButton.C_CLIP_BTN, 'S_UNLOCK_DEFENCE_BTN', v9 + 270 + 5, v5, 60, 40, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, false); this.__bDefenceLock.SetHint('Complete the campaign to unlock\nOR\nClick To Spend 10 Tremor Coins To Unlock Defence mode'); this.__bDefenceLock.AllowFadeOutAfterClick(false); this.__bDefenceLock.addEventListener('click', DelegatePlus.create(this, this.BuyItemDefence)); } } else { if (this.__gameConf.isCampaignCompleted()) { this.__bDefencePlay.setDisabledButton(false, true); this.__bDefencePlay.SetLabel('Baloon defence'); this.__bDefencePlay.SetHint('Play balloon defence mode (protect the baloons)'); } else { this.__bDefencePlay.setDisabledButton(true, true); this.__bDefencePlay.SetLabel('Defence' + WebApi.C_LOCKED_TXT); this.__bDefencePlay.SetHint('Play balloon defence mode (protect the baloons)'); this.__bDefenceLock.AllowFadeOutAfterClick(false); this.__bDefenceLock = new MenuButton(MenuButton.C_CLIP_BTN, 'S_UNLOCK_DEFENCE_BTN', v9 + 270 + 5, v5, 60, 40, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, false); this.__bDefenceLock.SetHint('Complete the campaign to unlock'); this.__bDefenceLock.AllowFadeOutAfterClick(false); this.__bDefenceLock.addEventListener('click', DelegatePlus.create(this, this.RedirectToDefenceURL)); } } v26 = new MenuButton(MenuButton.C_CLIP_BTN, 'S_LOAD_GAME', v9 + 270 + 5, v5, 60, 40, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, false); v26.SetHint('Continue defence mode'); v26.AllowFadeOutAfterClick(false); v5 += v14; v22 = new MenuButton(MenuButton.C_RECT_BTN, '', v9, v5, 270, 40, MainMenu.C_BTN_FEATHER, 0, 'Multiplayer', MainMenu.C_LARGE_FONT_BORDER, false); v5 += v14; v22.SetHint('Play with multiple players on one computer'); v22.AllowFadeOutAfterClick(false); v22.addEventListener('click', mx.utils.Delegate.create(v2, v2.FadeOut)); v22.addEventListener('click', DelegatePlus.create(this, this.setGameType, enums.GameTypes.MULTIPLAYER, false)); v16 = new MenuButton(MenuButton.C_RECT_BTN, '', 25, 540, 100, 40, MainMenu.C_BTN_FEATHER, 0, 'Back', MainMenu.C_LARGE_FONT_BORDER, false); v16.addEventListener('click', mx.utils.Delegate.create(v2, v2.FadeOut)); v16.addEventListener('click', mx.utils.Delegate.create(v7, v7.FadeIn)); v2.AddItem(v31); v2.AddItem(v37); v2.AddItem(v19); v2.AddItem(this.__bDefencePlay); v2.AddItem(this.__bDefenceLock); v2.AddItem(v22); v2.AddItem(v16); if (this.__gameConf.isGameSaved(enums.GameTypes.INS_SINGLEPLAYER)) { v32.addEventListener('click', mx.utils.Delegate.create(v2, v2.FadeOut)); v32.addEventListener('click', DelegatePlus.create(this, this.GotoShopMenu, enums.GameTypes.INS_SINGLEPLAYER, true)); v2.AddItem(v32); } if (this.__gameConf.isGameSaved(enums.GameTypes.DEFENCE)) { v26.addEventListener('click', mx.utils.Delegate.create(v2, v2.FadeOut)); v26.addEventListener('click', DelegatePlus.create(this, this.GotoShopMenu, enums.GameTypes.DEFENCE, true)); v2.AddItem(v26); } this.__pagesArray.push(v2); v9 = 50; v5 = 300; v14 = 50; v2 = new MenuPage('Play', this.__pagesArray[3]); v7 = this.__pagesArray[3]; this.__pagesArray.push(v2); var v10; v2 = new MenuPage('ChoosePlane', this.__pagesArray[3]); v7 = this.__pagesArray[3]; v10 = v2; v37.addEventListener('click', DelegatePlus.create(this, this.PlayCampaignModeClicked, v41, v10)); this.__bDefencePlay.addEventListener('click', DelegatePlus.create(this, this.PlayDefenceModeClicked, v41, v10)); var v34; v34 = new MenuButton(MenuButton.C_RECT_BTN, '', 25, 540, 100, 40, MainMenu.C_BTN_FEATHER, 0, 'Back', MainMenu.C_LARGE_FONT_BORDER, false); v34.addEventListener('click', mx.utils.Delegate.create(v2, v2.FadeOut)); v34.addEventListener('click', mx.utils.Delegate.create(v7, v7.FadeIn)); v2.AddItem(v34); var v35; v35 = new MenuButton(MenuButton.C_CLIP_BTN, 'S_UNLOCK_DEFENCE_BTN', 585, 540, 100, 40, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, false); v35.AllowFadeOutAfterClick(false); v2.AddItem(v35); var v23; v23 = new MenuButton(MenuButton.C_RECT_BTN, '', 675, 540, 100, 40, MainMenu.C_BTN_FEATHER, 0, 'Play', MainMenu.C_LARGE_FONT_BORDER, false, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v23.SetHint('Proceed to mission briefing'); v23.addEventListener('click', mx.utils.Delegate.create(v2, v2.FadeOut)); v23.addEventListener('click', mx.utils.Delegate.create(this, this.GotoShopMenu)); v2.AddItem(v23); var v39; v39 = new gamemenu.ChoosePlaneMenu(this.__pagesArray[3], this.__parentGame, v35, v23); this.__choosePlaneMenu = v39; v2.AddItem(v39); this.__pagesArray.push(v2); v2 = new MenuPage('Controls', this.__pagesArray[0]); v7 = this.__pagesArray[0]; v24.addEventListener('click', mx.utils.Delegate.create(v2, v2.FadeIn)); v24.addEventListener('click', mx.utils.Delegate.create(this, this.SetControlsClipTint)); this.CreateBlankPage(v2, 'Choose your controls'); this.AddDesc(v2, 'Click the picture to choose proper controls', ' '); this.__bMouseControlsInfoClip = new MenuButton(MenuButton.C_CLIP_BTN, 'S_MOUSE_CONTROL_TYPE_MENU', 40, 130, 0, 0, 0, 0, '', 0, false, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); this.__bMouseControlsInfoClip.SetMaxAlpha(100); this.__bMouseControlsInfoClip.addEventListener('click', DelegatePlus.create(this, this.SetMouseOrArrowsControls, 0, v2, v7)); this.__bMouseControlsInfoClip.addEventListener(MenuButton.EVT_ROLL_OVER, DelegatePlus.create(this, this.SetMouseControlsClipTint, enums.DefaultKeyTypes.MOUSE)); this.__bMouseControlsInfoClip.addEventListener(MenuButton.EVT_ROLL_OUT, DelegatePlus.create(this, this.SetMouseControlsClipTint, undefined)); this.__bMouseControlsInfoClip.SetHint('Click to choose mouse controls'); this.__bArrowsControlsInfoClip = new MenuButton(MenuButton.C_CLIP_BTN, 'S_ARROW_CONTROL_TYPE_MENU', 440, 130, 0, 0, 0, 0, '', 0, false, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); this.__bArrowsControlsInfoClip.SetMaxAlpha(100); this.__bArrowsControlsInfoClip.addEventListener('click', DelegatePlus.create(this, this.SetMouseOrArrowsControls, 1, v2, v7)); this.__bArrowsControlsInfoClip.addEventListener(MenuButton.EVT_ROLL_OVER, DelegatePlus.create(this, this.SetArrowsControlsClipTint, enums.DefaultKeyTypes.LEFT_UP_RIGHT)); this.__bArrowsControlsInfoClip.addEventListener(MenuButton.EVT_ROLL_OUT, DelegatePlus.create(this, this.SetArrowsControlsClipTint, undefined)); this.__bArrowsControlsInfoClip.SetHint('Click to choose arrows controls'); this.SetControlsClipTint(); v16 = new MenuButton(MenuButton.C_RECT_BTN, '', 25, 540, 100, 40, MainMenu.C_BTN_FEATHER, 0, 'Back', MainMenu.C_LARGE_FONT_BORDER, false); v16.addEventListener('click', mx.utils.Delegate.create(v2, v2.FadeOut)); v16.addEventListener('click', mx.utils.Delegate.create(v7, v7.FadeIn)); v2.AddItem(this.__bMouseControlsInfoClip); v2.AddItem(this.__bArrowsControlsInfoClip); v2.AddItem(v16); this.__pagesArray.push(v2); v2 = new MenuPage('ChooseLevel', this.__pagesArray[8]); v7 = this.__pagesArray[3]; this.CreateBlankPage(v2, 'Choose level to play'); v34 = new MenuButton(MenuButton.C_RECT_BTN, '', 25, 540, 100, 40, MainMenu.C_BTN_FEATHER, 0, 'Back', MainMenu.C_LARGE_FONT_BORDER, false); v34.addEventListener('click', mx.utils.Delegate.create(v2, v2.FadeOut)); v34.addEventListener('click', mx.utils.Delegate.create(v7, v7.FadeIn)); v2.AddItem(v34); var v4; var v13; var v12; v12 = config.levels.WorldConfig.C_LEVELS_COUNT; var v3; var v11; var v8; var v21; v11 = v2.getVacantRowX(); v8 = v2.getVacantRowY(); v21 = v8; var v17; var v6; var v15; this.__singleLevelLevelBtnArr = new Array(); v13 = 0; v4 = 1; while (v4 < v12) { v17 = config.levels.WorldConfig.isLevelLocked(v4 - 1); v6 = 'Level ' + v4 + ' - ' + config.levels.WorldConfig.getLevelInfo(v4, config.levels.WorldConfig.C_INFO_SUBTITLE_TXT); v15 = 'Objective:\n' + config.levels.WorldConfig.getLevelInfo(v4, config.levels.WorldConfig.C_INFO_OBJECTIVE_TXT); v3 = new MenuButton(MenuButton.C_CLIP_BTN, 'S_BLANK_RECT', v11, v8, 300, 18, MainMenu.C_BTN_FEATHER, 0, v6, MainMenu.C_LARGE_FONT_BORDER, false, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v3.SetHint(v15); v3.SetLabelFormat(14, true, 'left'); if (v17) { v3.SetLabel(v6 + WebApi.C_LOCKED_TXT); v3.setDisabledButton(true, true); } else { v3.SetLabel(v6); v3.setDisabledButton(false, true); } v3.addEventListener('click', DelegatePlus.create(this, this.setSingleLevelId, v4)); v3.addEventListener('click', mx.utils.Delegate.create(v2, v2.FadeOut)); v3.addEventListener('click', mx.utils.Delegate.create(v10, v10.FadeIn)); this.__singleLevelLevelBtnArr.push(v3); v2.AddItem(v3); v8 += 40; if (v4 > v12 / 2 && v13 == 0) { v11 = 400; v8 = v21; ++v13; } ++v4; } v19.addEventListener('click', mx.utils.Delegate.create(v2, v2.FadeIn)); this.__pagesArray.push(v2); var v42; v2 = new MenuPage('MultiplayerSetup', this.__pagesArray[8]); v42 = v2; v7 = this.__pagesArray[3]; v10 = v2; v22.addEventListener('click', mx.utils.Delegate.create(v2, v2.FadeIn)); v34 = new MenuButton(MenuButton.C_RECT_BTN, '', 25, 540, 100, 40, MainMenu.C_BTN_FEATHER, 0, 'Back', MainMenu.C_LARGE_FONT_BORDER, false); v34.addEventListener('click', mx.utils.Delegate.create(v2, v2.FadeOut)); v34.addEventListener('click', mx.utils.Delegate.create(v7, v7.FadeIn)); v2.AddItem(v34); v23 = new MenuButton(MenuButton.C_RECT_BTN, '', 675, 540, 100, 40, MainMenu.C_BTN_FEATHER, 0, 'Play', MainMenu.C_LARGE_FONT_BORDER, false, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v23.SetHint('Proceed to mission briefing'); v23.addEventListener('click', mx.utils.Delegate.create(v2, v2.FadeOut)); v23.addEventListener('click', mx.utils.Delegate.create(this, this.GotoMultiplayer)); v2.AddItem(v23); var v40; v40 = new gamemenu.MultiplayerMenu(this.__pagesArray[3], v2, this.__parentGame, v23); this.__multiplayerMenu = v40; v2.AddItem(v40); this.__pagesArray.push(v2); }; v2.SetMouseOrArrowsControls = function (evt, btnType, page, parentPage) { if (btnType == 0) { this.__gameConf.setGeneralControlsType(enums.DefaultKeyTypes.MOUSE); } if (btnType == 1) { this.__gameConf.setGeneralControlsType(enums.DefaultKeyTypes.LEFT_UP_RIGHT); } page.FadeOut(); parentPage.FadeIn(); }; v2.runJS = function (script) { getURL('javascript:' + script + '', ''); }; v1.ToAirplaneGamesSponsorSite = function (evt, linkType) { var v1; v1 = WebApi.getTrackingURL(linkType); v1 = 'http://www.tremorgames.com/categories/11/airplane-games.html?utm_source=SponsoredGames&utm_medium=FlashGame&utm_term=' + com.tremorgames.TremorGames.GetDomainName() + '&utm_content=CategoryLink&utm_campaign=' + escape('Dogfight Aces'); getURL(v1, '_blank'); }; v1.ToSponsorSite = function (evt, linkType) { var v1; v1 = WebApi.getTrackingURL(linkType); getURL(v1, '_blank'); }; v1.RedirectToSponsorSite = function (isRedirectedFromGame) { var v3; var v1; isRedirectedFromGame = (isRedirectedFromGame == undefined) ? false : isRedirectedFromGame; if (isRedirectedFromGame) { v1 = WebApi.getTrackingURL(WebApi.C_MORE_GAMES_GAME_OVER); } else { v1 = WebApi.getTrackingURL(WebApi.C_MORE_GAMES_MAIN_MENU); } if (!WebApi.C_WEBAPI_ENABLED) { v1 = Const.C_SPONSOR_WEBSITE; } getURL(v1, Const.C_SPONSOR_WEBSITE); }; v1.RedirectToSponsorSiteAchi = function (isRedirectedFromGame) { var v2; var v1; v1 = WebApi.getTrackingURL(WebApi.C_PLAY_WITH_ACHIEVEMENTS); v1 = WebApi.getGameURL(); getURL(v1, '_blank'); }; v1.RedirectToSponsorSiteHost = function (isRedirectedFromGame) { var v2; var v1; v1 = WebApi.getTrackingURL(WebApi.C_HOST_GAME); v1 = WebApi.getHostThisGameURL(); getURL(v1, '_blank'); }; v2.RedirectToWAGMail = function () { var v2; getURL(this.C_WAG_MAIL, 'game author mail'); }; v2.Show = function (initMenuIdx) { initMenuIdx = (initMenuIdx == undefined) ? 0 : initMenuIdx; this.__menuBkg = new MenuBkg(true); this.__pagesArray[initMenuIdx].FadeIn(); this.__gameConf.setPlayerPositionInGame('MENU'); this.PlayMenuMusic(); }; v2.Render = function () { this.__menuBkg.Render(); FrameMan.Update(); this.__parentGame.UpdateFPSText(); }; v2.PlayCampaignModeClicked = function (evt, page, childPage) { this.setGameType(evt, enums.GameTypes.INS_SINGLEPLAYER, false); if (this.__gameConf.isGameSaved(enums.GameTypes.INS_SINGLEPLAYER)) { var v2; v2 = new gamemenu.components.MsgDialog('Warning!', 'Starting a new campaign will erase saved game data. Do you want to continue?', gamemenu.components.MsgDialog.C_SIZE_VERY_SMALL, ['Yes', 'No']); v2.addEventListener(MenuButton.EVT_CLICK, DelegatePlus.create(this, this.HandleCampaignWarnDlgClick, page, childPage)); page.FadeOut(); v2.FadeIn(); } else { page.FadeOut(); childPage.FadeIn(); } }; v2.PlayDefenceModeClicked = function (evt, page, childPage) { this.setGameType(evt, enums.GameTypes.DEFENCE, false); if (this.__gameConf.isGameSaved(enums.GameTypes.DEFENCE)) { var v2; v2 = new gamemenu.components.MsgDialog('Warning!', 'Starting a new defence mode game will erase saved game data. Do you want to continue?', gamemenu.components.MsgDialog.C_SIZE_VERY_SMALL, ['Yes', 'No']); v2.addEventListener(MenuButton.EVT_CLICK, DelegatePlus.create(this, this.HandleCampaignWarnDlgClick, page, childPage)); page.FadeOut(); v2.FadeIn(); } else { page.FadeOut(); childPage.FadeIn(); } }; v2.HandleCampaignWarnDlgClick = function (evtObj, page, childPage) { evtObj.target.FadeOut(true); switch (evtObj.buttonIdx) { case 0: childPage.FadeIn(); break; case 1: page.FadeIn(); } }; v2.AddDesc = function (thisPage, SubTitle, Desc) { var v2; var v6; var v5; var v7; var v10; v6 = thisPage.getVacantRowX() + this.C_DEF_PADDING; v5 = thisPage.getVacantRowY(); v7 = this.C_DEF_PAGE_WIDTH; v10 = this.C_DEF_PAGE_HEIGHT; if (SubTitle != undefined && SubTitle != '') { var v3; v3 = new MenuButton(MenuButton.C_CLIP_BTN, '', v6, v5, v7 - 2 * this.C_DEF_PADDING, 30, MainMenu.C_BTN_FEATHER, 0, SubTitle, 0, true, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v3.AllowFadeOutAfterClick(false); v3.SetLabelColor(Const.C_COLOR_ORANGE); v3.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v3.setAutoSize('center'); v3.SetMaxAlpha(100); thisPage.AddItem(v3); thisPage.incVacantRowY(this.C_DESC_FONT_SIZE + 5); v5 = thisPage.getVacantRowY(); } v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', v6, v5, v7 - 3 * this.C_DEF_PADDING, 50, MainMenu.C_BTN_FEATHER, 0, Desc, 0, true, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v2.AllowFadeOutAfterClick(false); v2.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v2.setAutoSize('center'); v2.SetMaxAlpha(100); thisPage.AddItem(v2); var v8; v8 = v2.__txtField._height; thisPage.incVacantRowY(v8 + this.C_DEF_PADDING); }; v2.AddClipDesc = function (thisPage, SubTitle, clipName, clipMask, Desc) { var v8; var v6; var v10; var v14; v8 = thisPage.getVacantRowX() + this.C_DEF_PADDING; v6 = thisPage.getVacantRowY(); v10 = this.C_DEF_PAGE_WIDTH; v14 = this.C_DEF_PAGE_HEIGHT; if (SubTitle != undefined && SubTitle != '') { var v4; v4 = new MenuButton(MenuButton.C_CLIP_BTN, '', v8, v6, v10 - 2 * this.C_DEF_PADDING, 30, MainMenu.C_BTN_FEATHER, 0, SubTitle, 0, true, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v4.AllowFadeOutAfterClick(false); v4.SetLabelColor(Const.C_COLOR_ORANGE); v4.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v4.setAutoSize('center'); v4.SetMaxAlpha(100); thisPage.AddItem(v4); thisPage.incVacantRowY(this.C_DESC_FONT_SIZE + this.C_DEF_PADDING); v6 = thisPage.getVacantRowY(); } var v5; v5 = new MenuButton(MenuButton.C_CLIP_BTN, clipName, v8, v6, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v5.AllowFadeOutAfterClick(false); v5.SetMaxAlpha(100); thisPage.AddItem(v5); var v9; var v7; v9 = this.getWidth(v5.__skin, clipMask); v7 = this.getHeight(v5.__skin, clipMask); var v2; v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', v8 + v9 + this.C_DEF_PADDING, v6, v10 - (v9 + 3 * this.C_DEF_PADDING), v7, MainMenu.C_BTN_FEATHER, 0, Desc, MainMenu.C_LARGE_FONT_BORDER, true, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v2.AllowFadeOutAfterClick(false); v2.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v2.SetMaxAlpha(100); thisPage.AddItem(v2); var v11; v11 = v2.__txtField._height > v7 ? v2.__txtField._height : v7; thisPage.incVacantRowY(v11 + this.C_DEF_PADDING); }; v2.AddClipClipDesc = function (thisPage, SubTitle, clip1Name, clip1Mask, clip2Name, clip2Mask, Desc) { var v7; var v6; var v16; var v19; v7 = thisPage.getVacantRowX() + this.C_DEF_PADDING; v6 = thisPage.getVacantRowY(); v16 = this.C_DEF_PAGE_WIDTH; v19 = this.C_DEF_PAGE_HEIGHT; if (SubTitle != undefined && SubTitle != '') { var v5; v5 = new MenuButton(MenuButton.C_CLIP_BTN, '', v7, v6, v16 - 2 * this.C_DEF_PADDING, 30, MainMenu.C_BTN_FEATHER, 0, SubTitle, 0, true, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v5.AllowFadeOutAfterClick(false); v5.SetLabelColor(Const.C_COLOR_ORANGE); v5.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v5.setAutoSize('center'); v5.SetMaxAlpha(100); thisPage.AddItem(v5); thisPage.incVacantRowY(this.C_DESC_FONT_SIZE + this.C_DEF_PADDING); v6 = thisPage.getVacantRowY(); } var v2; v2 = new MenuButton(MenuButton.C_CLIP_BTN, clip1Name, v7, v6, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v2.AllowFadeOutAfterClick(false); v2.SetMaxAlpha(100); thisPage.AddItem(v2); var v8; var v13; v8 = this.getWidth(v2.__skin, clip1Mask); v13 = this.getHeight(v2.__skin, clip1Mask); var v9; v9 = new MenuButton(MenuButton.C_CLIP_BTN, clip2Name, v7 + v8 + this.C_DEF_PADDING, v6, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v9.AllowFadeOutAfterClick(false); v9.SetMaxAlpha(100); thisPage.AddItem(v9); var v11; var v12; v11 = this.getWidth(v2.__skin, clip2Mask); v12 = this.getHeight(v2.__skin, clip2Mask); var v4; var v10; v10 = v13 > v12 ? v13 : v12; v4 = new MenuButton(MenuButton.C_CLIP_BTN, '', v7 + v8 + v11 + 3 * this.C_DEF_PADDING, v6, this.C_DEF_PAGE_WIDTH - (v8 + v11 + 5 * this.C_DEF_PADDING), v10, MainMenu.C_BTN_FEATHER, 0, Desc, MainMenu.C_LARGE_FONT_BORDER, true, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v4.AllowFadeOutAfterClick(false); v4.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v4.SetMaxAlpha(100); thisPage.AddItem(v4); var v14; v14 = v10 > v4.__txtField._height ? v10 : v4.__txtField._height; thisPage.incVacantRowY(v14 + this.C_DEF_PADDING); }; v2.AddClipClipClipDesc = function (thisPage, SubTitle, clip1Name, clip1Mask, clip2Name, clip2Mask, clip3Name, clip3Mask, Desc) { var v10; var v5; var v19; var v23; v10 = thisPage.getVacantRowX() + this.C_DEF_PADDING; v5 = thisPage.getVacantRowY(); v19 = this.C_DEF_PAGE_WIDTH; v23 = this.C_DEF_PAGE_HEIGHT; if (SubTitle != undefined && SubTitle != '') { var v4; v4 = new MenuButton(MenuButton.C_CLIP_BTN, '', v10, v5, v19 - 2 * this.C_DEF_PADDING, 30, MainMenu.C_BTN_FEATHER, 0, SubTitle, 0, true, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v4.AllowFadeOutAfterClick(false); v4.SetLabelColor(Const.C_COLOR_ORANGE); v4.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v4.setAutoSize('center'); v4.SetMaxAlpha(100); thisPage.AddItem(v4); thisPage.incVacantRowY(this.C_DESC_FONT_SIZE + 5); v5 = thisPage.getVacantRowY(); } var v9; v9 = new MenuButton(MenuButton.C_CLIP_BTN, clip1Name, v10, v5, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v9.AllowFadeOutAfterClick(false); v9.SetMaxAlpha(100); thisPage.AddItem(v9); var v11; var v16; v11 = this.getWidth(v9.__skin, clip1Mask); v16 = this.getHeight(v9.__skin, clip1Mask); var v8; v8 = new MenuButton(MenuButton.C_CLIP_BTN, clip2Name, v10 + v11 + 2 * this.C_DEF_PADDING, v5, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v8.AllowFadeOutAfterClick(false); v8.SetMaxAlpha(100); thisPage.AddItem(v8); var v12; var v15; v12 = this.getWidth(v8.__skin, clip2Mask); v15 = this.getHeight(v8.__skin, clip2Mask); var v7; v7 = new MenuButton(MenuButton.C_CLIP_BTN, clip3Name, v10 + v11 + v12 + 3 * this.C_DEF_PADDING, v5, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v7.AllowFadeOutAfterClick(false); v7.SetMaxAlpha(100); thisPage.AddItem(v7); var v13; var v14; v13 = this.getWidth(v7.__skin, clip3Mask); v14 = this.getHeight(v7.__skin, clip3Mask); var v3; var v6; v6 = v16 > v15 ? v16 : v15; v6 = v6 > v14 ? v6 : v14; v3 = new MenuButton(MenuButton.C_CLIP_BTN, '', v10 + v11 + v12 + v13 + 4 * this.C_DEF_PADDING, v5, this.C_DEF_PAGE_WIDTH - (v11 + v12 + v13 + 7 * this.C_DEF_PADDING), v6, MainMenu.C_BTN_FEATHER, 0, Desc, MainMenu.C_LARGE_FONT_BORDER, true, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v3.AllowFadeOutAfterClick(false); v3.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v3.SetMaxAlpha(100); thisPage.AddItem(v3); var v17; v17 = v6 > v3.__txtField._height ? v6 : v3.__txtField._height; thisPage.incVacantRowY(v17 + this.C_DEF_PADDING); }; v2.getWidth = function (mc, mask) { if (mask == undefined) { return mc._width; } else { return mask._width; } }; v2.getHeight = function (mc, mask) { if (mask == undefined) { return mc._height; } else { return mask._height; } }; v2.CreateBlankPage = function (thisPage, pageTitle) { var v5; var v4; var v7; var v6; v5 = this.C_DEF_PAGE_POS_X; v4 = this.C_DEF_PAGE_POS_Y; v7 = this.C_DEF_PAGE_WIDTH; v6 = this.C_DEF_PAGE_HEIGHT; thisPage.setVacantRowX(v5 + this.C_DEF_PADDING); thisPage.setVacantRowY(v4); var v2; v2 = new MenuButton(MenuButton.C_RECT_BTN, '', v5, v4, v7, v6, MainMenu.C_BTN_FEATHER, 0, pageTitle, MainMenu.C_SMALL_FONT_BORDER, true, this.C_DEPTH_TYPE); v2.SetLabelColor(Const.C_COLOR_ORANGE); v2.SetLabelFormat(this.C_TITLE_FONT_SIZE, false, 'left'); v2.AllowFadeOutAfterClick(false); thisPage.AddItem(v2); thisPage.incVacantRowY(this.C_TITLE_FONT_SIZE); thisPage.incVacantRowY(this.C_TITLE_FONT_SIZE + this.C_DEF_PADDING + 5); }; v2.Destroy = function () { this.RemoveUpdateListener(); this.__menuBkg.Destroy(); delete this.__menuBkg; this.__menuBkg = null; var v3; var v2; v3 = this.__pagesArray.length; v2 = 0; while (v2 < v3) { this.__pagesArray[v2].Destroy(); ++v2; } this.StopMenuMusic(); LayMan.RemoveClip(this.__snd1Clip); LayMan.RemoveClip(this.__snd2Clip); this.__gameConf.setPlayerPositionInGame('GAME'); LayMan.ResetMenuDepths(); clearInterval(this.__controlsHintBubbleIntervalId); clearInterval(this.__mochiHintBubbleIntervalId); }; v2.setGameType = function (evt, gType, loadGame) { GameConfig.setGameType(gType); if (loadGame) { this.__gameConf.loadGame(); } else { this.__gameConf.resetPlaneConfig(); } }; v2.GotoShopMenu = function (evt, gType, loadGame) { gType = (gType == undefined) ? GameConfig.getGameType() : gType; loadGame = (loadGame == undefined) ? false : loadGame; this.setGameType(evt, gType, loadGame); var v8; WebApi.TrackEvent(WebApi.C_TR_EVT_GAMETYPE_PLAY_START, gType); var v2; v2 = GameConfig.getGameType(); if (v2 == enums.GameTypes.INS_SINGLEPLAYER) { var v6; v6 = this.__parentGame.getWorldConfig(); var v5; v5 = GameConfig.getGameEndType(); if (v5 == GameConfig.C_SP_FIRST_LEVEL) { this.__parentGame.DoTransition(TransitionFader.C_MAIN_MENU, TransitionFader.C_BRIEFING_MENU); } if (v5 == GameConfig.C_SP_IN_PROGRES) { this.__parentGame.DoTransition(TransitionFader.C_MAIN_MENU, TransitionFader.C_SHOP_MENU); } if (v5 == GameConfig.C_SP_END_OTHER) { this.__parentGame.DoTransition(TransitionFader.C_MAIN_MENU, TransitionFader.C_OUTRO); } if (v5 == GameConfig.C_SP_END_FOKKER) { this.__parentGame.DoTransition(TransitionFader.C_MAIN_MENU, TransitionFader.C_FOKKER_OUTRO); } } else { if (v2 == enums.GameTypes.DEFENCE) { var v5 = GameConfig.getGameEndType(); if (v5 == GameConfig.C_SP_FIRST_LEVEL) { this.__parentGame.DoTransition(TransitionFader.C_MAIN_MENU, TransitionFader.C_BRIEFING_MENU); } if (v5 == GameConfig.C_SP_IN_PROGRES) { this.__parentGame.DoTransition(TransitionFader.C_MAIN_MENU, TransitionFader.C_SHOP_MENU); } } else { this.__parentGame.DoTransition(TransitionFader.C_MAIN_MENU, TransitionFader.C_SHOP_MENU); } } }; v2.GotoTutorial = function () { this.setGameType(undefined, enums.GameTypes.TUTORIAL); this.__parentGame.DoTransition(TransitionFader.C_MAIN_MENU, TransitionFader.C_WORLD); }; v2.setSingleLevelId = function (evt, levelId) { GameConfig.setCurrentLevelId(levelId); }; v2.GotoMultiplayer = function (evt) { this.__parentGame.DoTransition(TransitionFader.C_MAIN_MENU, TransitionFader.C_WORLD); }; v2.ShowGameUpgradeShop = function (evt) { WebApi.ShowGameUpgrade(this); }; v2.UnlockPlaneList = function () { this.__choosePlaneMenu.FadeOutLockedTxt(); }; v2.RefreshSingleLevelLocking = function () { var v5; var v4; var v2; var v6; v6 = config.levels.WorldConfig.C_LEVELS_COUNT; var v3; v2 = 1; while (v2 < v6) { v3 = this.__singleLevelLevelBtnArr[v2 - 1]; v5 = config.levels.WorldConfig.isLevelLocked(v2, config.levels.WorldConfig.C_INFO_LEVEL_LOCKED); v4 = 'Level ' + v2 + ' - ' + config.levels.WorldConfig.getLevelInfo(v2, config.levels.WorldConfig.C_INFO_SUBTITLE_TXT); if (v5) { v3.SetLabel(v4 + WebApi.C_LOCKED_TXT); v3.setDisabledButton(true, true); } else { v3.SetLabel(v4); v3.setDisabledButton(false, true); } ++v2; } }; v2.RefreshGameModesLocking = function (isForce) { isForce = (isForce == undefined) ? false : isForce; WebApi.DebugTxt('MainMenu:RefreshGameModesLocking...'); if (WebApi.isItemBought(WebApi.C_TG_ITEM_DEFENCE_MODE) || isForce) { this.__bDefencePlay.setDisabledButton(false, true); this.__bDefencePlay.SetLabel('Baloon defence'); this.__bDefencePlay.SetHint('Play baloon defence mode (protect the baloons)'); this.__bDefenceLock.FadeOut(true); WebApi.DebugTxt('MainMenu:RefreshGameModesLocking:__bDefenceLock:' + this.__bDefenceLock); } else { this.__bDefencePlay.setDisabledButton(true, true); this.__bDefencePlay.SetLabel('Defence' + WebApi.C_LOCKED_TXT); this.__bDefencePlay.SetHint('Play baloon defence mode (protect the baloons)'); this.__bDefenceLock.FadeIn(); } }; v2.UnlockAirplane = function (planeType) { WebApi.DebugTxt('MainMenu:UnlockAirplane'); this.__choosePlaneMenu.FadeOutLockedTxt(undefined, true); }; v2.AddUpdateListener = function () { this.__updateClip = LayMan.RegisterEmptyClip('MainMenuUpdate', LayMan.C_S_MENU); this.__updateClip.onEnterFrame = mx.utils.Delegate.create(this, this.Render); }; v2.RemoveUpdateListener = function () { this.__updateClip.onEnterFrame = null; }; v2.InitHintBubbles = function () { if (!this.__gameConf.isGeneralControlsTypeDefined()) { this.__controlsHintBubble = new MenuButton(MenuButton.C_CLIP_BTN, this.C_CONTROLS_HINT_BUBBLE_CLIPNAME, 0, 0, 100, 100, 0, 0, '', 0, true, this.C_DEPTH_TYPE); this.__controlsHintBubbleIntervalId = setInterval(mx.utils.Delegate.create(this, this.FadeInCtrlHintBubble), this.C_CONTROLS_HINT_BUBBLE_FADEIN_TIME); } }; v2.FadeInMochiHintBubble = function () { clearInterval(this.__mochiHintBubbleIntervalId); this.__mochiHintBubbleIntervalId = setInterval(mx.utils.Delegate.create(this, this.FadeOutMochiHintBubble), this.C_MOCHI_HINT_BUBBLE_SHOW_TIME); if (!WebApi.isUserLoggedIn()) { this.__mochiHintBubble.FadeIn(); } }; v2.FadeOutMochiHintBubble = function () { clearInterval(this.__mochiHintBubbleIntervalId); if (!WebApi.isUserLoggedIn()) { this.__mochiHintBubble.FadeOut(); } }; v2.FadeInCtrlHintBubble = function () { clearInterval(this.__controlsHintBubbleIntervalId); if (this.getActivePageIdx() == 0) { this.__controlsHintBubbleIntervalId = setInterval(mx.utils.Delegate.create(this, this.FadeOutCtrlHintBubble), this.C_CONTROLS_HINT_BUBBLE_SHOW_TIME); this.__controlsHintBubble.FadeIn(); } else { this.__controlsHintBubbleIntervalId = setInterval(mx.utils.Delegate.create(this, this.FadeInCtrlHintBubble), this.C_CONTROLS_HINT_BUBBLE_FADEIN_TIME); } }; v2.FadeOutCtrlHintBubble = function () { if (this.__controlsHintBubble == undefined) { return undefined; } clearInterval(this.__controlsHintBubbleIntervalId); this.__controlsHintBubble.FadeOut(); }; v2.SetControlsClipTint = function () { var v2; v2 = this.__gameConf.getGeneralControlsType(); if (v2 == enums.DefaultKeyTypes.MOUSE) { LayMan.SetTint(this.__bMouseControlsInfoClip.__skin, 0, 0); LayMan.SetTint(this.__bArrowsControlsInfoClip.__skin, 0, 50); } if (v2 == enums.DefaultKeyTypes.LEFT_UP_RIGHT) { LayMan.SetTint(this.__bMouseControlsInfoClip.__skin, 0, 50); LayMan.SetTint(this.__bArrowsControlsInfoClip.__skin, 0, 0); } }; v2.SetMouseControlsClipTint = function (evt, rollOverKeyType) { if (rollOverKeyType == undefined) { LayMan.SetTint(this.__bMouseControlsInfoClip.__skin, 0, 50); this.SetControlsClipTint(); } else { LayMan.SetTint(this.__bMouseControlsInfoClip.__skin, 0, 0); LayMan.SetTint(this.__bArrowsControlsInfoClip.__skin, 0, 50); } }; v2.SetArrowsControlsClipTint = function (evt, rollOverKeyType) { if (rollOverKeyType == undefined) { LayMan.SetTint(this.__bArrowsControlsInfoClip.__skin, 0, 50); this.SetControlsClipTint(); } else { LayMan.SetTint(this.__bArrowsControlsInfoClip.__skin, 0, 0); LayMan.SetTint(this.__bMouseControlsInfoClip.__skin, 0, 50); } }; v2.getActivePageIdx = function () { var v2; var v3; v3 = this.__pagesArray.length; v2 = 0; while (v2 < v3) { if (this.__pagesArray[v2].isDisplayed()) { return v2; } ++v2; } return undefined; }; v2.BuyItemDefence = function () { WebApi.BuyItem(WebApi.C_TG_ITEM_DEFENCE_MODE); }; v2.RedirectToDefenceURL = function () { var v1; v1 = WebApi.getTGItemURL(WebApi.C_TG_ITEM_DEFENCE_MODE); getURL(v1, Const.C_SPONSOR_WEBSITE); }; v2.C_DEF_PADDING = 15; v2.C_DEF_PAGE_POS_X = 12; v2.C_DEF_PAGE_POS_Y = 30; v2.C_DEF_PAGE_WIDTH = 776; v2.C_DEF_PAGE_HEIGHT = 500; v2.C_DEPTH_TYPE = LayMan.C_S_MENU; v2.C_HINT_DEPTH_TYPE = LayMan.C_S_MENU_HINTS; v2.C_DESC_FONT_SIZE = 16; v2.C_TITLE_FONT_SIZE = 18; v1.C_MENU_IDX_MAIN = 0; v1.C_MENU_IDX_PLAY = 3; v2.C_INSTRUCTIONS_TUT_INFO = ' For more info please play Tutorial. Select \'Play\' and \'Tutorial\' in the main menu.'; v2.C_ABOUT_AUTHORS_ART_PRG = ' Miroslav Vajas'; v2.C_ABOUT_AUTHORS_MUSIC = ' Justin R. Durban - Homelands (www.edgen.com)\n Justin R. Durban - Battle at Norfolk (www.edgen.com)\n Calpomatt - Fallen soldier\n Antonin Charvat - March of the hunters (www.antonincharvat.com)\n Tigernakh - Endless approach\n Unknown author - The Experiment'; v2.C_CHARVAT_WEBSITE = ''; v2.C_JUSTIN_WEBSITE = ''; v2.C_WAG_MAIL = ''; v1.C_LARGE_FONT_BORDER = 2; v1.C_SMALL_FONT_BORDER = 10; v1.C_BTN_FEATHER = 20; v2.C_MOCHI_HINT_BUBBLE_CLIPNAME = 'S_HINT_BUBBLE_MOCHI'; v2.C_MOCHI_HINT_BUBBLE_SHOW_FADEIN_TIME = 4000; v2.C_MOCHI_HINT_BUBBLE_SHOW_TIME = 6000; v2.C_CONTROLS_HINT_BUBBLE_CLIPNAME = 'S_HINT_BUBBLE_CONTROLS'; v2.C_CONTROLS_HINT_BUBBLE_FADEIN_TIME = 6000; v2.C_CONTROLS_HINT_BUBBLE_SHOW_TIME = 6000; ASSetPropFlags(_global.MainMenu.prototype, null, 1); } #endinitclip } movieClip 1690 __Packages.MenuBkg { #initclip if (!_global.MenuBkg) { var v1 = function (isShowedInMainMenu) { isShowedInMainMenu = (isShowedInMainMenu == undefined) ? false : isShowedInMainMenu; this.__clipCount = 0; LayMan.ResetDepthType(this.C_MY_DEPTH_TYPE); this.__farCloudArray = new Array(); this.__farCloudVelocity = new Array(); this.__closeCloudArray = new Array(); this.__closeCloudVelocity = new Array(); this.__planeArray = new Array(); this.__skyType = UtilMath.getRandomNaturalNumber(0, enums.SkyTypes.COUNT - 1); if (isShowedInMainMenu && this.__skyType == enums.SkyTypes.GREY || isShowedInMainMenu && this.__skyType == enums.SkyTypes.NIGHT) { this.__skyType = enums.SkyTypes.BLUE; } this.__tintColor = Number(enums.SkyTypes.getInfo(this.__skyType, enums.SkyTypes.C_COLOR)); this.__tintCloudAmt = Number(enums.SkyTypes.getInfo(this.__skyType, enums.SkyTypes.C_CLOUD_COLOR_AMOUNT)); this.__tintPlanesAmt = Number(enums.SkyTypes.getInfo(this.__skyType, enums.SkyTypes.C_FGD_COLOR_AMOUNT)); this.__tintLandAmt = Number(enums.SkyTypes.getInfo(this.__skyType, enums.SkyTypes.C_BKG_COLOR_AMOUNT)); var v3; v3 = String(enums.SkyTypes.getInfo(this.__skyType, enums.SkyTypes.C_CLIP_NAME)); this.__skyClip = this.RegisterClip(v3, this.C_MY_DEPTH_TYPE); this.__landClip = this.RegisterClip(v3 + '_BKG', this.C_MY_DEPTH_TYPE); this.__skyClip._visible = true; this.__skyClip._x = Const.C_SCENE_WIDTH / 2; this.__skyClip._y = Const.C_SCENE_HEIGHT / 2; this.InitClouds(); }; _global.MenuBkg = v1; var v2 = v1.prototype; v2.InitClouds = function () { var v3; var v5; var v2; var v4; v3 = 0; while (v3 < this.C_NUM_OF_FAR_CLOUDS) { v5 = Math.round(1 + (Const.C_SKYCLOUD_CLIP_COUNT - 1) * Math.random()); v2 = this.RegisterClip(Const.C_SKY_CLOUD_CLIP_NAME_MASK + v5, this.C_MY_DEPTH_TYPE); LayMan.SetTint(v2, this.__tintColor, this.__tintCloudAmt); v2._x = -this.C_OVER_SCREEN_FAR_CLOUDS_X + (Const.C_SCENE_WIDTH + 2 * this.C_OVER_SCREEN_FAR_CLOUDS_X) * Math.random(); v2._y = 0.25 * Const.C_SCENE_HEIGHT + (Const.C_SCENE_HEIGHT / 4) * Math.random(); v2._xscale = this.C_FAR_CLOUD_SIZE + this.C_CLOSE_CLOUD_SIZE_VARIATION * Math.random(); v2._yscale = this.C_FAR_CLOUD_SIZE + this.C_CLOSE_CLOUD_SIZE_VARIATION * Math.random(); this.__farCloudArray.push(v2); v4 = this.C_VELOCITY_OF_FAR_CLOUDS - (this.C_VELOCITY_DISPERSE_OF_FAR_CLOUDS / 2) * Math.random(); this.__farCloudVelocity.push(v4); ++v3; } this.InitPlanes(); v3 = 0; while (v3 < this.C_NUM_OF_CLOSE_CLOUDS) { v5 = Math.round(1 + (Const.C_SKYCLOUD_CLIP_COUNT - 1) * Math.random()); v2 = this.RegisterClip(Const.C_SKY_CLOUD_CLIP_NAME_MASK + v5, this.C_MY_DEPTH_TYPE); LayMan.SetTint(v2, this.__tintColor, this.__tintCloudAmt); v2._x = -this.C_OVER_SCREEN_CLOSE_CLOUDS_X + (Const.C_SCENE_WIDTH + 2 * this.C_OVER_SCREEN_CLOSE_CLOUDS_X) * Math.random(); v2._y = Const.C_SCENE_HEIGHT * Math.random(); v2._xscale = this.C_CLOSE_CLOUD_SIZE + this.C_CLOSE_CLOUD_SIZE_VARIATION * Math.random(); v2._yscale = this.C_CLOSE_CLOUD_SIZE + this.C_CLOSE_CLOUD_SIZE_VARIATION * Math.random(); this.__closeCloudArray.push(v2); v4 = this.C_VELOCITY_OF_CLOSE_CLOUDS - (this.C_VELOCITY_DISPERSE_OF_CLOSE_CLOUDS / 2) * Math.random(); this.__closeCloudVelocity.push(v4); ++v3; } }; v2.InitPlanes = function () { this.__planeAngleArr = new Array(); var v4; var v6; var v2; var v7; var v9; var v5; var v8; v8 = false; v4 = 0; while (v4 < this.C_NUM_OF_PLANES) { v6 = v4; v7 = enums.PlaneTypes.getPlaneClip(v6); v2 = this.RegisterClip(v7, this.C_MY_DEPTH_TYPE); LayMan.SetTint(v2, this.__tintColor, this.__tintPlanesAmt); v2._x = 100 + (Const.C_SCENE_WIDTH - 200) * Math.random(); v2._y = Const.C_SCENE_HEIGHT / 3 + (Const.C_SCENE_HEIGHT / 2) * Math.random(); v5 = 30 + v4 * 10 + 30 * Math.random(); v2._xscale = v5; v2._yscale = v5; this.__planeArray.push(v2); this.__isPlaneOscillatingArray.push(v8); this.__planeOscAngleArray.push(0); var v3; v3 = new Array(); v3.push(6.283185307179586 * Math.random()); v3.push(6.283185307179586 * Math.random()); v3.push(20); v3.push(v2._x); v3.push(v2._y); this.__planeAngleArr.push(v3); ++v4; } }; v2.MoveClouds = function () { var v3; var v2; v3 = 0; while (v3 < this.C_NUM_OF_FAR_CLOUDS) { v2 = this.__farCloudArray[v3]; v2._x += this.__farCloudVelocity[v3]; if (v2._x > Const.C_SCENE_WIDTH + this.C_OVER_SCREEN_FAR_CLOUDS_X) { v2._x = -this.C_OVER_SCREEN_FAR_CLOUDS_X; v2._y = 0.6666666666666666 * Const.C_SCENE_HEIGHT + (Const.C_SCENE_HEIGHT / 4) * Math.random(); } ++v3; } v3 = 0; while (v3 < this.C_NUM_OF_CLOSE_CLOUDS) { v2 = this.__closeCloudArray[v3]; v2._x += this.__closeCloudVelocity[v3]; if (v2._x > Const.C_SCENE_WIDTH + this.C_OVER_SCREEN_CLOSE_CLOUDS_X) { v2._x = -this.C_OVER_SCREEN_CLOSE_CLOUDS_X; v2._y = Const.C_SCENE_HEIGHT * Math.random(); } ++v3; } }; v2.MovePlanes = function () { var v2; var v6; var v8; v2 = 0; while (v2 < this.C_NUM_OF_PLANES) { v6 = this.__planeArray[v2]; v8 = v6._xscale / 50; var v4; var v5; var v7; var v10; var v9; v4 = this.__planeAngleArr[v2][0]; v5 = this.__planeAngleArr[v2][1]; v7 = this.__planeAngleArr[v2][2]; v10 = this.__planeAngleArr[v2][3]; v9 = this.__planeAngleArr[v2][4]; var v3; v3 = 0.005 + Math.random() * 0.015; v4 += v3; this.__planeAngleArr[v2][0] = v4; v3 = 0.005 + Math.random() * 0.05; v5 += v3; this.__planeAngleArr[v2][1] = v5; v6._x = v10 + v8 * v7 * Math.cos(v4); v6._y = v9 - v8 * 0.7 * v7 * Math.sin(v5); ++v2; } }; v2.Render = function () { this.MoveClouds(); this.MovePlanes(); }; v2.Show = function () { this.__skyClip._visible = true; var v2; var v3; v2 = 0; while (v2 < this.C_NUM_OF_PLANES) { v3 = this.__planeArray[v2]; v3._visible = true; ++v2; } v2 = 0; while (v2 < this.C_NUM_OF_FAR_CLOUDS) { v3 = this.__farCloudArray[v2]; v3._visible = true; ++v2; } v2 = 0; while (v2 < this.C_NUM_OF_CLOSE_CLOUDS) { v3 = this.__closeCloudArray[v2]; v3._visible = true; ++v2; } }; v2.Destroy = function () { var v2; var v3; v2 = 0; while (v2 < this.__planeArray.length) { v3 = this.__planeArray[v2]; this.RemoveClip(v3); ++v2; } v2 = 0; while (v2 < this.__farCloudArray.length) { v3 = this.__farCloudArray[v2]; this.RemoveClip(v3); ++v2; } v2 = 0; while (v2 < this.__closeCloudArray.length) { v3 = this.__closeCloudArray[v2]; this.RemoveClip(v3); ++v2; } delete this.__planeArray; this.__planeArray = null; delete this.__farCloudArray; this.__farCloudArray = null; delete this.__closeCloudArray; this.__closeCloudArray = null; this.RemoveClip(this.__skyClip); this.RemoveClip(this.__landClip); this.__skyClip = null; this.__landClip = null; }; v2.RegisterClip = function (clipName, depthType) { ++this.__clipCount; return LayMan.RegisterClip(clipName, depthType); }; v2.RemoveClip = function (clip) { --this.__clipCount; return LayMan.RemoveClip(clip); }; v2.C_NUM_OF_FAR_CLOUDS = 20; v2.C_NUM_OF_CLOSE_CLOUDS = 9; v2.C_VELOCITY_OF_FAR_CLOUDS = 0.1666666666666667; v2.C_VELOCITY_DISPERSE_OF_FAR_CLOUDS = 0.08333333333333333; v2.C_VELOCITY_OF_CLOSE_CLOUDS = 1; v2.C_VELOCITY_DISPERSE_OF_CLOSE_CLOUDS = 0.8333333333333334; v2.C_NUM_OF_PLANES = 7; v2.C_OVER_SCREEN_FAR_CLOUDS_X = 150; v2.C_OVER_SCREEN_CLOSE_CLOUDS_X = 300; v2.C_CLOSE_CLOUD_SIZE = 50; v2.C_CLOSE_CLOUD_SIZE_VARIATION = 20; v2.C_FAR_CLOUD_SIZE = 12; v2.C_FAR_CLOUD_SIZE_VARIATION = 7; v2.C_MY_DEPTH_TYPE = LayMan.C_S_MENU_BKG; ASSetPropFlags(_global.MenuBkg.prototype, null, 1); } #endinitclip } movieClip 1691 __Packages.enums.SkyTypes { #initclip if (!_global.enums) { _global.enums = new Object(); } if (!_global.enums.SkyTypes) { var v1 = function () {}; enums.SkyTypes = v1; var v2 = v1.prototype; v1.getInfo = function (id, infoType) { return enums.SkyTypes.SkyInfoList[id][infoType]; }; v1.AdjustTint = function (clip, skyType, amountType) { if (skyType == undefined) { skyType = enums.SkyTypes.BLUE; } var v3; var v2; v3 = Number(enums.SkyTypes.getInfo(skyType, enums.SkyTypes.C_COLOR)); v2 = Number(enums.SkyTypes.getInfo(skyType, amountType)); if (v2 > 0) { LayMan.SetTint(clip, v3, v2); } }; v1.COUNT = 5; v1.BLUE = 0; v1.GREY = 1; v1.SUNSET = 2; v1.SUNRISE = 3; v1.NIGHT = 4; v1.C_CLIP_NAME = 0; v1.C_COLOR = 1; v1.C_CLOUD_COLOR_AMOUNT = 2; v1.C_BKG_COLOR_AMOUNT = 3; v1.C_FGD_COLOR_AMOUNT = 4; v1.C_OBJ_COLOR_AMOUNT = 5; v1.C_BRIEFING_WEATHER_CLIP_NAME = 6; v1.SkyInfoList = [['S_SKY_BLUE', 0, 0, 0, 0, 0, 'S_MISSION_WEATHER_SUNNY'], ['S_SKY_GREY', 3028791, 70, 40, 30, 20, 'S_MISSION_WEATHER_STORMY'], ['S_SKY_SUNSET', 0, 40, 40, 30, 20, 'S_MISSION_WEATHER_SUNNY'], ['S_SKY_SUNRISE', 0, 40, 40, 30, 20, 'S_MISSION_WEATHER_SUNNY'], ['S_SKY_NIGHT', 0, 90, 75, 50, 30, 'S_MISSION_WEATHER_NIGHT']]; ASSetPropFlags(enums.SkyTypes.prototype, null, 1); } #endinitclip } movieClip 1692 __Packages.WebApi { #initclip if (!_global.WebApi) { var v1 = function () {}; _global.WebApi = v1; var v2 = v1.prototype; v1.Init = function (rootObj) { WebApi.rootObject = rootObj; if (!WebApi.C_WEBAPI_ENABLED) { return undefined; } WebApi.InitInventory(); }; v1.onError = function (status) {}; v1.isUserLoggedIn = function () { if (!WebApi.C_WEBAPI_ENABLED) { return false; } WebApi.__isUserLoggedIn = com.tremorgames.TremorGames.IsLoggedIn(); return WebApi.__isUserLoggedIn; }; v1.BuyItem = function (itemId) { if (!WebApi.C_WEBAPI_ENABLED) { return undefined; } WebApi.DebugTxt('WebApi.BuyItem:itemId:' + itemId); WebApi.DebugTxt('WebApi.BuyItem:itemId:' + itemId); com.tremorgames.TremorGames.BuyItem(itemId, WebApi.BuyItemComplete, 1); }; v1.BuyItemComplete = function (status, message, itemid) { WebApi.DebugTxt('WebApi.BuyItemComplete:status:' + status + ',itemid:' + itemid); var v1; switch (status) { case 1: v1 = ''; break; case 0: v1 = 'User not logged in!'; break; case -1: v1 = 'Not enough coins!'; break; case -2: v1 = 'Item not found!'; break; case -3: v1 = 'Item already purchased!'; break; case -5: v1 = 'Unknown error!'; } if (itemid == WebApi.C_TG_ITEM_DEFENCE_MODE) { if (status == 1) { WebApi.BuyItemOK('You have purchased \n \'Defence Mode\' \n game mode'); WebApi.__mainMenu.RefreshGameModesLocking(true); } else { WebApi.BuyItemNOK(v1); } } if (itemid == WebApi.C_TG_ITEM_PILOT_FONCK) { if (status == 1) { WebApi.BuyItemOK('You have purchased \n Rene Fonck\'s \n airplane'); WebApi.__mainMenu.UnlockAirplane(enums.PlaneTypes.SPAD_7); } else { WebApi.BuyItemNOK(v1); } } if (itemid == WebApi.C_TG_ITEM_PILOT_RICKENBACKER) { if (status == 1) { WebApi.BuyItemOK('You have purchased \n Edward Rickenbacker\'s \n airplane'); WebApi.__mainMenu.UnlockAirplane(enums.PlaneTypes.SPAD_13); } else { WebApi.BuyItemNOK(v1); } } if (itemid == WebApi.C_TG_ITEM_PILOT_REDBARON) { if (status == 1) { WebApi.BuyItemOK('You have purchased \n Manfred von Richthoffen\'s \n (Red Baron\'s) \n airplane'); WebApi.__mainMenu.UnlockAirplane(enums.PlaneTypes.FOKKER); } else { WebApi.BuyItemNOK(v1); } } if (itemid == WebApi.C_TG_ITEM_ACOUSTIC_RIFLE) { if (status == 1) { WebApi.BuyItemOK('You have purchased \n Acoustic Rifle \n weapon'); WebApi.__itemsShop.RemoveLockFromItem(enums.ItemTypes.ACOUSTIC_RIFLE); } else { WebApi.BuyItemNOK(v1); } } if (itemid == WebApi.C_TG_ITEM_NUKE) { if (status == 1) { WebApi.BuyItemOK('You have purchased \n Nuke \n weapon'); WebApi.__itemsShop.RemoveLockFromItem(enums.ItemTypes.NUKE); } else { WebApi.BuyItemNOK(v1); } } if (itemid == WebApi.C_TG_ITEM_MAGNETIC_DEFLECTOR) { if (status == 1) { WebApi.BuyItemOK('You have purchased \n Magnetic Deflector \n device'); WebApi.__itemsShop.RemoveLockFromItem(enums.ItemTypes.MAGNETIC_DEFLECTOR); } else { WebApi.BuyItemNOK(v1); } } if (itemid == WebApi.C_TG_ITEM_EXTRA_CARGO_STORAGE) { if (status == 1) { WebApi.BuyItemOK('You have purchased \n Extra Cargo Storage \n device'); WebApi.__itemsShop.RemoveLockFromItem(enums.ItemTypes.EXTRA_CARGO_STORAGE); } else { WebApi.BuyItemNOK(v1); } } }; v1.isItemBought = function (itemId) { com.tremorgames.TremorGames.GetPlayerItems(WebApi.PlayerItemsComplete); var v1; var v2; v2 = WebApi.inventory.length; v1 = 0; while (v1 < v2) { if (WebApi.inventory[v1].ItemID == itemId) { return true; } ++v1; } return false; }; v1.PlayerItemsComplete = function (items) { WebApi.inventory = new Array(); if (items != null) { var v2 = 0; while (v2 < items.length) { var v1 = items[v2]; WebApi.inventory.push(v1); ++v2; } } }; v1.InitInventory = function () { if (WebApi.inventory == undefined) { com.tremorgames.TremorGames.GetPlayerItems(WebApi.PlayerItemsComplete); } }; v1.TrackStartPlay = function () { if (!WebApi.C_WEBAPI_ENABLED) { return undefined; } }; v1.TrackEvent = function (eventID, value) { if (!WebApi.C_WEBAPI_ENABLED) { return undefined; } }; v1.ShowPreloaderAd = function (clp) { if (!WebApi.C_WEBAPI_ENABLED) { return undefined; } }; v1.ShowInterlevelAd = function (clp) { if (!WebApi.C_WEBAPI_ENABLED) { return undefined; } }; v1.SaveScore = function (gameType, levelId, scoreValue, playername) { if (!WebApi.C_WEBAPI_ENABLED) { return undefined; } if (gameType !== enums.GameTypes.INS_SINGLEPLAYER) { } else { var v1; if (com.tremorgames.TremorGames.IsLoggedIn()) { v1 = com.tremorgames.TremorGames.GetPlayerName(); } else { v1 = playername; if (v1 == undefined) { v1 = GameConfig.__playerName; } } com.tremorgames.TremorGames.PostScore(v1, scoreValue); } }; v1.ShowLogin = function () { if (!WebApi.C_WEBAPI_ENABLED) { return undefined; } }; v1.HideLogin = function () { if (!WebApi.C_WEBAPI_ENABLED) { return undefined; } }; v1.ShowStore = function (gameShop) { if (!WebApi.C_WEBAPI_ENABLED) { return undefined; } if (!WebApi.isUserLoggedIn()) { WebApi.GotoTremorItemWebPage(); } else { WebApi.__itemsShop = gameShop; WebApi.GotoTremorItemWebPage(); } }; v1.ShowGameUpgrade = function (mainMenu) { if (!WebApi.C_WEBAPI_ENABLED) { return undefined; } if (!WebApi.isUserLoggedIn()) { WebApi.GotoTremorItemWebPage(); } else { WebApi.GotoTremorItemWebPage(); } }; v1.GotoTremorItemWebPage = function () { getURL(WebApi.C_TREMOR_GAME_UPGRADE_WEBSITE, Const.C_SPONSOR_WEBSITE); }; v1.UnlockAchievement = function (achType, cid) {}; v1.isAchievementUnlocked = function (achType, cid) { return false; }; v1.AddStat = function (webAPIStatsType, statValue, playername) { if (!WebApi.C_WEBAPI_ENABLED) { return undefined; } var v1; v1 = WebApi.C_STATS[webAPIStatsType]; if (webAPIStatsType == WebApi.C_SCORE) { com.tremorgames.TremorGames.PostStat(v1, statValue); var v2; if (com.tremorgames.TremorGames.IsLoggedIn()) { v2 = com.tremorgames.TremorGames.GetPlayerName(); } else { v2 = playername; if (v2 == undefined) { v2 = GameConfig.__playerName; } } } else { com.tremorgames.TremorGames.PostStat(v1, statValue); } }; v1.isInWebNetwork = function () { if (!WebApi.C_WEBAPI_ENABLED) { return true; } return com.tremorgames.TremorGames.IsGameInTremorNetwork(); }; v1.getTrackingURL = function (linkType) { if (!WebApi.C_WEBAPI_ENABLED) { return undefined; } var v2; v2 = WebApi.C_OUTGOING_LINK_NAMES[linkType]; var v1; v1 = com.tremorgames.TremorGames.GetTrackingURL(v2); return v1; }; v1.getGameURL = function () { if (!WebApi.C_WEBAPI_ENABLED) { return undefined; } var v1; v1 = com.tremorgames.TremorGames.GetGameURL(); return v1; }; v1.getHostThisGameURL = function () { if (!WebApi.C_WEBAPI_ENABLED) { return undefined; } var v1; v1 = com.tremorgames.TremorGames.HostThisGameURL(); return v1; }; v1.getTGItemURL = function (itemId) { return WebApi.C_TG_ITEM_URL_PREFIX + String(itemId); }; v1.setGameShop = function (shop) { WebApi.__itemsShop = shop; }; v1.setMainMenu = function (mainMenu) { WebApi.__mainMenu = mainMenu; }; v1.BuyItemOK = function (msg) { WebApi.DebugTxt('BuyItemOK: ' + msg); WebApi.__buyItemNotifClip.gotoAndStop('F_BEGIN'); var v1; var v2; WebApi.__buyItemNotifClip.txtclip.txt.text = msg; v1 = WebApi.__buyItemNotifClip.txtclip.txt._height; v2 = WebApi.__buyItemNotifClip.txtclip.dlg._height; WebApi.__buyItemNotifClip.txtclip.txt._y = +(Math.abs(v1 - v2) * 0.5); WebApi.__buyItemNotifClip.gotoAndPlay('F_BEGIN'); }; v1.BuyItemNOK = function (msg) { WebApi.DebugTxt('BuyItemNOK: ' + msg); WebApi.__buyItemNotifClip.gotoAndStop('F_BEGIN'); var v1; var v2; WebApi.__buyItemNotifClip.txtclip.txt.text = msg; v1 = WebApi.__buyItemNotifClip.txtclip.txt._height; v2 = WebApi.__buyItemNotifClip.txtclip.dlg._height; WebApi.__buyItemNotifClip.txtclip.txt._y = +(Math.abs(v1 - v2) * 0.5); WebApi.__buyItemNotifClip.gotoAndPlay('F_BEGIN'); }; v1.InitDebugTF = function () { if (WebApi.C_DEBUG) { WebApi.debugTF = LayMan.RegisterClip('S_DEBUG_TF', LayMan.C_S_TOGG_MENU); } WebApi.__buyItemNotifClip = LayMan.RegisterClip('S_WEBAPI_NOTIFIFATION', LayMan.C_S_TOGG_MENU); WebApi.__buyItemNotifClip.txtclip.txt.autoSize = true; WebApi.__buyItemNotifClip.gotoAndStop('F_BEGIN'); }; v1.DebugTxt = function (msg) { TextField; if (WebApi.C_DEBUG) { WebApi.debugTF.txt.text = WebApi.debugTF.txt.text + '\n' + msg; } WebApi.debugTF.txt._y = 530 - WebApi.debugTF.txt._height; }; v1.C_DEBUG = false; v1.C_WEBAPI_ENABLED = true; v1.C_LOCKED_TXT = ' [LOCKED] '; v1.C_MOCHI_GAME_ID = '57f26114aa5afc45'; v1.C_SINGLE_LEVEL_MODE_SCOREBOARD_ID = ['zzz', 'a96dc86dbc21b51c']; v1.C_SINGLEPLAYER_SCOREBOARD_ID = 'b4671585d397c024'; v1.C_DEFENCE_SCOREBOARD_ID = '49404dad96f517a7'; v1.C_MULTIPLAYER_SCOREBOARD_ID = 'a6e28a3a6808efe4'; v1.__isUserLoggedIn = false; v1.C_ACH_TYPE_LEVEL_FINISH = 0; v1.C_ACH_TYPE_MEDAL_GET = 1; v1.C_ACH_TYPE_RANK_PROMOTION = 2; v1.C_ACH_TYPE_OTHER = 3; v1.C_ACH_LEVEL_FINISH_IDS_ARRAY = ['f8262b3191c906a3', '6dd9c79d5d873aed', 'f03ad988b6fd23e5', '95f5288f15f6ccc6', 'e200a4dccfb66938', 'e0ec2fec26a8ccca', '3c3db11c92876f04', '74ef9578a483a7b1', 'ee63287e96d2be97', '81cbf491624e51ba', 'c6f573c2da883068', '6b78ad69d0f379e4', '5899d919a6f05c1e', '66c78ab55b3a3700', '403caceb0971521f', '93d2eba7d4d033af', '80cc3dbba4b66d0e', 'ce9ae3827930d7d7', '17aa1094cda8e248', 'f136de853be24eee', '5c09552489ae6531']; v1.C_ACH_MEDAL_GET_IDS_ARRAY = ['56a76600b862a148', '2ce0c71534c2092f', 'e0db40db135aefdf', '91f2aca2232a04b1', '59df7abb66ff5de1', 'ac96bf6662833682', 'fc0b4a25aadd1722', '8dc297413eb27a55', '435d6cf786681d36', 'f74a6770ce18915c']; v1.C_ACH_TYPE_RANK_PROM_IDS_ARRAY = ['zzz', '1920226e21df46ef', '583d632f36d5132c', 'c70b13bd11fc2c0c', '57c39fa7a312cf75', 'a5eaf065c615d7f3', '7d60a10e9f217d6e', 'cf341b55fae11d7a', 'f8e833f2d237189a', '2d2eb309359a0180', '2981a12e39383058']; v1.C_ACH_OTHER_FIRST_KILL = 0; v1.C_ACH_OTHER_SUICIDER = 1; v1.C_ACH_OTHER_ENGINE_STALL = 2; v1.C_ACH_OTHER_ENGINE_RESTART = 3; v1.C_ACH_OTHER_PILOTHIT = 4; v1.C_ACH_OTHER_7_WAVES = 5; v1.C_ACH_OTHER_14_WAVES = 6; v1.C_ACH_OTHER_MULTIPLAYER = 7; v1.C_ACH_OTHER_DEFEAT = 8; v1.C_ACH_OTHER = ['6d943b52ecb39971', 'e8f21f1fe6e89af8', '56635b767dc561ab', 'ed135978691c762e', 'df9f3e903a3884d5', '045db82148c1666c', 'd92a01cf27c12feb', '6dde9fa09a5f1f10', '59c1972b48fb2bce']; v1.C_GAME_ID = 33; v1.C_WEBSITE_GAME_ID = 4663; v1.C_GAME_NAME = 'Dogfight Aces'; v1.C_SECRET_KEY = 'hj76gy'; v1.C_SPONSOR_URL = Const.C_SPONSOR_WEBSITE; v1.C_LEVELS_COMPLETED = 0; v1.C_KILLS = 1; v1.C_DOUBLE_KILLS = 2; v1.C_TRIPLE_KILLS = 3; v1.C_BUFFED_KILLS = 4; v1.C_SCORE = 5; v1.C_GAME_COMPLETION_ACCURACY = 6; v1.C_NUMBER_OF_MEDALS_EARNED = 7; v1.C_LEVELS_COMPLETED_RED_BARON = 8; v1.C_KILLS_DEFENCE_MODE = 9; v1.C_RED_BARON_KILLS = 81; v1.C_STATS = ['Levels Completed', 'Kills', 'Double Kills', 'Triple Kills', 'Buffed Kills', 'Score', 'Game Completion Accuracy', 'Number Of Ingame Medals Earned', 'Levels Completed Red Baron 81 kills', 'Kills Defence Mode']; v1.C_MORE_GAMES_MAIN_MENU = 0; v1.C_MORE_GAMES_GAME_OVER = 1; v1.C_GAME_LOGO_LOAD_SCREEN = 2; v1.C_INGAME_SPONSOR_LOGO = 3; v1.C_MAIN_MENU_TREMOR_LOGO = 4; v1.C_SHOP_MENU_TREMOR_LOGO = 5; v1.C_SCORE_MENU_TREMOR_LOGO = 6; v1.C_OUTRO_TREMOR_LOGO = 7; v1.C_PLAY_WITH_ACHIEVEMENTS = 8; v1.C_HOST_GAME = 9; v1.C_MORE_GAMES_INGAME = 10; v1.C_OUTGOING_LINK_NAMES = ['More Games Game Menu', 'More Games Game Over', 'Loading Screen Game Logo', 'Ingame Game Logo', 'Main Menu Tremor Logo', 'Shop Menu Tremor Logo', 'Score Menu Tremor Logo', 'Outro Tremor Logo', 'Main Menu Play With Achievements', 'Main Menu Host This Game', 'More Games Ingame']; v1.C_TREMOR_GAME_UPGRADE_WEBSITE = 'http://www.tremorgames.com/index.php?action=shop'; v1.C_TG_ITEM_URL_PREFIX = 'http://www.tremorgames.com/index.php?action=showitem&itemid='; v1.C_TG_ITEM_EXTRA_CARGO_STORAGE = 1010; v1.C_TG_ITEM_MAGNETIC_DEFLECTOR = 1011; v1.C_TG_ITEM_NUKE = 1012; v1.C_TG_ITEM_ACOUSTIC_RIFLE = 1013; v1.C_TG_ITEM_DEFENCE_MODE = 1014; v1.C_TG_ITEM_PILOT_FONCK = 1015; v1.C_TG_ITEM_PILOT_RICKENBACKER = 1016; v1.C_TG_ITEM_PILOT_REDBARON = 1017; v1.C_TR_EVT_LEVEL_COMPLETE = 0; v1.C_TR_EVT_LEVEL_FAILED = 1; v1.C_TR_EVT_GAMETYPE_PLAY_START = 2; v1.C_TR_EVT_ITEM_BOUGHT = 3; v1.C_TR_EVT_ITEM_SOLD = 4; v1.C_TR_EVT_STAR_BOUGHT = 5; v1.C_TR_EVT_STAR_SOLD = 6; 'LevelComplete'; 'LevelFailed'; 'GameTypePlayStart'; 'ItemBought'; 'ItemSold'; 'StarBought'; v1.C_TR_EVT_ARRAY = Array.StarSold; ASSetPropFlags(_global.WebApi.prototype, null, 1); } #endinitclip } movieClip 1693 __Packages.enums.ItemTypes { #initclip if (!_global.enums) { _global.enums = new Object(); } if (!_global.enums.ItemTypes) { var v1 = function () {}; enums.ItemTypes = v1; var v2 = v1.prototype; v1.getItemInfo = function (id, infoType) { return enums.ItemTypes.ItemList[id][infoType]; }; v1.isStallingWeapon = function (id) { var v2 = enums.ItemTypes.ItemStallingArray.length; var v1; v1 = 0; while (v1 < v2) { if (id == enums.ItemTypes.ItemStallingArray[v1]) { return true; } ++v1; } return false; }; v1.isItemDefaultlyLocked = function (id) { return enums.ItemTypes.ItemDefaultLockList[id]; }; v1.ITEMS_COUNT = 20; v1.ID = 0; v1.CLASS_NO = 1; v1.CLASS = 2; v1.NAME = 3; v1.CLIP_NAME = 4; v1.MAX_PROJ_CNT = 5; v1.MIN_DAMAGE = 6; v1.MAX_DAMAGE = 7; v1.COOLDOWN = 8; v1.COST = 9; v1.SELL_COST = 10; v1.HINT = 11; v1.NONE = -1; v1.MACHINE_GUN = 0; v1.TAIL_GUN = 1; v1.TWIN_MACHINE_GUN = 2; v1.BURST_GUN = 3; v1.ACOUSTIC_RIFLE = 4; v1.MALICIOUS_PARACHUTE = 5; v1.IMPACT_BOMBS = 6; v1.HOMING_MISSILES = 7; v1.EMP_DISRUPTOR = 8; v1.NUKE = 9; v1.EMERGENCY_PARACHUTE = 10; v1.GAUSS_ACCELERATOR = 11; v1.GUIDANCE_SYSTEM = 12; v1.PROXIMITY_DETECTOR = 13; v1.BONUS_XRAY = 14; v1.AUTO_REPAIR_PACK = 15; v1.TARGETTING_SYSTEM = 16; v1.MAGNETIC_DEFLECTOR = 17; v1.ADVANCED_WEAPON_RACK = 18; v1.EXTRA_CARGO_STORAGE = 19; v1.CLASS_PRIMARY_WEAPON = 'Primary weapon'; v1.CLASS_SECONDARY_WEAPON = 'Secondary weapon'; v1.CLASS_DEVICE = 'Device'; v1.CLASS_NO_PRIMARY_WEAPON = 0; v1.CLASS_NO_SECONDARY_WEAPON = 1; v1.CLASS_NO_DEVICE = 2; v1.ItemList = [[enums.ItemTypes.MACHINE_GUN, enums.ItemTypes.CLASS_NO_PRIMARY_WEAPON, enums.ItemTypes.CLASS_PRIMARY_WEAPON, 'Machine gun', 'S_ITEM_MACHINE_GUN', 15, 1, 1, 0.4, 0, 0, 'Standard long-range machine gun with a low rate of fire.'], [enums.ItemTypes.TAIL_GUN, enums.ItemTypes.CLASS_NO_PRIMARY_WEAPON, enums.ItemTypes.CLASS_PRIMARY_WEAPON, 'Tail gun', 'S_ITEM_TAIL_GUN', 15, 1, 1, 0.2, 1700, 1000, 'Rapid firing machine gun mounted behind the pilot that fires backwards.'], [enums.ItemTypes.TWIN_MACHINE_GUN, enums.ItemTypes.CLASS_NO_PRIMARY_WEAPON, enums.ItemTypes.CLASS_PRIMARY_WEAPON, 'Twin machine gun', 'S_ITEM_TWIN_MACHINE_GUN', 15, 2, 2, 0.35, 2700, 1800, 'Mid-range machine gun with improved damage and rate of fire.'], [enums.ItemTypes.BURST_GUN, enums.ItemTypes.CLASS_NO_PRIMARY_WEAPON, enums.ItemTypes.CLASS_PRIMARY_WEAPON, 'Burst gun', 'S_ITEM_BURST_GUN', 7, 1, 2, 0.15, 3800, 2800, 'Short-range machine gun capable of firing multiple bursts in a short period of time. Excellent for close range dogfights.'], [enums.ItemTypes.ACOUSTIC_RIFLE, enums.ItemTypes.CLASS_NO_PRIMARY_WEAPON, enums.ItemTypes.CLASS_PRIMARY_WEAPON, 'Acoustic rifle', 'S_ITEM_ACOUNSTIC_RIFLE', 2, 4, 7, 6, 10000, 5000, 'Sonic weapon that fires a supersonic wave cone in front of the plane and knocks all targets back causing engine stall and significant damage.\nFirepower upgrades do not affect cooldown.'], [enums.ItemTypes.MALICIOUS_PARACHUTE, enums.ItemTypes.CLASS_NO_SECONDARY_WEAPON, enums.ItemTypes.CLASS_SECONDARY_WEAPON, 'Malicious parachute', 'S_ITEM_MALIC_PARACHUTE', 5, 0, 0, 4, 2700, 2000, 'Fires a parachute behind the plane that blinds nearby enemy planes and causes their engine to stall. Very useful for those who are being hunted from behind.'], [enums.ItemTypes.IMPACT_BOMBS, enums.ItemTypes.CLASS_NO_SECONDARY_WEAPON, enums.ItemTypes.CLASS_SECONDARY_WEAPON, 'Impact bombs', 'S_ITEM_IMPACT_BOMBS', 6, 3, 5, 4, 3000, 2300, 'Bombs that drop and explode on impact. Damages multiple planes within the blast radius \n(Splash damage).'], [enums.ItemTypes.HOMING_MISSILES, enums.ItemTypes.CLASS_NO_SECONDARY_WEAPON, enums.ItemTypes.CLASS_SECONDARY_WEAPON, 'Homing missiles', 'S_ITEM_HOMING_MISSILES', 3, 4, 6, 7, 4000, 3300, 'Heat seeking missiles that chase the closest enemy airplane until the fuel runs out.'], [enums.ItemTypes.EMP_DISRUPTOR, enums.ItemTypes.CLASS_NO_SECONDARY_WEAPON, enums.ItemTypes.CLASS_SECONDARY_WEAPON, 'EMP disruptor', 'S_ITEM_EMP_DISRUPTOR', 1, 1, 3, 15, 4500, 3000, 'Fires an EMP pulse around your plane. EMP shock causes engine damage and instantly stalls all nearby engines.'], [enums.ItemTypes.NUKE, enums.ItemTypes.CLASS_NO_SECONDARY_WEAPON, enums.ItemTypes.CLASS_SECONDARY_WEAPON, 'Nuke', 'S_ITEM_NUKE', 1, 15, 25, 13, 15000, 3000, 'Highly explosive bomb with a long cooldown that has a high chance to kill enemy pilots or deals a devastating damage to the enemy planes in its wide blast radius.\nFirepower upgrades do not affect cooldown.'], [enums.ItemTypes.EMERGENCY_PARACHUTE, enums.ItemTypes.CLASS_NO_DEVICE, enums.ItemTypes.CLASS_DEVICE, 'Emergency parachute', 'S_ITEM_EMERGENCY_PARACHUTE', 0, 0, 0, 0, 1300, 650, 'Grants 50% chance to eject from a burning cockpit and survive when critically hit.'], [enums.ItemTypes.GAUSS_ACCELERATOR, enums.ItemTypes.CLASS_NO_DEVICE, enums.ItemTypes.CLASS_DEVICE, 'Gauss accelerator', 'S_ITEM_GAUSS_ACCELERATOR', 0, 0, 0, 0, 1000, 500, 'Improves speed of all projectiles by 30%.'], [enums.ItemTypes.GUIDANCE_SYSTEM, enums.ItemTypes.CLASS_NO_DEVICE, enums.ItemTypes.CLASS_DEVICE, 'Guidance system', 'S_ITEM_GUIDANCE_SYSTEM', 0, 0, 0, 0, 1700, 500, 'Greatly improves the targetting capabilities of homing missiles.'], [enums.ItemTypes.PROXIMITY_DETECTOR, enums.ItemTypes.CLASS_NO_DEVICE, enums.ItemTypes.CLASS_DEVICE, 'Proximity detector', 'S_ITEM_PROXIMITY_DETECTOR', 0, 0, 0, 0, 1200, 500, 'Upgrades impact bombs to proximity bombs. These bombs explode if an enemy target is nearby.'], [enums.ItemTypes.BONUS_XRAY, enums.ItemTypes.CLASS_NO_DEVICE, enums.ItemTypes.CLASS_DEVICE, 'Bonus X-ray', 'S_ITEM_BONUS_XRAY', 0, 0, 0, 0, 500, 450, 'Reveals the contents of parachuting crates and detects if they have good (green) or bad (red) effects.'], [enums.ItemTypes.AUTO_REPAIR_PACK, enums.ItemTypes.CLASS_NO_DEVICE, enums.ItemTypes.CLASS_DEVICE, 'Auto-repair pack', 'S_AUTO_REPAIR_PACK', 0, 0, 0, 3, 3000, 1500, 'Automatically repairs plane overtime.'], [enums.ItemTypes.TARGETTING_SYSTEM, enums.ItemTypes.CLASS_NO_DEVICE, enums.ItemTypes.CLASS_DEVICE, 'Targetting system', 'S_ITEM_TARGETTING_SYSTEM', 0, 0, 0, 0, 1300, 750, 'Makes aiming much more easier for the pilot. Reveals the line of fire and shows pilot where to shoot.'], [enums.ItemTypes.MAGNETIC_DEFLECTOR, enums.ItemTypes.CLASS_NO_DEVICE, enums.ItemTypes.CLASS_DEVICE, 'Magnetic deflector', 'S_ITEM_MAGNETIC_DEFLECTOR', 0, 0, 0, 10, 4500, 2000, 'Places a magnetic shield around the plane that deflects projectiles. After a few deflections, the shield must recharge.'], [enums.ItemTypes.ADVANCED_WEAPON_RACK, enums.ItemTypes.CLASS_NO_DEVICE, enums.ItemTypes.CLASS_DEVICE, 'Advanced weapon rack', 'S_ITEM_ADVANCED_WEAPON_RACK', 0, 0, 0, 0, 6000, 3000, 'Increases the number of primary or secondary weapons that can be mounted on the plane at once.'], [enums.ItemTypes.EXTRA_CARGO_STORAGE, enums.ItemTypes.CLASS_NO_DEVICE, enums.ItemTypes.CLASS_DEVICE, 'Extra cargo storage', 'S_ITEM_EXTRA_CARGO_STORAGE', 0, 0, 0, 0, 6000, 3000, 'Increases the number of inventory slots that can be used for weapons/devices.']]; v1.ItemDefaultLockList = [false, false, false, false, true, false, false, false, false, true, false, false, false, false, false, false, false, true, false, true]; v1.ItemShopOrder = [enums.ItemTypes.MACHINE_GUN, enums.ItemTypes.TAIL_GUN, enums.ItemTypes.TWIN_MACHINE_GUN, enums.ItemTypes.BURST_GUN, enums.ItemTypes.ACOUSTIC_RIFLE, enums.ItemTypes.MALICIOUS_PARACHUTE, enums.ItemTypes.IMPACT_BOMBS, enums.ItemTypes.HOMING_MISSILES, enums.ItemTypes.EMP_DISRUPTOR, enums.ItemTypes.NUKE, enums.ItemTypes.EMERGENCY_PARACHUTE, enums.ItemTypes.BONUS_XRAY, enums.ItemTypes.TARGETTING_SYSTEM, enums.ItemTypes.AUTO_REPAIR_PACK, enums.ItemTypes.MAGNETIC_DEFLECTOR, enums.ItemTypes.GAUSS_ACCELERATOR, enums.ItemTypes.PROXIMITY_DETECTOR, enums.ItemTypes.GUIDANCE_SYSTEM, enums.ItemTypes.ADVANCED_WEAPON_RACK, enums.ItemTypes.EXTRA_CARGO_STORAGE]; v1.ItemStallingArray = [enums.ItemTypes.MALICIOUS_PARACHUTE, enums.ItemTypes.EMP_DISRUPTOR, enums.ItemTypes.ACOUSTIC_RIFLE]; ASSetPropFlags(enums.ItemTypes.prototype, null, 1); } #endinitclip } movieClip 1694 __Packages.gamemenu.components.ItemMatrix { #initclip if (!_global.gamemenu) { _global.gamemenu = new Object(); } if (!_global.gamemenu.components) { _global.gamemenu.components = new Object(); } if (!_global.gamemenu.components.ItemMatrix) { var v1 = function (x, y, rows, columns, shopType, isDraggable) { mx.events.EventDispatcher.initialize(this); this.__gameConfig = GameConfig.getInstance(); this.__isActionBtnHidden = false; this.__shopType = shopType; if (this.__shopType == gamemenu.components.ItemMatrix.C_SHOP_TYPE_BUY) { this.__actionButtonName = 'Buy'; } if (this.__shopType == gamemenu.components.ItemMatrix.C_SHOP_TYPE_SELL) { this.__actionButtonName = 'Sell'; } this.__isDraggingEnabled = isDraggable; this.__x = x; this.__y = y; this.__rows = rows; this.__columns = columns; this.setMaxSlots(); this.__selectedRowIdx = 0; this.__selectedColIdx = 0; this.__itemSlotsArray = new Array(); this.__itemDataArray = new Array(); var v6; var v7; var v2; var v3; var v4; var v9 = 50; var v10 = 50; x = this.__x; y = this.__y; v4 = 0; while (v4 < this.__rows) { x = this.__x; v6 = new Array(); v7 = new Array(); v3 = 0; while (v3 < this.__columns) { v2 = new MenuButton(MenuButton.C_CLIP_BTN, this.C_EMPTY_SLOT_CLIP_NAME, x, y, v9, v10, gamemenu.components.ItemMatrix.C_BTN_FEATHER, 0, '', IngMenu.C_LARGE_FONT_BORDER, false, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v2.AllowFadeOutAfterClick(false); v2.SetMaxAlpha(100); v2.addEventListener(MenuButton.EVT_CLICK, DelegatePlus.create(this, this.SelectSlot, v4, v3)); if (this.__isDraggingEnabled) { v2.addEventListener(MenuButton.EVT_CLICK, DelegatePlus.create(this, this.StartDragItem, v4, v3)); v2.addEventListener(MenuButton.EVT_RELEASE, DelegatePlus.create(this, this.ReleaseDraggedItem, v4, v3)); v2.addEventListener(MenuButton.EVT_RELEASE_OUTSIDE, DelegatePlus.create(this, this.ReleaseDraggedItem, v4, v3)); } x += v2.__skin._width + this.PAD; v6.push(v2); v7.push(enums.ItemTypes.NONE); ++v3; } this.__itemSlotsArray.push(v6); this.__itemDataArray.push(v7); y += v9 + this.PAD; ++v4; } x = this.__x; var v11 = this.__actionButtonName.length * this.C_FONT_SIZE + 20; var v12 = 27; x = this.__x + this.__columns * (v10 + this.PAD) - v11; y = this.__y - v12 - this.PAD; if (this.__shopType == gamemenu.components.ItemMatrix.C_SHOP_TYPE_BUY) { } v11 = 54; this.__actionBtn = new MenuButton(MenuButton.C_CLIP_BTN, 'S_SHOP_ACTION_BTN', x + 10, y, v11, v12, gamemenu.components.ItemMatrix.C_BTN_FEATHER, Const.C_COLOR_DARK_GOLD, this.__actionButtonName, 2, false, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); this.__actionBtn.SetLabelColor(Const.C_COLOR_WHITE); this.__actionBtn.SetLabelFormat(this.C_FONT_SIZE + 2, false, 'center'); this.__actionBtn.AllowFadeOutAfterClick(false); this.__actionBtn.addEventListener(MenuButton.EVT_CLICK, DelegatePlus.create(this, this.ActionClick)); this.__actionBtn.addEventListener(MenuButton.EVT_ROLL_OVER, DelegatePlus.create(this, this.ShowSelectedItemInfo)); this.__actionBtn.addEventListener(MenuButton.EVT_ROLL_OUT, DelegatePlus.create(this, this.HideItemInfo)); this.__actionBtn.SetHint(this.__actionButtonName + ' selected item'); this.__actionBtn.SetMaxAlpha(100); this.__selectionSlot = new MenuButton(MenuButton.C_CLIP_BTN, this.C_SELECTION_SLOT_CLIP_NAME, this.__x, this.__y, v9, v10, gamemenu.components.ItemMatrix.C_BTN_FEATHER, 0, '', IngMenu.C_LARGE_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); this.__selectionSlot.SetMaxAlpha(100); if (this.__isDraggingEnabled) { this.__draggedSlotClip = LayMan.RegisterEmptyClip('', IngMenu.C_HINT_DEPTH_TYPE); } this.__isDraggingItem = false; this.InitItemLocksArray(); }; gamemenu.components.ItemMatrix = v1; var v2 = v1.prototype; v2.FadeIn = function () { var v3; var v2; v3 = 0; while (v3 < this.__rows) { v2 = 0; while (v2 < this.__columns) { this.__itemSlotsArray[v3][v2].FadeIn(); this.__itemLocksArray[v3][v2].FadeIn(); ++v2; } ++v3; } if (!this.__isActionBtnHidden) { this.__actionBtn.FadeIn(); this.__selectionSlot.FadeIn(); } }; v2.FadeOut = function (destroyAfterFadeOut) { var v3; var v2; v3 = 0; while (v3 < this.__rows) { v2 = 0; while (v2 < this.__columns) { this.__itemSlotsArray[v3][v2].FadeOut(destroyAfterFadeOut); this.__itemLocksArray[v3][v2].FadeOut(destroyAfterFadeOut); ++v2; } ++v3; } this.__actionBtn.FadeOut(destroyAfterFadeOut); this.__selectionSlot.FadeOut(destroyAfterFadeOut); }; v2.Destroy = function () { var v3; var v2; v3 = 0; while (v3 < this.__rows) { v2 = 0; while (v2 < this.__columns) { this.__itemSlotsArray[v3][v2].Destroy(); this.__itemLocksArray[v3][v2].Destroy(); ++v2; } ++v3; } this.__actionBtn.Destroy(); this.__selectionSlot.Destroy(); }; v2.SelectSlot = function (evtObj, rowIdx, colIdx) { var v2; v2 = this.__itemDataArray[rowIdx][colIdx]; if (this.isItemLocked(v2)) { this.__infoBar.SetInfo('Warning: This item is locked!', '', '', '', ''); return undefined; } if (v2 == enums.ItemTypes.NONE) { return undefined; } var v6; var v5; v6 = this.__x + colIdx * (50 + this.PAD); v5 = this.__y + rowIdx * (50 + this.PAD); this.__selectionSlot.SetXY(v6, v5); this.__selectedRowIdx = rowIdx; this.__selectedColIdx = colIdx; }; v2.ActionClick = function (evtObj) { var v2; v2 = this.__itemDataArray[this.__selectedRowIdx][this.__selectedColIdx]; this.dispatchEvent({'target': this, 'type': 'click', 'itemId': v2}); }; v2.setMaxSlots = function () { this.__maxSlots = this.__rows * this.__columns; }; v2.isFull = function () { if (this.__occupiedSlotsCount >= this.__maxSlots) { return true; } else { return false; } }; v2.isEmpty = function () { if (this.__occupiedSlotsCount <= 0) { return true; } else { return false; } }; v2.findEmtySlotRowCol = function () { var v3; var v2; v3 = 0; while (v3 < this.__rows) { v2 = 0; while (v2 < this.__columns) { if (this.__itemDataArray[v3][v2] == enums.ItemTypes.NONE) { return [v3, v2]; } ++v2; } ++v3; } return [-1, -1]; }; v2.findNonEmtySlotRowCol = function () { var v3; var v2; v3 = 0; while (v3 < this.__rows) { v2 = 0; while (v2 < this.__columns) { if (this.__itemDataArray[v3][v2] != enums.ItemTypes.NONE) { return [v3, v2]; } ++v2; } ++v3; } return [-1, -1]; }; v2.findItemIdFromRowCol = function (itemId) { var v3; var v2; v3 = 0; while (v3 < this.__rows) { v2 = 0; while (v2 < this.__columns) { if (this.__itemDataArray[v3][v2] == itemId) { return [v3, v2]; } ++v2; } ++v3; } return [-1, -1]; }; v2.AddItem = function (itemId) { if (this.isFull()) { return undefined; } var v2; v2 = this.findEmtySlotRowCol(); var v3; var v4; v3 = v2[0]; v4 = v2[1]; this.AddItemToSlot(itemId, v3, v4); }; v2.AddItemToSlot = function (itemId, rowIdx, colIdx) { var v11; var v8; var v12; v11 = String(enums.ItemTypes.getItemInfo(itemId, enums.ItemTypes.CLIP_NAME)); v8 = String(enums.ItemTypes.getItemInfo(itemId, enums.ItemTypes.NAME)); v12 = String(enums.ItemTypes.getItemInfo(itemId, enums.ItemTypes.COST)); this.__itemSlotsArray[rowIdx][colIdx].SetSkin(v11); LayMan.SetTint(this.__itemSlotsArray[rowIdx][colIdx].__skin, 0, 0); this.__itemSlotsArray[rowIdx][colIdx].SetHint(v8); if (this.isItemLocked(itemId)) { var v10; var v9; v10 = this.__itemSlotsArray[rowIdx][colIdx].getDefX(); v9 = this.__itemSlotsArray[rowIdx][colIdx].getDefY(); var v6; v6 = new MenuButton(MenuButton.C_CLIP_BTN, 'S_SHOP_LOCKED_SLOT', v10, v9, 50, 50, gamemenu.components.ItemMatrix.C_BTN_FEATHER, 0, '', IngMenu.C_LARGE_FONT_BORDER, false, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v6.AllowFadeOutAfterClick(false); v6.SetMaxAlpha(100); v6.SetHint(v8 + gamemenu.components.ItemMatrix.C_LOCKED_HINT_TXT_PREFIX); v6.addEventListener(MenuButton.EVT_CLICK, DelegatePlus.create(this, this.SelectSlot, rowIdx, colIdx)); v6.addEventListener(MenuButton.EVT_CLICK, DelegatePlus.create(this, this.BuyTGItem, itemId)); v6.addEventListener(MenuButton.EVT_ROLL_OVER, DelegatePlus.create(this, this.ShowItemInfo, rowIdx, colIdx)); v6.addEventListener(MenuButton.EVT_ROLL_OUT, DelegatePlus.create(this, this.HideItemInfo, rowIdx, colIdx)); var v4 = ''; var v7; v7 = WebApi.isInWebNetwork(); v4 = 'Complete the campaign to unlock'; var v5 = ''; switch (itemId) { case enums.ItemTypes.EXTRA_CARGO_STORAGE: if (v7) { v5 = v4 + '\nOR\n' + 'Click To Spend 10 Tremor Coins To Unlock Extra cargo storage'; } else { v5 = v4; } break; case enums.ItemTypes.MAGNETIC_DEFLECTOR: if (v7) { v5 = v4 + '\nOR\n' + 'Click To Spend 12 Tremor Coins To Unlock Magnetic deflector'; } else { v5 = v4; } break; case enums.ItemTypes.NUKE: if (v7) { v5 = v4 + '\nOR\n' + 'Click To Spend 15 Tremor Coins To Unlock Nuke'; } else { v5 = v4; } break; case enums.ItemTypes.ACOUSTIC_RIFLE: if (v7) { v5 = v4 + '\nOR\n' + 'Click To Spend 12 Tremor Coins To Unlock Acoustic rifle'; } else { v5 = v4; } } v6.SetHint(v5); this.__itemLocksArray[rowIdx][colIdx] = v6; } this.__itemDataArray[rowIdx][colIdx] = itemId; ++this.__occupiedSlotsCount; this.__itemSlotsArray[rowIdx][colIdx].addEventListener(MenuButton.EVT_ROLL_OVER, DelegatePlus.create(this, this.ShowItemInfo, rowIdx, colIdx)); this.__itemSlotsArray[rowIdx][colIdx].addEventListener(MenuButton.EVT_ROLL_OUT, DelegatePlus.create(this, this.HideItemInfo, rowIdx, colIdx)); this.dispatchEvent({'target': this, 'type': gamemenu.components.ItemMatrix.EVT_ITEM_ADDED, 'itemId': itemId}); }; v2.RemoveItem = function (itemId) { var v3; var v4; var v2; v2 = this.findItemIdFromRowCol(itemId); v3 = v2[0]; v4 = v2[1]; this.RemoveItemFromSlot(v3, v4); this.dispatchEvent({'target': this, 'type': gamemenu.components.ItemMatrix.EVT_ITEM_REMOVED, 'itemId': itemId}); }; v2.RemoveItemFromSlot = function (rowIdx, colIdx) { this.__itemSlotsArray[rowIdx][colIdx].removeEventListener(MenuButton.EVT_ROLL_OVER); this.__itemSlotsArray[rowIdx][colIdx].removeEventListener(MenuButton.EVT_ROLL_OUT); this.__itemSlotsArray[rowIdx][colIdx].SetSkin(this.C_EMPTY_SLOT_CLIP_NAME); this.__itemSlotsArray[rowIdx][colIdx].SetHint(''); this.__itemDataArray[rowIdx][colIdx] = enums.ItemTypes.NONE; --this.__occupiedSlotsCount; }; v2.getSelectedItemId = function () { return this.__itemDataArray[this.__selectedRowIdx][this.__selectedColIdx]; }; v2.getCountOfItems = function (itemClass) { var v6 = 0; var v3; var v2; v3 = 0; while (v3 < this.__rows) { v2 = 0; while (v2 < this.__columns) { if (this.__itemDataArray[v3][v2] != enums.ItemTypes.NONE) { var v4; v4 = String(enums.ItemTypes.getItemInfo(this.__itemDataArray[v3][v2], enums.ItemTypes.CLASS)); if (v4 == itemClass || itemClass == undefined) { ++v6; } } ++v2; } ++v3; } return v6; }; v2.AddRow = function () { var v4; var v8; var v5; var v6; var v7 = 50; var v9 = 50; v4 = this.__x; v8 = this.__y + (v7 + this.PAD) * this.__rows; v5 = new Array(); v6 = new Array(); var v2; var v3; v2 = 0; while (v2 < this.__columns) { v3 = new MenuButton(MenuButton.C_CLIP_BTN, this.C_EMPTY_SLOT_CLIP_NAME, v4, v8, v7, v9, gamemenu.components.ItemMatrix.C_BTN_FEATHER, 0, '', IngMenu.C_LARGE_FONT_BORDER, false, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v3.AllowFadeOutAfterClick(false); v3.addEventListener(MenuButton.EVT_CLICK, DelegatePlus.create(this, this.SelectSlot, this.__rows, v2)); if (this.__isDraggingEnabled) { v3.addEventListener(MenuButton.EVT_CLICK, DelegatePlus.create(this, this.StartDragItem, this.__rows, v2)); v3.addEventListener(MenuButton.EVT_RELEASE, DelegatePlus.create(this, this.ReleaseDraggedItem, this.__rows, v2)); v3.addEventListener(MenuButton.EVT_RELEASE_OUTSIDE, DelegatePlus.create(this, this.ReleaseDraggedItem, this.__rows, v2)); } v4 += v3.__skin._width + this.PAD; v5.push(v3); v6.push(enums.ItemTypes.NONE); ++v2; } this.__itemSlotsArray.push(v5); this.__itemDataArray.push(v6); v2 = 0; while (v2 < this.__columns) { this.__itemSlotsArray[this.__rows][v2].FadeIn(); ++v2; } ++this.__rows; this.setMaxSlots(); }; v2.RemoveRow = function () { var v2; var v5; var v6 = true; v5 = this.__itemDataArray[this.__rows - 1]; v2 = 0; while (v2 < this.__columns) { if (v5[v2] != enums.ItemTypes.NONE) { return false; } ++v2; } var v4; var v3; v4 = this.__itemSlotsArray[this.__rows - 1]; v2 = 0; while (v2 < this.__columns) { v3 = v4[v2]; v3.FadeOut(true); ++v2; } this.__itemSlotsArray.splice(this.__rows - 1); this.__itemDataArray.splice(this.__rows - 1); --this.__rows; this.setMaxSlots(); return true; }; v2.ShowSelectedItemInfo = function (evtObj) { this.ShowItemInfo(evtObj, this.__selectedRowIdx, this.__selectedColIdx); }; v2.ShowItemInfo = function (evtObj, rowIdx, colIdx) { var v2; v2 = this.__itemDataArray[rowIdx][colIdx]; if (v2 == enums.ItemTypes.NONE) { return undefined; } var v6; var v9; var v4; var v5; var v8; if (this.isItemLocked(v2)) { v6 = String(enums.ItemTypes.getItemInfo(v2, enums.ItemTypes.NAME)) + gamemenu.components.ItemMatrix.C_LOCKED_TXT_PREFIX; } else { v6 = String(enums.ItemTypes.getItemInfo(v2, enums.ItemTypes.NAME)); } v9 = String(enums.ItemTypes.getItemInfo(v2, enums.ItemTypes.CLASS)); var v3; var v7; v3 = Number(enums.ItemTypes.getItemInfo(v2, enums.ItemTypes.MIN_DAMAGE)); v7 = Number(enums.ItemTypes.getItemInfo(v2, enums.ItemTypes.MAX_DAMAGE)); if (v3 != v7) { v4 = String(v3) + ' - ' + String(v7); } else { if (v3 != 0) { v4 = String(v3); } else { v4 = 'None'; } } if (this.__shopType == gamemenu.components.ItemMatrix.C_SHOP_TYPE_BUY) { v5 = String(enums.ItemTypes.getItemInfo(v2, enums.ItemTypes.COST)); } if (this.__shopType == gamemenu.components.ItemMatrix.C_SHOP_TYPE_SELL) { v5 = String(enums.ItemTypes.getItemInfo(v2, enums.ItemTypes.SELL_COST)); } v8 = String(enums.ItemTypes.getItemInfo(v2, enums.ItemTypes.HINT)); this.__infoBar.SetInfo('Name: ' + v6, 'Class: ' + v9, 'Damage: ' + v4, ((this.__shopType == gamemenu.components.ItemMatrix.C_SHOP_TYPE_BUY) ? 'Cost: ' : 'Sell for: ') + v5, '' + v8); }; v2.HideItemInfo = function (evtObj, rowIdx, colIdx) { var v2; v2 = GameConfig.getCurrentLevelId(); var v3; v3 = config.levels.WorldConfig.getAdviseInfo(v2); this.__infoBar.SetInfo('HINT:', v3, '', '', ''); }; v2.setInfoBar = function (infoBarObj) { this.__infoBar = infoBarObj; this.HideItemInfo(); }; v2.StartDragItem = function (evtObj, rowIdx, colIdx) { var v5; v5 = this.__itemDataArray[rowIdx][colIdx]; if (v5 == enums.ItemTypes.NONE) { return undefined; } this.__isDraggingItem = true; var v3; v3 = String(enums.ItemTypes.getItemInfo(v5, enums.ItemTypes.CLIP_NAME)); this.__draggedSlotClip = LayMan.ReRegisterClipOnSameDepth(this.__draggedSlotClip, v3); this.__draggedSlotClip._visible = true; this.__draggedSlotClip._alpha = 70; this.__draggedSlotClip._x = _root._xmouse + 10; this.__draggedSlotClip._y = _root._ymouse + 10; startDrag(this.__draggedSlotClip, false); this.dispatchEvent({'target': this, 'type': gamemenu.components.ItemMatrix.EVT_ITEM_START_DRAG, 'itemId': v5}); }; v2.ReleaseDraggedItem = function (evtObj, rowIdx, colIdx) { if (!this.__isDraggingItem) { return undefined; } var v9; v9 = this.__itemDataArray[rowIdx][colIdx]; stopDrag(); var v7; v7 = this.__draggedSlotClip._droptarget; var v3; var v2; var v6; v3 = 0; while (v3 < this.__rows) { v2 = 0; while (v2 < this.__columns) { v6 = '/' + this.__itemSlotsArray[v3][v2].__txtField._name; if (v6 == v7) { if (rowIdx == v3 && colIdx == v2) { break; } this.ReplaceItemToOtherPosition(v9, rowIdx, colIdx, this.__itemDataArray[v3][v2], v3, v2); break; } ++v2; } ++v3; } this.__draggedSlotClip._visible = false; this.__isDraggingItem = false; this.dispatchEvent({'target': this, 'type': gamemenu.components.ItemMatrix.EVT_ITEM_RELEASE_DRAG, 'itemId': v9}); }; v2.ReplaceItemToOtherPosition = function (srcItemId, srcRow, srcCol, targetItemId, targetRow, targetCol) { if (targetItemId == enums.ItemTypes.NONE) { this.AddItemToSlot(srcItemId, targetRow, targetCol); this.RemoveItemFromSlot(srcRow, srcCol); this.SelectSlot(null, targetRow, targetCol); } else { this.RemoveItemFromSlot(srcRow, srcCol); this.AddItemToSlot(targetItemId, srcRow, srcCol); this.RemoveItemFromSlot(targetRow, targetCol); this.AddItemToSlot(srcItemId, targetRow, targetCol); } }; v2.getItemList = function () { return this.__itemDataArray; }; v2.ShowMessageToInfoBar = function (messageText) { this.__infoBar.SetInfo(messageText, '', '', '', ''); }; v2.getColSize = function () { return this.__columns; }; v2.getRowSize = function () { return this.__rows; }; v2.setIsActionButtonHidden = function (isHidden) { this.__isActionBtnHidden = isHidden; }; v2.onWebApiBuyClick = function () { this.dispatchEvent({'target': this, 'type': gamemenu.components.ItemMatrix.EVT_WEBAPI_BUY_CLICKED}); }; v2.RefreshItemLocks = function () { var v8; v8 = this.__itemDataArray.length; var v3; var v2; var v4; var v7; v3 = 0; while (v3 < this.__rows) { v2 = 0; while (v2 < this.__columns) { v4 = this.__itemDataArray[v3][v2]; v7 = String(enums.ItemTypes.getItemInfo(v4, enums.ItemTypes.NAME)); var v5; var v6; v5 = v3; v6 = v2; ++v2; } ++v3; } }; v2.isItemLocked = function (itemId) { var v2; var v3; switch (itemId) { case enums.ItemTypes.ACOUSTIC_RIFLE: v3 = WebApi.C_TG_ITEM_ACOUSTIC_RIFLE; break; case enums.ItemTypes.NUKE: v3 = WebApi.C_TG_ITEM_NUKE; break; case enums.ItemTypes.MAGNETIC_DEFLECTOR: v3 = WebApi.C_TG_ITEM_MAGNETIC_DEFLECTOR; break; case enums.ItemTypes.EXTRA_CARGO_STORAGE: v3 = WebApi.C_TG_ITEM_EXTRA_CARGO_STORAGE; break; default: v3 = -1; } if (WebApi.isInWebNetwork()) { if (WebApi.isUserLoggedIn()) { if (v3 >= 0) { v2 = WebApi.isItemBought(v3); v2 = !v2; if (v2 == undefined) { } } else { v2 = enums.ItemTypes.isItemDefaultlyLocked(itemId); } } else { v2 = enums.ItemTypes.isItemDefaultlyLocked(itemId); } } else { v2 = enums.ItemTypes.isItemDefaultlyLocked(itemId); } var v5; v5 = this.__gameConfig.isCampaignCompleted(); if (v5) { v2 = false; } return v2; }; v2.InitItemLocksArray = function () { this.__itemLocksArray = new Array(); var v2; var v4; var v3; v4 = 0; while (v4 < this.__rows) { v3 = new Array(); v2 = 0; while (v2 < this.__columns) { v3.push(undefined); ++v2; } this.__itemLocksArray.push(v3); ++v4; } }; v2.BuyTGItem = function (evt, itemId) { var v2; switch (itemId) { case enums.ItemTypes.ACOUSTIC_RIFLE: v2 = WebApi.C_TG_ITEM_ACOUSTIC_RIFLE; break; case enums.ItemTypes.NUKE: v2 = WebApi.C_TG_ITEM_NUKE; break; case enums.ItemTypes.MAGNETIC_DEFLECTOR: v2 = WebApi.C_TG_ITEM_MAGNETIC_DEFLECTOR; break; case enums.ItemTypes.EXTRA_CARGO_STORAGE: v2 = WebApi.C_TG_ITEM_EXTRA_CARGO_STORAGE; break; default: v2 = -1; } if (WebApi.isInWebNetwork()) { if (v2 > 0) { WebApi.BuyItem(v2); } } else { if (v2 > 0) { this.RedirectToWeaponItemURL(v2); } } }; v2.RedirectToWeaponItemURL = function (itemId) { var v1; v1 = WebApi.getTGItemURL(itemId); getURL(v1, Const.C_SPONSOR_WEBSITE); }; v2.RemoveLockFromItem = function (itemId) { var v2; var v3; var v4; v4 = this.findItemIdFromRowCol(itemId); v2 = v4[0]; v3 = v4[1]; WebApi.DebugTxt('Unlocking:itemId:' + itemId + ',r:' + v2 + ',c:' + v3 + ', __itemLocksArray:' + this.__itemLocksArray); this.__itemLocksArray[v2][v3].FadeOut(true); }; v1.EVT_ITEM_ADDED = 'itemadded'; v1.EVT_ITEM_REMOVED = 'itemremoved'; v1.EVT_ITEM_START_DRAG = 'itemstartdrag'; v1.EVT_ITEM_RELEASE_DRAG = 'itemreleasedrag'; v1.EVT_WEBAPI_BUY_CLICKED = 'webapibuyclicked'; v1.C_SHOP_TYPE_BUY = 0; v1.C_SHOP_TYPE_SELL = 1; v1.C_LOCKED_TXT_PREFIX = WebApi.C_LOCKED_TXT; v1.C_LOCKED_HINT_TXT_PREFIX = WebApi.C_LOCKED_TXT + '\nTip: Click and spend tremor coins to unlock weapon'; v1.C_LOCKED_TINT_VAL = 70; v2.C_EMPTY_SLOT_CLIP_NAME = 'S_SHOP_EMPTY_SLOT'; v2.C_SELECTION_SLOT_CLIP_NAME = 'S_SHOP_SLOT_SELECTION'; v2.C_FONT_SIZE = 13; v1.C_BTN_FEATHER = 10; v2.PAD = 5; v2.__occupiedSlotsCount = 0; ASSetPropFlags(gamemenu.components.ItemMatrix.prototype, null, 1); } #endinitclip } movieClip 1695 __Packages.gamemenu.components.InfoBar { #initclip if (!_global.gamemenu) { _global.gamemenu = new Object(); } if (!_global.gamemenu.components) { _global.gamemenu.components = new Object(); } if (!_global.gamemenu.components.InfoBar) { var v1 = function (x, y, w, h) { this.__x = x; this.__y = y; this.__width = w; this.__height = h; var v2; v2 = this.__y; this.__itemName = new MenuButton(MenuButton.C_RECT_BTN, '', x, v2, this.__width, this.__height - (v2 - this.__y), this.C_BTN_FEATHER, 0, '', 5, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v2 += this.C_Y_OFS; this.__itemName.SetLabelFormat(this.C_FONT_SIZE + 2, true, 'left'); this.__itemName.SetMaxAlpha(100); v2 += 2; this.__itemType = new MenuButton(MenuButton.C_CLIP_BTN, '', x, v2, this.__width, this.__height - (v2 - this.__y), this.C_BTN_FEATHER, 0, '', 5, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v2 += this.C_Y_OFS; this.__itemType.SetLabelFormat(this.C_FONT_SIZE, false, 'left'); this.__itemType.SetMaxAlpha(100); this.__itemDamage = new MenuButton(MenuButton.C_CLIP_BTN, '', x, v2, this.__width, this.__height - (v2 - this.__y), this.C_BTN_FEATHER, 0, '', 5, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v2 += this.C_Y_OFS; this.__itemDamage.SetLabelFormat(this.C_FONT_SIZE, false, 'left'); this.__itemDamage.SetMaxAlpha(100); this.__itemCost = new MenuButton(MenuButton.C_CLIP_BTN, '', x, v2, this.__width, this.__height - (v2 - this.__y), this.C_BTN_FEATHER, 0, '', 5, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v2 += this.C_Y_OFS; this.__itemCost.SetLabelFormat(this.C_FONT_SIZE, false, 'left'); this.__itemCost.SetMaxAlpha(100); this.__itemDescription = new MenuButton(MenuButton.C_CLIP_BTN, '', x, v2, this.__width, this.__height - (v2 - this.__y), this.C_BTN_FEATHER, 0, '', 5, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v2 += this.C_Y_OFS; this.__itemDescription.SetLabelFormat(this.C_FONT_SIZE, false, 'left'); this.__itemDescription.SetMaxAlpha(100); }; gamemenu.components.InfoBar = v1; var v2 = v1.prototype; v2.SetInfo = function (itemName, itemType, itemDamage, itemCost, itemDescription) { this.SetLabelsColorProfile(gamemenu.components.InfoBar.C_BUY_ITEM_INFO); if (itemName == undefined) { itemName = ''; } if (itemType == undefined) { itemType = ''; } if (itemDamage == undefined) { itemDamage = ''; } if (itemCost == undefined) { itemCost = ''; } if (itemDescription == undefined) { itemDescription = ''; } this.__itemName.SetLabel(itemName); this.__itemType.SetLabel(itemType); this.__itemDamage.SetLabel(itemDamage); this.__itemCost.SetLabel(itemCost); this.__itemDescription.SetLabel(itemDescription); }; v2.SetLabelsColorProfile = function (colorProfileId) { switch (colorProfileId) { case gamemenu.components.InfoBar.C_BUY_ITEM_INFO: this.__itemName.SetLabelColor(Const.C_COLOR_WHITE); this.__itemType.SetLabelColor(Const.C_COLOR_GRAY); this.__itemDamage.SetLabelColor(Const.C_COLOR_RED); this.__itemCost.SetLabelColor(Const.C_COLOR_ORANGE); this.__itemDescription.SetLabelColor(Const.C_COLOR_WHITE); break; case gamemenu.components.InfoBar.C_BUY_ITEM_INFO: this.__itemName.SetLabelColor(Const.C_COLOR_ORANGE); this.__itemType.SetLabelColor(Const.C_COLOR_GRAY); this.__itemDamage.SetLabelColor(Const.C_COLOR_WHITE); this.__itemCost.SetLabelColor(Const.C_COLOR_ORANGE); this.__itemDescription.SetLabelColor(Const.C_COLOR_WHITE); break; case gamemenu.components.InfoBar.C_ATTRIBUTE_INFO: this.__itemName.SetLabelColor(Const.C_COLOR_ORANGE); this.__itemType.SetLabelColor(Const.C_COLOR_GRAY); this.__itemDamage.SetLabelColor(Const.C_COLOR_WHITE); this.__itemCost.SetLabelColor(Const.C_COLOR_ORANGE); this.__itemDescription.SetLabelColor(Const.C_COLOR_WHITE); } }; v2.FadeIn = function () { this.__itemName.FadeIn(); this.__itemType.FadeIn(); this.__itemDamage.FadeIn(); this.__itemCost.FadeIn(); this.__itemDescription.FadeIn(); }; v2.FadeOut = function (destroyAfterFadeOut) { this.__itemName.FadeOut(destroyAfterFadeOut); this.__itemType.FadeOut(destroyAfterFadeOut); this.__itemDamage.FadeOut(destroyAfterFadeOut); this.__itemCost.FadeOut(destroyAfterFadeOut); this.__itemDescription.FadeOut(destroyAfterFadeOut); }; v2.Destroy = function () { this.__itemName.Destroy(); this.__itemType.Destroy(); this.__itemDamage.Destroy(); this.__itemCost.Destroy(); this.__itemDescription.Destroy(); }; v1.C_BUY_ITEM_INFO = 0; v1.C_SELL_ITEM_INFO = 1; v1.C_ATTRIBUTE_INFO = 2; v2.C_FONT_SIZE = 13; v2.C_BTN_FEATHER = 10; v2.C_Y_OFS = 16; ASSetPropFlags(gamemenu.components.InfoBar.prototype, null, 1); } #endinitclip } movieClip 1696 __Packages.IngMenu { #initclip if (!_global.IngMenu) { var v1 = function (parentGame) { this.__parentGame = parentGame; this.__myWorld = this.__parentGame.getWorld(); this.__toggleMenu = this.__parentGame.getToggleMenu(); this.__gameConfig = this.__parentGame.getGameConfig(); this.__worldConfig = this.__parentGame.getWorldConfig(); this.__pagesArray = new Array(); this.CreateBriefing(); }; _global.IngMenu = v1; var v2 = v1.prototype; v2.CreateScoreTable = function () { var v10; var v30; v10 = new MenuPage('Score table', null); var v12 = 275; var v11 = 200; var v28 = 50; var v21 = 13; var v20 = 14; v12 = 10; v11 = 30; var v9 = 180; var v17 = 300; var v8 = 10; v28 = 50; v10 = new MenuPage('ScoreTable', null); v30 = null; var v27; var v26 = Const.C_MAX_NUM_OF_PLAYERS * (v9 + v8) + v8; var v29 = v17; v27 = new MenuButton(MenuButton.C_RECT_BTN, '', v12, v11, v26, v29, IngMenu.C_BTN_FEATHER, 0, '', IngMenu.C_SMALL_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); this.pxPlaneClips = new Array(); this.pxScoreLadder = new Array(); this.pxScoreHeaders = new Array(); this.pxScoreValues = new Array(); this.pxTotalScoreHeaders = new Array(); this.pxTotalScoreValues = new Array(); var v2; var v3; var v19; var v18; var v22 = v9 / 2; v3 = 0; while (v3 < Const.C_MAX_NUM_OF_PLAYERS) { v19 = v12 + v8 + v9 * v3 + v8 * v3 + v22; v18 = v11 + 20; switch (v3) { case 0: v2 = new MenuButton(MenuButton.C_CLIP_BTN, Const.C_PLAYER_1_PLANE_CLIP_NAME, v19, v18, 90, 40, IngMenu.C_BTN_FEATHER, 0, '', IngMenu.C_LARGE_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); break; case 1: v2 = new MenuButton(MenuButton.C_CLIP_BTN, Const.C_PLAYER_2_PLANE_CLIP_NAME, v19, v18, 90, 40, IngMenu.C_BTN_FEATHER, 0, '', IngMenu.C_LARGE_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); break; case 2: v2 = new MenuButton(MenuButton.C_CLIP_BTN, Const.C_PLAYER_3_PLANE_CLIP_NAME, v19, v18, 90, 40, IngMenu.C_BTN_FEATHER, 0, '', IngMenu.C_LARGE_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); break; case 3: v2 = new MenuButton(MenuButton.C_CLIP_BTN, Const.C_PLAYER_4_PLANE_CLIP_NAME, v19, v18, 90, 40, IngMenu.C_BTN_FEATHER, 0, '', IngMenu.C_LARGE_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); } v2.__skin._xscale = 75; v2.__skin._yscale = 75; v2.SetMaxAlpha(100); v2.setIsSkinStatic(true); this.pxPlaneClips.push(v2); var v13; var v14; var v16; var v15; v13 = v12 + v8 + v9 * v3 + v8 * v3; v14 = v11 + 40; v16 = v9; v15 = v17 - 20; switch (v3) { case 0: v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', v13, v14, v16, v15, IngMenu.C_BTN_FEATHER, 0, 'WINNER', IngMenu.C_LARGE_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); break; case 1: v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', v13, v14, v16, v15, IngMenu.C_BTN_FEATHER, 0, '2nd', IngMenu.C_LARGE_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); break; case 2: v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', v13, v14, v16, v15, IngMenu.C_BTN_FEATHER, 0, '3rd', IngMenu.C_LARGE_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); break; case 3: v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', v13, v14, v16, v15, IngMenu.C_BTN_FEATHER, 0, ' 4th', IngMenu.C_LARGE_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); } v2.SetLabelFormat(18, false, 'center'); v2.SetMaxAlpha(100); this.pxScoreLadder.push(v2); var v5; var v6; var v4; var v7; v5 = v12 + v8 + v9 * v3 + v8 * v3; v6 = v11 + v8 + 60; v4 = v9; v7 = v17 - 20; switch (v3) { case 0: v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', v5, v6, v4, v7, IngMenu.C_BTN_FEATHER, 0, 'hdr1', IngMenu.C_LARGE_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); break; case 1: v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', v5, v6, v4, v7, IngMenu.C_BTN_FEATHER, 0, 'hdr2', IngMenu.C_LARGE_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); break; case 2: v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', v5, v6, v4, v7, IngMenu.C_BTN_FEATHER, 0, 'hdr3', IngMenu.C_LARGE_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); break; case 3: v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', v5, v6, v4, v7, IngMenu.C_BTN_FEATHER, 0, 'hdr4', IngMenu.C_LARGE_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); } v2.SetLabelFormat(v21, false, 'left'); v2.SetMaxAlpha(100); this.pxScoreHeaders.push(v2); v5 = v12 + v8 + v9 * v3 + v8 * v3; v6 = v11 + v8 + 60; v4 = v9; v7 = v17 - 20; switch (v3) { case 0: v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', v5, v6, v4, v7, IngMenu.C_BTN_FEATHER, 0, 'Val1', IngMenu.C_LARGE_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); break; case 1: v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', v5, v6, v4, v7, IngMenu.C_BTN_FEATHER, 0, 'Val2', IngMenu.C_LARGE_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); break; case 2: v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', v5, v6, v4, v7, IngMenu.C_BTN_FEATHER, 0, 'Val3', IngMenu.C_LARGE_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); break; case 3: v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', v5, v6, v4, v7, IngMenu.C_BTN_FEATHER, 0, 'Val4', IngMenu.C_LARGE_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); } v2.SetLabelFormat(v21, false, 'right'); v2.SetMaxAlpha(100); this.pxScoreValues.push(v2); v5 = v12 + v8 + v9 * v3 + v8 * v3; v6 = v11 + v17 - 55; v4 = v9; v7 = 60; switch (v3) { case 0: v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', v5, v6, v4, v7, IngMenu.C_BTN_FEATHER, 0, 'THdr1', IngMenu.C_LARGE_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); break; case 1: v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', v5, v6, v4, v7, IngMenu.C_BTN_FEATHER, 0, 'THdr2', IngMenu.C_LARGE_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); break; case 2: v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', v5, v6, v4, v7, IngMenu.C_BTN_FEATHER, 0, 'THdr3', IngMenu.C_LARGE_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); break; case 3: v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', v5, v6, v4, v7, IngMenu.C_BTN_FEATHER, 0, 'THdr4', IngMenu.C_LARGE_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); } v2.SetLabelFormat(v20, false, 'left'); v2.SetMaxAlpha(100); v2.SetLabelColor(Const.C_COLOR_ORANGE); this.pxTotalScoreHeaders.push(v2); v5 = v12 + v8 + v9 * v3 + v8 * v3; v6 = v11 + v17 - 55; v4 = v9; v7 = 60; switch (v3) { case 0: v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', v5, v6, v4, v7, IngMenu.C_BTN_FEATHER, 0, 'TVal1', IngMenu.C_LARGE_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); break; case 1: v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', v5, v6, v4, v7, IngMenu.C_BTN_FEATHER, 0, 'TVal2', IngMenu.C_LARGE_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); break; case 2: v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', v5, v6, v4, v7, IngMenu.C_BTN_FEATHER, 0, 'TVal3', IngMenu.C_LARGE_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); break; case 3: v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', v5, v6, v4, v7, IngMenu.C_BTN_FEATHER, 0, 'Tval4', IngMenu.C_LARGE_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); } v2.SetLabelFormat(v20, false, 'right'); v2.SetLabelColor(Const.C_COLOR_ORANGE); v2.SetMaxAlpha(100); this.pxTotalScoreValues.push(v2); ++v3; } var v24; v24 = new MenuButton(MenuButton.C_RECT_BTN, '', 25, 540, 100, 40, IngMenu.C_BTN_FEATHER, 0, 'Menu', IngMenu.C_LARGE_FONT_BORDER, false, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v24.addEventListener('click', mx.utils.Delegate.create(v10, v10.FadeOut)); v24.addEventListener('click', mx.utils.Delegate.create(this, this.ReturnToMainMenu)); var v25; v25 = new MenuButton(MenuButton.C_RECT_BTN, '', 150, 540, 100, 40, IngMenu.C_BTN_FEATHER, 0, 'Restart', IngMenu.C_LARGE_FONT_BORDER, false, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v25.addEventListener('click', mx.utils.Delegate.create(v10, v10.FadeOut)); v25.addEventListener('click', mx.utils.Delegate.create(this, this.RestartGame)); var v23; v23 = new MenuButton(MenuButton.C_RECT_BTN, '', 600, 540, 180, 40, IngMenu.C_BTN_FEATHER, Const.C_SPONSOR_BUTTONS_COLOR, 'More games', IngMenu.C_LARGE_FONT_BORDER, false, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v23.AllowFadeOutAfterClick(false); v23.addEventListener('click', mx.utils.Delegate.create(this, this.RedirectToSponsorSite)); this.bSubmitScore = new MenuButton(MenuButton.C_RECT_BTN, '', 650, 540, v9, 40, IngMenu.C_BTN_FEATHER, Const.C_SPONSOR_BUTTONS_COLOR, 'Submit score', IngMenu.C_LARGE_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v10.AddItem(v27); v3 = 0; while (v3 < Const.C_MAX_NUM_OF_PLAYERS) { v10.AddItem(this.pxPlaneClips[v3]); v10.AddItem(this.pxScoreLadder[v3]); v10.AddItem(this.pxScoreHeaders[v3]); v10.AddItem(this.pxScoreValues[v3]); v10.AddItem(this.pxTotalScoreHeaders[v3]); v10.AddItem(this.pxTotalScoreValues[v3]); ++v3; } v10.AddItem(v24); v10.AddItem(v23); v10.AddItem(v25); this.__pagesArray.push(v10); this.__scorePageIdx = this.__pagesArray.length - 1; }; v2.CreateShop = function () { var v6; v6 = _global.GameConf.getPlayersPlaneConfig(); var v31; v31 = v6.getPlaneType(); var v4; var v34; v4 = new MenuPage('Shop', null); var v13 = 12; var v20 = 30; var v17 = 776; var v21 = 565; var v18; v18 = new MenuButton(MenuButton.C_RECT_BTN, '', v13, v20, v17, v21, MainMenu.C_BTN_FEATHER, 0, 'Upgrade your plane', MainMenu.C_SMALL_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v18.SetLabelColor(Const.C_COLOR_ORANGE); v18.SetLabelFormat(22, false, 'left'); v18.AllowFadeOutAfterClick(false); v4.AddItem(v18); var v15; v15 = new MenuButton(MenuButton.C_CLIP_BTN, enums.PlaneTypes.C_PLAYER_PLANE_CLIP_NAME[v31], v13 + 120, v20 + 75, 0, 0, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_SMALL_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v15.__skin._xscale = 150; v15.__skin._yscale = 150; v15.SetMaxAlpha(100); v15.setIsSkinStatic(true); v4.AddItem(v15); var v12 = v13 + 40; var v5 = 140; var v26 = v5; var v7 = 30; var v25 = v7 + 10; var v23; v23 = new MenuButton(MenuButton.C_CLIP_BTN, '', v13 + v7 / 2, v5, v17, v21, MainMenu.C_BTN_FEATHER, 0, 'Plane attributes', MainMenu.C_SMALL_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v23.SetLabelColor(Const.C_COLOR_ORANGE); v23.SetLabelFormat(18, false, 'left'); v4.AddItem(v23); v12 += 30; v5 += v25; var v28; v28 = v6.getCash(); this.__cashCounter = new gamemenu.components.CashCounter(v12 + 400, v20 + v7 + v7 / 2 + 30, v28); v4.AddItem(this.__cashCounter); var v8; v8 = new Array(); var v11; var v10; var v16 = true; v11 = v6.getPlaneAttributeLimit(PlaneConfig.C_ATTR_FIREPOWER); v10 = v6.getPlaneAttribute(PlaneConfig.C_ATTR_FIREPOWER); this.__firepowerAttr = new gamemenu.components.AttribAdjuster(v12, v5, PlaneConfig.C_ATTR_FIREPOWER, v11, v10, this.__cashCounter, v16); v5 += v7; v4.AddItem(this.__firepowerAttr); v8.push(this.__firepowerAttr); v11 = v6.getPlaneAttributeLimit(PlaneConfig.C_ATTR_SPEED); v10 = v6.getPlaneAttribute(PlaneConfig.C_ATTR_SPEED); this.__speedAttr = new gamemenu.components.AttribAdjuster(v12, v5, PlaneConfig.C_ATTR_SPEED, v11, v10, this.__cashCounter, v16); v5 += v7; v4.AddItem(this.__speedAttr); v8.push(this.__speedAttr); v11 = v6.getPlaneAttributeLimit(PlaneConfig.C_ATTR_AGILITY); v10 = v6.getPlaneAttribute(PlaneConfig.C_ATTR_AGILITY); this.__agilityAttr = new gamemenu.components.AttribAdjuster(v12, v5, PlaneConfig.C_ATTR_AGILITY, v11, v10, this.__cashCounter, v16); v5 += v7; v4.AddItem(this.__agilityAttr); v8.push(this.__agilityAttr); v11 = v6.getPlaneAttributeLimit(PlaneConfig.C_ATTR_THRUST); v10 = v6.getPlaneAttribute(PlaneConfig.C_ATTR_THRUST); this.__thrustAttr = new gamemenu.components.AttribAdjuster(v12, v5, PlaneConfig.C_ATTR_THRUST, v11, v10, this.__cashCounter, v16); v5 += v7; v4.AddItem(this.__thrustAttr); v8.push(this.__thrustAttr); v11 = v6.getPlaneAttributeLimit(PlaneConfig.C_ATTR_ARMOUR); v10 = v6.getPlaneAttribute(PlaneConfig.C_ATTR_ARMOUR); this.__armourAttr = new gamemenu.components.AttribAdjuster(v12, v5, PlaneConfig.C_ATTR_ARMOUR, v11, v10, this.__cashCounter, v16); v5 += v7 - 10; v4.AddItem(this.__armourAttr); v8.push(this.__armourAttr); var v22; v22 = new MenuButton(MenuButton.C_CLIP_BTN, '', v13 + v7 / 2, v5, v17, v21, MainMenu.C_BTN_FEATHER, 0, 'Mounted devices', MainMenu.C_SMALL_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v22.SetLabelColor(Const.C_COLOR_ORANGE); v22.SetLabelFormat(18, false, 'left'); v4.AddItem(v22); v5 += v25 + 5; var v27; var v29; v27 = v6.getBuyedItemList(); v29 = v6.getWeaponLimit(); this.__planeInventory = new gamemenu.components.PlaneInventory(v12 - v7, v5, 2, 4, gamemenu.components.ItemMatrix.C_SHOP_TYPE_SELL, true, this.__cashCounter, v27, v29); v4.AddItem(this.__planeInventory); var v24; v24 = new MenuButton(MenuButton.C_CLIP_BTN, '', v13 + 400 + v7 / 2, v26, v17, v21, MainMenu.C_BTN_FEATHER, 0, 'Device shop', MainMenu.C_SMALL_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v24.SetLabelColor(Const.C_COLOR_ORANGE); v24.SetLabelFormat(18, false, 'left'); v4.AddItem(v24); var v35; var v33 = 300; var v32 = 300; var v36; this.__gameShop = new gamemenu.components.GameShop(v12 + 400, v26 + v25 + 5, 4, 5, gamemenu.components.ItemMatrix.C_SHOP_TYPE_BUY, false, this.__planeInventory, this.__cashCounter); v4.AddItem(this.__gameShop); v5 += 50; var v9; v9 = new gamemenu.components.InfoBar(400, 410, 350, 165); this.__planeInventory.setInfoBar(v9); var v3; var v14; v14 = v8.length; v3 = 0; while (v3 < v14) { v8[v3].setInfoBar(v9); ++v3; } this.__planeInventory.setInfoBar(v9); this.__gameShop.setInfoBar(v9); v4.AddItem(v9); var v19; v19 = new MenuButton(MenuButton.C_CLIP_BTN, '', v13 + 400 + v7 / 2, v20 + 30, v17, 40, MainMenu.C_BTN_FEATHER, 0, 'Cash', MainMenu.C_SMALL_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v19.SetLabelColor(Const.C_COLOR_ORANGE); v19.SetLabelFormat(18, false, 'left'); v19.AllowFadeOutAfterClick(false); v4.AddItem(v19); var v30; v30 = new MenuButton(MenuButton.C_RECT_BTN, '', 25, 540, 100, 40, IngMenu.C_BTN_FEATHER, 0, 'Done', IngMenu.C_LARGE_FONT_BORDER, false); v4.AddItem(v30); this.__pagesArray.push(v4); this.__pagesArray[1].FadeIn(); }; v2.CreateBriefing = function () { var v3; v3 = this.__worldConfig.getLevelConfigObj(); var v2; var v12; v2 = new MenuPage('Briefing', null); var v10 = 12; var v8 = 30; var v11 = 776; var v9 = 565; this.CreateBlankPage(v2, 'Mission briefing'); this.AddDesc(v2, String(v3.getConfigItem(config.levels.LevelConfig.TITLE)), String(v3.getConfigItem(config.levels.LevelConfig.SUBTITLE))); var v6; v6 = Number(v3.getConfigItem(config.levels.LevelConfig.LOCATION)); var v7; v7 = String(enums.LocationTypes.getLocationInfo(v6, enums.LocationTypes.C_INFO_NAME)); this.AddDesc(v2, 'Location', v7); var v4; v4 = v3.getConfigItemArr(config.levels.LevelConfig.OBJECTIVE_CLIP_DESC); this.AddXClipDesc(v2, 'Objective', v4); v4 = v3.getConfigItemArr(config.levels.LevelConfig.WEATHER_CLIP_DESC); this.AddXClipDesc(v2, 'Weather', v4); v4 = v3.getConfigItemArr(config.levels.LevelConfig.HINTS_CLIP_DESC); this.AddXClipDesc(v2, 'Hints', v4); this.__pagesArray.push(v2); var v5; v5 = new MenuButton(MenuButton.C_RECT_BTN, '', 650, 540, 100, 40, IngMenu.C_BTN_FEATHER, 0, 'Play', IngMenu.C_LARGE_FONT_BORDER, false, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v5.addEventListener('click', mx.utils.Delegate.create(this, this.ExitFromBriefingAndStartGame)); v2.AddItem(v5); v2.FadeIn(); }; v2.ResetScoreTable = function () { var v2; var v3; v3 = this.pxScoreLadder.length; v2 = 0; while (v2 < v3) { this.pxScoreLadder[v2].SetLabel(''); ++v2; } v3 = this.pxScoreHeaders.length; v2 = 0; while (v2 < v3) { this.pxScoreHeaders[v2].SetLabel(''); ++v2; } v3 = this.pxScoreValues.length; v2 = 0; while (v2 < v3) { this.pxScoreValues[v2].SetLabel(''); ++v2; } v3 = this.pxTotalScoreHeaders.length; v2 = 0; while (v2 < v3) { this.pxTotalScoreHeaders[v2].SetLabel(''); ++v2; } v3 = this.pxTotalScoreValues.length; v2 = 0; while (v2 < v3) { this.pxTotalScoreValues[v2].SetLabel(''); ++v2; } }; v2.Show = function () { this.__pagesArray[0].FadeIn(); }; v2.GetScoreObject = function (objType) { switch (objType) { case 'SCORE_HEADERS': return this.pxScoreHeaders; break; case 'SCORE_VALUES': return this.pxScoreValues; break; case 'TOTAL_SCORE_HEADERS': return this.pxTotalScoreHeaders; break; case 'TOTAL_SCORE_HEADERS': return this.pxTotalScoreHeaders; break; case 'TOTAL_SCORE_VALUES': return this.pxTotalScoreValues; } }; v2.GetSubmitScoreObj = function () { return this.bSubmitScore; }; v2.Hide = function () { this.__pagesArray[0].FadeOut(); }; v2.ReturnToMainMenu = function () { this.__toggleMenu.QuitBtnHide(); this.bSubmitScore.FadeOut(true); this.__myWorld.Destroy(); gotoAndPlay('Game_menu_init'); }; v2.PlayGame = function (evt) { var v3; v3 = _global.GameConfig.getGameType(); this.__toggleMenu.QuitBtnShow(); gotoAndPlay('Init'); }; v2.RestartGame = function () { this.bSubmitScore.FadeOut(true); this.__myWorld.Destroy(); this.PlayGame(); }; v2.RedirectToSponsorSite = function () { var v1; getURL(Const.C_SPONSOR_WEBSITE, 'Sponsor website'); }; v2.Destroy = function () { var v2; var v3; v3 = this.__pagesArray.length; v2 = 0; while (v2 < v3) { this.__pagesArray[v2].FadeOut(true); ++v2; } this.bSubmitScore.FadeOut(true); }; v2.SaveDataFromShopToPlaneConfig = function () { var v3; v3 = _global.GameConf.getPlayersPlaneConfig(); v3.SavePlaneAttributes(this.__firepowerAttr, this.__speedAttr, this.__agilityAttr, this.__thrustAttr, this.__armourAttr); v3.SaveBuyedItemList(this.__planeInventory.getItemList()); v3.SaveCash(this.__cashCounter); }; v2.AddDesc = function (thisPage, SubTitle, Desc) { var v2; var v6; var v5; var v7; var v10; v6 = thisPage.getVacantRowX() + this.C_DEF_PADDING; v5 = thisPage.getVacantRowY(); v7 = this.C_DEF_PAGE_WIDTH; v10 = this.C_DEF_PAGE_HEIGHT; if (SubTitle != undefined && SubTitle != '') { var v3; v3 = new MenuButton(MenuButton.C_CLIP_BTN, '', v6, v5, v7 - 2 * this.C_DEF_PADDING, 30, MainMenu.C_BTN_FEATHER, 0, SubTitle, 0, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v3.AllowFadeOutAfterClick(false); v3.SetLabelColor(Const.C_COLOR_ORANGE); v3.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v3.setAutoSize('center'); v3.SetMaxAlpha(100); thisPage.AddItem(v3); thisPage.incVacantRowY(this.C_DESC_FONT_SIZE + 5); v5 = thisPage.getVacantRowY(); } v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', v6, v5, v7 - 3 * this.C_DEF_PADDING, 50, MainMenu.C_BTN_FEATHER, 0, Desc, 0, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v2.AllowFadeOutAfterClick(false); v2.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v2.setAutoSize('center'); v2.SetMaxAlpha(100); thisPage.AddItem(v2); var v8; v8 = v2.__txtField._height; thisPage.incVacantRowY(v8 + this.C_DEF_PADDING); }; v2.AddClipDesc = function (thisPage, SubTitle, clipName, clipMask, Desc) { var v8; var v6; var v10; var v14; v8 = thisPage.getVacantRowX() + this.C_DEF_PADDING; v6 = thisPage.getVacantRowY(); v10 = this.C_DEF_PAGE_WIDTH; v14 = this.C_DEF_PAGE_HEIGHT; if (SubTitle != undefined && SubTitle != '') { var v4; v4 = new MenuButton(MenuButton.C_CLIP_BTN, '', v8, v6, v10 - 2 * this.C_DEF_PADDING, 30, MainMenu.C_BTN_FEATHER, 0, SubTitle, 0, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v4.AllowFadeOutAfterClick(false); v4.SetLabelColor(Const.C_COLOR_ORANGE); v4.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v4.setAutoSize('center'); v4.SetMaxAlpha(100); thisPage.AddItem(v4); thisPage.incVacantRowY(this.C_DESC_FONT_SIZE + this.C_DEF_PADDING); v6 = thisPage.getVacantRowY(); } var v5; v5 = new MenuButton(MenuButton.C_CLIP_BTN, clipName, v8, v6, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v5.AllowFadeOutAfterClick(false); v5.SetMaxAlpha(100); thisPage.AddItem(v5); var v9; var v7; v9 = this.getWidth(v5.__skin, clipMask); v7 = this.getHeight(v5.__skin, clipMask); var v2; v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', v8 + v9 + this.C_DEF_PADDING, v6, v10 - (v9 + 3 * this.C_DEF_PADDING), v7, MainMenu.C_BTN_FEATHER, 0, Desc, MainMenu.C_LARGE_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v2.AllowFadeOutAfterClick(false); v2.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v2.SetMaxAlpha(100); thisPage.AddItem(v2); var v11; v11 = v2.__txtField._height > v7 ? v2.__txtField._height : v7; thisPage.incVacantRowY(v11 + this.C_DEF_PADDING); }; v2.AddClipClipDesc = function (thisPage, SubTitle, clip1Name, clip1Mask, clip2Name, clip2Mask, Desc) { var v7; var v6; var v16; var v19; v7 = thisPage.getVacantRowX() + this.C_DEF_PADDING; v6 = thisPage.getVacantRowY(); v16 = this.C_DEF_PAGE_WIDTH; v19 = this.C_DEF_PAGE_HEIGHT; if (SubTitle != undefined && SubTitle != '') { var v5; v5 = new MenuButton(MenuButton.C_CLIP_BTN, '', v7, v6, v16 - 2 * this.C_DEF_PADDING, 30, MainMenu.C_BTN_FEATHER, 0, SubTitle, 0, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v5.AllowFadeOutAfterClick(false); v5.SetLabelColor(Const.C_COLOR_ORANGE); v5.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v5.setAutoSize('center'); v5.SetMaxAlpha(100); thisPage.AddItem(v5); thisPage.incVacantRowY(this.C_DESC_FONT_SIZE + 5); v6 = thisPage.getVacantRowY(); } var v2; v2 = new MenuButton(MenuButton.C_CLIP_BTN, clip1Name, v7, v6, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v2.AllowFadeOutAfterClick(false); v2.SetMaxAlpha(100); thisPage.AddItem(v2); var v8; var v13; v8 = this.getWidth(v2.__skin, clip1Mask); v13 = this.getHeight(v2.__skin, clip1Mask); var v9; v9 = new MenuButton(MenuButton.C_CLIP_BTN, clip2Name, v7 + v8 + 2 * this.C_DEF_PADDING, v6, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v9.AllowFadeOutAfterClick(false); v9.SetMaxAlpha(100); thisPage.AddItem(v9); var v11; var v12; v11 = this.getWidth(v2.__skin, clip2Mask); v12 = this.getHeight(v2.__skin, clip2Mask); var v4; var v10; v10 = v13 > v12 ? v13 : v12; v4 = new MenuButton(MenuButton.C_CLIP_BTN, '', v7 + v8 + v11 + 3 * this.C_DEF_PADDING, v6, this.C_DEF_PAGE_WIDTH - (v8 + v11 + 5 * this.C_DEF_PADDING), v10, MainMenu.C_BTN_FEATHER, 0, Desc, MainMenu.C_LARGE_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v4.AllowFadeOutAfterClick(false); v4.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v4.SetMaxAlpha(100); thisPage.AddItem(v4); var v14; v14 = v10 > v4.__txtField._height ? v10 : v4.__txtField._height; thisPage.incVacantRowY(v14 + this.C_DEF_PADDING); }; v2.AddClipClipClipDesc = function (thisPage, SubTitle, clip1Name, clip1Mask, clip2Name, clip2Mask, clip3Name, clip3Mask, Desc) { var v10; var v5; var v19; var v23; v10 = thisPage.getVacantRowX() + this.C_DEF_PADDING; v5 = thisPage.getVacantRowY(); v19 = this.C_DEF_PAGE_WIDTH; v23 = this.C_DEF_PAGE_HEIGHT; if (SubTitle != undefined && SubTitle != '') { var v4; v4 = new MenuButton(MenuButton.C_CLIP_BTN, '', v10, v5, v19 - 2 * this.C_DEF_PADDING, 30, MainMenu.C_BTN_FEATHER, 0, SubTitle, 0, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v4.AllowFadeOutAfterClick(false); v4.SetLabelColor(Const.C_COLOR_ORANGE); v4.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v4.setAutoSize('center'); v4.SetMaxAlpha(100); thisPage.AddItem(v4); thisPage.incVacantRowY(this.C_DESC_FONT_SIZE + 5); v5 = thisPage.getVacantRowY(); } var v9; v9 = new MenuButton(MenuButton.C_CLIP_BTN, clip1Name, v10, v5, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v9.AllowFadeOutAfterClick(false); v9.SetMaxAlpha(100); thisPage.AddItem(v9); var v11; var v16; v11 = this.getWidth(v9.__skin, clip1Mask); v16 = this.getHeight(v9.__skin, clip1Mask); var v8; v8 = new MenuButton(MenuButton.C_CLIP_BTN, clip2Name, v10 + v11 + 2 * this.C_DEF_PADDING, v5, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v8.AllowFadeOutAfterClick(false); v8.SetMaxAlpha(100); thisPage.AddItem(v8); var v12; var v15; v12 = this.getWidth(v8.__skin, clip2Mask); v15 = this.getHeight(v8.__skin, clip2Mask); var v7; v7 = new MenuButton(MenuButton.C_CLIP_BTN, clip3Name, v10 + v11 + v12 + 3 * this.C_DEF_PADDING, v5, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v7.AllowFadeOutAfterClick(false); v7.SetMaxAlpha(100); thisPage.AddItem(v7); var v13; var v14; v13 = this.getWidth(v7.__skin, clip3Mask); v14 = this.getHeight(v7.__skin, clip3Mask); var v3; var v6; v6 = v16 > v15 ? v16 : v15; v6 = v6 > v14 ? v6 : v14; v3 = new MenuButton(MenuButton.C_CLIP_BTN, '', v10 + v11 + v12 + v13 + 4 * this.C_DEF_PADDING, v5, this.C_DEF_PAGE_WIDTH - (v11 + v12 + v13 + 7 * this.C_DEF_PADDING), v6, MainMenu.C_BTN_FEATHER, 0, Desc, MainMenu.C_LARGE_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v3.AllowFadeOutAfterClick(false); v3.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v3.SetMaxAlpha(100); thisPage.AddItem(v3); var v17; v17 = v6 > v3.__txtField._height ? v6 : v3.__txtField._height; thisPage.incVacantRowY(v17 + this.C_DEF_PADDING); }; v2.CreateBlankPage = function (thisPage, pageTitle) { var v5; var v4; var v7; var v6; v5 = this.C_DEF_PAGE_POS_X; v4 = this.C_DEF_PAGE_POS_Y; v7 = this.C_DEF_PAGE_WIDTH; v6 = this.C_DEF_PAGE_HEIGHT; thisPage.setVacantRowX(v5 + this.C_DEF_PADDING); thisPage.setVacantRowY(v4); var v2; v2 = new MenuButton(MenuButton.C_RECT_BTN, '', v5, v4, v7, v6, MainMenu.C_BTN_FEATHER, 0, pageTitle, MainMenu.C_SMALL_FONT_BORDER, true, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v2.SetLabelColor(Const.C_COLOR_ORANGE); v2.SetLabelFormat(this.C_TITLE_FONT_SIZE, false, 'left'); v2.AllowFadeOutAfterClick(false); thisPage.AddItem(v2); thisPage.incVacantRowY(this.C_TITLE_FONT_SIZE + this.C_DEF_PADDING + 5); }; v2.getWidth = function (mc, mask) { if (mask == undefined) { return mc._width; } else { return mask._width; } }; v2.getHeight = function (mc, mask) { if (mask == undefined) { return mc._height; } else { return mask._height; } }; v2.AddXClipDesc = function (thisPage, subtitle, args) { var v5; v5 = args.length; switch (v5) { case 1: this.AddDesc(thisPage, subtitle, args[0]); break; case 3: this.AddClipDesc(thisPage, subtitle, args[0], args[1], args[2]); break; case 5: this.AddClipClipDesc(thisPage, subtitle, args[0], args[1], args[2], args[3], args[4]); break; case 7: this.AddClipClipClipDesc(thisPage, subtitle, args[0], args[1], args[2], args[3], args[4], args[5], args[6]); } }; v2.ExitFromBriefingAndStartGame = function () { this.__pagesArray[0].FadeOut(); }; v2.C_DEF_PAGE_POS_X = 12; v2.C_DEF_PAGE_POS_Y = 30; v2.C_DEF_PAGE_WIDTH = 776; v2.C_DEF_PAGE_HEIGHT = 565; v2.C_DEF_PADDING = 10; v2.C_BTN_FONT_SIZE = 18; v2.C_TITLE_FONT_SIZE = 20; v2.C_DESC_FONT_SIZE = 16; v1.C_BTN_FEATHER = MainMenu.C_BTN_FEATHER; v1.C_LARGE_FONT_BORDER = MainMenu.C_LARGE_FONT_BORDER; v1.C_SMALL_FONT_BORDER = MainMenu.C_SMALL_FONT_BORDER; v1.C_DEPTH_TYPE = LayMan.C_S_MENU; v1.C_HINT_DEPTH_TYPE = LayMan.C_S_MENU_HINTS; ASSetPropFlags(_global.IngMenu.prototype, null, 1); } #endinitclip } movieClip 1697 __Packages.PlaneConfig { #initclip if (!_global.PlaneConfig) { var v1 = function (planeType, planeStartPosType, defaultKeyType, AIProfile, numOfLives, groupId, targetType) { this.__planeType = planeType; this.__planeStartPosType = planeStartPosType; this.__defaultKeyType = defaultKeyType; this.__AIProfile = (AIProfile == undefined) ? enums.AIProfiles.NORMAL : AIProfile; this.__numOfLives = (numOfLives == undefined) ? config.levels.WorldConfig.C_DEFAULT_NUM_OF_LIVES : numOfLives; this.__groupId = (groupId == undefined) ? GrpMan.C_DEFAULT_GROUP_ID : groupId; this.__targetType = (targetType == undefined) ? enums.TargetTypes.PRIMARY : targetType; this.__curItemSlotsCount = this.C_DEFAULT_ITEM_SLOTS_COUNT; this.__defaultItemSlotsCount = this.__curItemSlotsCount; this.ResetConfig(); }; _global.PlaneConfig = v1; var v2 = v1.prototype; v1.getUpgradeInfo = function (attrId, nextlevel) { var v2; var v3; switch (attrId) { return v3; case PlaneConfig.C_ATTR_FIREPOWER: v2 = -1 * (PlaneConfig.C_COOLDOWN_COEF_STEPS[nextlevel] - PlaneConfig.C_COOLDOWN_COEF_STEPS[nextlevel - 1]) / PlaneConfig.C_COOLDOWN_COEF_STEPS[0]; v3 = '+' + Math.round(v2 * 100) + '%'; return v3; case PlaneConfig.C_ATTR_SPEED: v2 = (PlaneConfig.C_SPEED_STEPS[nextlevel] - PlaneConfig.C_SPEED_STEPS[nextlevel - 1]) / PlaneConfig.C_SPEED_STEPS[0]; v3 = '+' + Math.round(v2 * 100) + '%'; return v3; case PlaneConfig.C_ATTR_AGILITY: v2 = (PlaneConfig.C_AGILITY_STEPS[nextlevel] - PlaneConfig.C_AGILITY_STEPS[nextlevel - 1]) / PlaneConfig.C_AGILITY_STEPS[0]; v3 = '+' + Math.round(v2 * 100) + '%'; return v3; case PlaneConfig.C_ATTR_THRUST: v2 = (PlaneConfig.C_THRUST_STEPS[nextlevel] - PlaneConfig.C_THRUST_STEPS[nextlevel - 1]) / PlaneConfig.C_THRUST_STEPS[0]; v3 = '+' + Math.round(v2 * 100) + '%'; return v3; case PlaneConfig.C_ATTR_ARMOUR: v3 = '+' + String(PlaneConfig.C_ARMOUR_STEPS[nextlevel] - PlaneConfig.C_ARMOUR_STEPS[nextlevel - 1]); return v3; } return v3; }; v1.getAbsoluteUpgradeInfo = function (attrId, currLevel) { var v1; var v3; switch (attrId) { return v3; case PlaneConfig.C_ATTR_FIREPOWER: v1 = (PlaneConfig.C_COOLDOWN_COEF_STEPS[0] - PlaneConfig.C_COOLDOWN_COEF_STEPS[currLevel]) / PlaneConfig.C_COOLDOWN_COEF_STEPS[0]; if (currLevel == 0) { v1 = 0; } v3 = '+' + Math.floor(v1 * 100) + '%'; return v3; case PlaneConfig.C_ATTR_SPEED: v1 = -1 * (PlaneConfig.C_SPEED_STEPS[0] - PlaneConfig.C_SPEED_STEPS[currLevel]) / PlaneConfig.C_SPEED_STEPS[0]; if (currLevel == 0) { v1 = 0; } v3 = '+' + Math.floor(v1 * 100) + '%'; return v3; case PlaneConfig.C_ATTR_AGILITY: v1 = -1 * (PlaneConfig.C_AGILITY_STEPS[0] - PlaneConfig.C_AGILITY_STEPS[currLevel]) / PlaneConfig.C_AGILITY_STEPS[0]; if (currLevel == 0) { v1 = 0; } v3 = '+' + Math.floor(v1 * 100) + '%'; return v3; case PlaneConfig.C_ATTR_THRUST: v1 = -1 * (PlaneConfig.C_THRUST_STEPS[0] - PlaneConfig.C_THRUST_STEPS[currLevel]) / PlaneConfig.C_THRUST_STEPS[0]; if (currLevel == 0) { v1 = 0; } v3 = '+' + Math.floor(v1 * 100) + '%'; return v3; case PlaneConfig.C_ATTR_ARMOUR: v3 = String(PlaneConfig.C_ARMOUR_STEPS[currLevel]); return v3; } return v3; }; v1.getAttrBuyCost = function (attrId, toLevel) { return PlaneConfig.C_ATTR_BUY_COST_ARRAY[attrId][toLevel]; }; v1.getAttrInfo = function (attrId, infoType) { return PlaneConfig.C_ATTR_INFO_ARRAY[attrId][infoType]; }; v1.getAttrLimitCount = function (planeType, attrId) { return PlaneConfig.__attributeValueLimitsArray[planeType][attrId]; }; v1.getDefaultWpnList = function (planeType) { return PlaneConfig.C_DEFAULT_WEAPON_LIST_ARRAY[planeType]; }; v2.InitPlaneAttributes = function () { if (this.__curAttributeValuesArray == undefined) { this.__curAttributeValuesArray = new Array(); } else { this.__curAttributeValuesArray.splice(0); } this.__curAttributeValuesArray.push(0); this.__curAttributeValuesArray.push(0); this.__curAttributeValuesArray.push(0); this.__curAttributeValuesArray.push(0); this.__curAttributeValuesArray.push(0); }; v2.InitItemList = function () { if (this.__buyedItemsArray == undefined) { this.__buyedItemsArray = new Array(); } else { this.__buyedItemsArray.splice(0); } this.__buyedItemsArray = (PlaneConfig.getDefaultWpnList(this.__planeType)).slice(0); }; v2.ResetConfig = function () { this.InitPlaneAttributes(); this.InitItemList(); this.__cashAmount = PlaneConfig.C_INITIAL_CASH_AMOUNT; }; v2.SaveBuyedItemList = function (itemListFromShop) { this.__buyedItemsArray.splice(0); var v6; var v5; v6 = (itemListFromShop.length == undefined) ? 0 : itemListFromShop.length; v5 = (itemListFromShop[0].length == undefined) ? 0 : itemListFromShop[0].length; var v3; var v2; v3 = 0; while (v3 < v6) { v2 = 0; while (v2 < v5) { if (itemListFromShop[v3][v2] != enums.ItemTypes.NONE) { this.__buyedItemsArray.push(itemListFromShop[v3][v2]); } ++v2; } ++v3; } }; v2.getBuyedItemList = function () { return this.__buyedItemsArray; }; v2.SavePlaneAttributes = function (firepowerAdj, speedAdj, agilityAdj, thrustAdj, armourAdj) { this.__curAttributeValuesArray[PlaneConfig.C_ATTR_FIREPOWER] = firepowerAdj.getCurStarsCount(); this.__curAttributeValuesArray[PlaneConfig.C_ATTR_SPEED] = speedAdj.getCurStarsCount(); this.__curAttributeValuesArray[PlaneConfig.C_ATTR_AGILITY] = agilityAdj.getCurStarsCount(); this.__curAttributeValuesArray[PlaneConfig.C_ATTR_THRUST] = thrustAdj.getCurStarsCount(); this.__curAttributeValuesArray[PlaneConfig.C_ATTR_ARMOUR] = armourAdj.getCurStarsCount(); }; v2.setPlaneAttributes = function (firepowerAdj, speedAdj, agilityAdj, thrustAdj, armourAdj) { if (firepowerAdj > 6) { firepowerAdj = 6; } if (speedAdj > 6) { speedAdj = 6; } if (agilityAdj > 6) { agilityAdj = 6; } if (thrustAdj > 6) { thrustAdj = 6; } if (armourAdj > 6) { armourAdj = 6; } this.__curAttributeValuesArray[PlaneConfig.C_ATTR_FIREPOWER] = firepowerAdj; this.__curAttributeValuesArray[PlaneConfig.C_ATTR_SPEED] = speedAdj; this.__curAttributeValuesArray[PlaneConfig.C_ATTR_AGILITY] = agilityAdj; this.__curAttributeValuesArray[PlaneConfig.C_ATTR_THRUST] = thrustAdj; this.__curAttributeValuesArray[PlaneConfig.C_ATTR_ARMOUR] = armourAdj; }; v2.setPlaneItemList = function (itemList) { this.__buyedItemsArray.splice(0); var v2; var v3; v3 = itemList.length; v2 = 0; while (v2 < v3) { this.__buyedItemsArray.push(itemList[v2]); ++v2; } }; v2.getPlaneAttributeLimit = function (attrType) { return PlaneConfig.__attributeValueLimitsArray[this.__planeType][attrType]; }; v2.getPlaneAttribute = function (attrType) { return this.__curAttributeValuesArray[attrType]; }; v2.getItemSlotsCount = function () { return this.__curItemSlotsCount; }; v2.ExtendItemSlots = function () { this.__curItemSlotsCount = 2 * this.__defaultItemSlotsCount; return this.__curItemSlotsCount; }; v2.ShrinkenItemSlots = function () { this.__curItemSlotsCount = this.__defaultItemSlotsCount; return this.__curItemSlotsCount; }; v1.getAttribText = function (idx) { var v4; var v1; var v3; switch (idx) { var v5; v5 = 'Firepower: ' + PlaneConfig.__attributeValueLimitsArray[idx][PlaneConfig.C_ATTR_FIREPOWER] + '\n' + 'Speed: ' + PlaneConfig.__attributeValueLimitsArray[idx][PlaneConfig.C_ATTR_SPEED] + '\n' + 'Agility: ' + PlaneConfig.__attributeValueLimitsArray[idx][PlaneConfig.C_ATTR_AGILITY] + '\n' + 'Thrust: ' + PlaneConfig.__attributeValueLimitsArray[idx][PlaneConfig.C_ATTR_THRUST] + '\n' + 'Armor: ' + PlaneConfig.__attributeValueLimitsArray[idx][PlaneConfig.C_ATTR_ARMOUR] + '\n' + v1 + v3; return v5; case enums.PlaneTypes.CAMEL: v4 = 'Sopwith camel\n'; v1 = 'Pros: versatile, almost immune to stalls\n'; v3 = 'Cons: just medium speed, agility\n'; var v5; v5 = 'Firepower: ' + PlaneConfig.__attributeValueLimitsArray[idx][PlaneConfig.C_ATTR_FIREPOWER] + '\n' + 'Speed: ' + PlaneConfig.__attributeValueLimitsArray[idx][PlaneConfig.C_ATTR_SPEED] + '\n' + 'Agility: ' + PlaneConfig.__attributeValueLimitsArray[idx][PlaneConfig.C_ATTR_AGILITY] + '\n' + 'Thrust: ' + PlaneConfig.__attributeValueLimitsArray[idx][PlaneConfig.C_ATTR_THRUST] + '\n' + 'Armor: ' + PlaneConfig.__attributeValueLimitsArray[idx][PlaneConfig.C_ATTR_ARMOUR] + '\n' + v1 + v3; return v5; case enums.PlaneTypes.FOKKER: v4 = 'Fokker\n'; v1 = 'Pros: very agile , decent firepower\n'; v3 = 'Cons: stall sensitive, low armor, harder aiming\n'; var v5; v5 = 'Firepower: ' + PlaneConfig.__attributeValueLimitsArray[idx][PlaneConfig.C_ATTR_FIREPOWER] + '\n' + 'Speed: ' + PlaneConfig.__attributeValueLimitsArray[idx][PlaneConfig.C_ATTR_SPEED] + '\n' + 'Agility: ' + PlaneConfig.__attributeValueLimitsArray[idx][PlaneConfig.C_ATTR_AGILITY] + '\n' + 'Thrust: ' + PlaneConfig.__attributeValueLimitsArray[idx][PlaneConfig.C_ATTR_THRUST] + '\n' + 'Armor: ' + PlaneConfig.__attributeValueLimitsArray[idx][PlaneConfig.C_ATTR_ARMOUR] + '\n' + v1 + v3; return v5; case enums.PlaneTypes.HANRIOT: v4 = 'Henriot\n'; v1 = 'Pros: devastating firepower, decent armour\n'; v3 = 'Cons: slow, relatively easy to hunt down\n'; var v5; v5 = 'Firepower: ' + PlaneConfig.__attributeValueLimitsArray[idx][PlaneConfig.C_ATTR_FIREPOWER] + '\n' + 'Speed: ' + PlaneConfig.__attributeValueLimitsArray[idx][PlaneConfig.C_ATTR_SPEED] + '\n' + 'Agility: ' + PlaneConfig.__attributeValueLimitsArray[idx][PlaneConfig.C_ATTR_AGILITY] + '\n' + 'Thrust: ' + PlaneConfig.__attributeValueLimitsArray[idx][PlaneConfig.C_ATTR_THRUST] + '\n' + 'Armor: ' + PlaneConfig.__attributeValueLimitsArray[idx][PlaneConfig.C_ATTR_ARMOUR] + '\n' + v1 + v3; return v5; case enums.PlaneTypes.PFALZ: v4 = 'Pfalz\n'; v1 = 'Pros: fast, almost immune to stalls\n'; v3 = 'Cons: clumsy, harder to maneuvre\n'; var v5; v5 = 'Firepower: ' + PlaneConfig.__attributeValueLimitsArray[idx][PlaneConfig.C_ATTR_FIREPOWER] + '\n' + 'Speed: ' + PlaneConfig.__attributeValueLimitsArray[idx][PlaneConfig.C_ATTR_SPEED] + '\n' + 'Agility: ' + PlaneConfig.__attributeValueLimitsArray[idx][PlaneConfig.C_ATTR_AGILITY] + '\n' + 'Thrust: ' + PlaneConfig.__attributeValueLimitsArray[idx][PlaneConfig.C_ATTR_THRUST] + '\n' + 'Armor: ' + PlaneConfig.__attributeValueLimitsArray[idx][PlaneConfig.C_ATTR_ARMOUR] + '\n' + v1 + v3; return v5; } var v5; v5 = 'Firepower: ' + PlaneConfig.__attributeValueLimitsArray[idx][PlaneConfig.C_ATTR_FIREPOWER] + '\n' + 'Speed: ' + PlaneConfig.__attributeValueLimitsArray[idx][PlaneConfig.C_ATTR_SPEED] + '\n' + 'Agility: ' + PlaneConfig.__attributeValueLimitsArray[idx][PlaneConfig.C_ATTR_AGILITY] + '\n' + 'Thrust: ' + PlaneConfig.__attributeValueLimitsArray[idx][PlaneConfig.C_ATTR_THRUST] + '\n' + 'Armor: ' + PlaneConfig.__attributeValueLimitsArray[idx][PlaneConfig.C_ATTR_ARMOUR] + '\n' + v1 + v3; return v5; }; v2.setPlaneType = function (planeType) { this.__planeType = planeType; }; v2.getPlaneType = function () { return this.__planeType; }; v2.setStartPosType = function (posType) { this.__planeStartPosType = posType; }; v2.getStartPosType = function () { return this.__planeStartPosType; }; v2.getDefaultKeyType = function () { return this.__defaultKeyType; }; v2.setDefaultKeyType = function (keyType) { this.__defaultKeyType = keyType; }; v2.getAIProfile = function () { return this.__AIProfile; }; v2.AddNumOfLives = function (howMany) { this.__numOfLives += howMany; return this.__numOfLives; }; v2.SubNumOfLives = function (howMany) { if (this.__numOfLives - howMany < 0) { return -1; } this.__numOfLives -= howMany; return this.__numOfLives; }; v2.setNumOfLives = function (lives) { this.__numOfLives = lives; }; v2.getNumOfLives = function () { return this.__numOfLives; }; v2.AddCash = function (howMany) { this.__cashAmount += howMany; return this.__cashAmount; }; v2.SubCash = function (howMany) { if (this.__cashAmount - howMany < 0) { return -1; } this.__cashAmount -= howMany; return this.__cashAmount; }; v2.SaveCash = function (cashCounter) { var v2 = cashCounter.getCashAmount(); this.__cashAmount = v2; }; v2.setCash = function (amount) { this.__cashAmount = amount; }; v2.getCash = function () { return this.__cashAmount; }; v2.getWeaponLimit = function () { return PlaneConfig.__attributeValueLimitsArray[this.__planeType][PlaneConfig.C_ATTR_GUN_GROUP_LIMIT]; }; v2.getInvColumnsCount = function () { return PlaneConfig.__attributeValueLimitsArray[this.__planeType][PlaneConfig.C_ATTR_INV_SLOTS]; }; v2.getTargetType = function () { return this.__targetType; }; v2.setTargetType = function (targetType) { this.__targetType = targetType; }; v2.getGroupId = function () { var v2; if (this.__groupId != undefined) { v2 = this.__groupId; this.__groupId = v2; return this.__groupId; } v2 = GrpMan.C_DEFAULT_GROUP_ID; this.__groupId = v2; return this.__groupId; }; v2.setGroupId = function (grp) { this.__groupId = grp; }; v2.savePlaneConfig = function (cookieObj) { cookieObj.data.cookieCreated = true; cookieObj.data.__planeType = this.__planeType; cookieObj.data.__cashAmount = this.__cashAmount; cookieObj.data.__defaultKeyType = this.__defaultKeyType; cookieObj.data.__planeStartPosType = this.__planeStartPosType; cookieObj.data.__curAttributeValuesArray = new Array(); cookieObj.data.__curAttributeValuesArray = this.__curAttributeValuesArray.slice(); cookieObj.data.__buyedItemsArray = new Array(); cookieObj.data.__buyedItemsArray = this.__buyedItemsArray.slice(); }; v2.saveOnlyKeyType = function (cookieObj, ctrlKeyType) { this.setDefaultKeyType(ctrlKeyType); cookieObj.data.__defaultKeyType = this.__defaultKeyType; }; v2.loadOnlyKeyType = function (cookieObj) { return cookieObj.data.__defaultKeyType; }; v2.loadPlaneConfig = function (cookieObj) { if (!cookieObj.data.cookieCreated) { return undefined; } this.__planeType = cookieObj.data.__planeType; this.__cashAmount = cookieObj.data.__cashAmount; this.__defaultKeyType = cookieObj.data.__defaultKeyType; this.__planeStartPosType = cookieObj.data.__planeStartPosType; this.__curAttributeValuesArray.splice(); this.__curAttributeValuesArray = cookieObj.data.__curAttributeValuesArray.slice(); this.__buyedItemsArray.splice(); this.__buyedItemsArray = cookieObj.data.__buyedItemsArray.slice(); }; v1.C_STATS_POINTS_CNT = 7; v1.C_COOLDOWN_COEF_STEPS = [1, 0.95, 0.85, 0.7, 0.6, 0.4, 0.2]; v1.C_SPEED_STEPS = [4, 4.1, 4.3, 4.5, 4.7, 5, 5.5]; v1.C_AGILITY_STEPS = [3.15, 3.25, 3.45, 3.9, 4.5, 5.25, 6]; v1.C_THRUST_STEPS = [3.25, 3.4, 3.7, 4.2, 5.1, 6.3, 7.8]; v1.C_ARMOUR_STEPS = [2, 4, 6, 9, 11, 13, 15]; v2.C_DEFAULT_ITEM_SLOTS_COUNT = 4; v1.C_ATTR_BUY_COST_ARRAY = [[300, 500, 1000, 1500, 3000, 8000, -1], [300, 500, 1000, 1500, 3000, 8000, -1], [300, 500, 1000, 1500, 3000, 8000, -1], [300, 500, 1000, 1500, 3000, 8000, -1], [500, 700, 1500, 2000, 4500, 10000, -1]]; v1.C_ATTR_INFO_NAME = 0; v1.C_ATTR_INFO_HINT = 1; v1.C_ATTR_INFO_ARRAY = [['Firepower', 'Firepower affects the rate of fire for all of the plane\'s weapons'], ['Speed', 'Speed affects the starting velocity of the aircraft and maximum speed that is able to reach while diving'], ['Agility', 'Agility affects the turning speed of the plane'], ['Thrust', 'Thrust affects the engine\'s sensitivity to stalls and ability to speed up while diving'], ['Armor', 'Armor affects the amount of damage the plane is able to sustain']]; v1.C_ATTR_FIREPOWER = 0; v1.C_ATTR_SPEED = 1; v1.C_ATTR_AGILITY = 2; v1.C_ATTR_THRUST = 3; v1.C_ATTR_ARMOUR = 4; v1.C_ATTR_INV_SLOTS = 5; v1.C_ATTR_GUN_GROUP_LIMIT = 6; v1.__attributeValueLimitsArray = [[3, 4, 4, 3, 3, 3, 2], [3, 3, 5, 2, 3, 3, 2], [4, 3, 2, 5, 3, 3, 2], [5, 3, 4, 2, 3, 3, 2], [4, 4, 4, 3, 3, 3, 2], [5, 6, 3, 4, 5, 4, 2], [6, 4, 6, 6, 6, 5, 3]]; v1.C_DEFAULT_WEAPON_LIST_ARRAY = [[enums.ItemTypes.MACHINE_GUN], [enums.ItemTypes.MACHINE_GUN], [enums.ItemTypes.MACHINE_GUN], [enums.ItemTypes.MACHINE_GUN], [enums.ItemTypes.TWIN_MACHINE_GUN, enums.ItemTypes.TAIL_GUN], [enums.ItemTypes.TWIN_MACHINE_GUN, enums.ItemTypes.IMPACT_BOMBS], [enums.ItemTypes.TWIN_MACHINE_GUN, enums.ItemTypes.HOMING_MISSILES, enums.ItemTypes.TARGETTING_SYSTEM]]; v1.C_INITIAL_CASH_AMOUNT = 0; ASSetPropFlags(_global.PlaneConfig.prototype, null, 1); } #endinitclip } movieClip 1698 __Packages.enums.ObstacleTypes { #initclip if (!_global.enums) { _global.enums = new Object(); } if (!_global.enums.ObstacleTypes) { var v1 = function () {}; enums.ObstacleTypes = v1; var v2 = v1.prototype; v1.getObstacleInfo = function (id, infoType) { return enums.ObstacleTypes.ObstacleInfoList[id][infoType]; }; v1.RING = 0; v1.STORM_CLOUD = 1; v1.TORNADO = 2; v1.BIRD_FORMATION = 3; v1.AIRSHIP = 4; v1.BALOON = 5; v1.TARGET = 6; v1.GROUND_FOG = 7; v1.INFO_TABLE = 8; v1.AIRPLANE = 9; v1.BONUS = 10; v1.STATIC_OBSTACLE = 11; v1.GAME_CLOCK = 11; v1.INFO_NAME = 0; v1.INFO_HITPOINTS = 1; v1.ObstacleInfoList = [['Ring'], ['Storm cloud'], ['Tornado'], ['Bird formation'], ['Airship'], ['Baloon'], ['Target'], ['Ground fog'], ['Info table'], ['Airplane'], ['Bonus'], ['Static obstacle']]; ASSetPropFlags(enums.ObstacleTypes.prototype, null, 1); } #endinitclip } movieClip 1699 __Packages.enums.AIProfiles { #initclip if (!_global.enums) { _global.enums = new Object(); } if (!_global.enums.AIProfiles) { var v1 = function () {}; enums.AIProfiles = v1; var v2 = v1.prototype; v1.getAIProfileInfo = function (profileId, infoType) { return enums.AIProfiles.AI_PROFILE_SETUP_ARRAY[profileId][infoType]; }; v1.getAIWpnSetupInfo = function (itemId, infoType) { return enums.AIProfiles.AI_WPN_SETUP_ARRAY[itemId][infoType]; }; v1.getInfo = function (AItype, infoType) { return enums.AIProfiles.AI_PROFILE_SETUP_ARRAY[AItype][infoType]; }; v1.isObstacleInAvoidList = function (obstacleType) { var v1; var v2; v2 = enums.AIProfiles.AI_OBSTACLES_AVOID_ARRAY.length; v1 = 0; while (v1 < v2) { if (obstacleType == enums.AIProfiles.AI_OBSTACLES_AVOID_ARRAY[v1]) { return true; } ++v1; } return false; }; v1.isObstacleInAttackList = function (obstacleType) { var v1; var v2; v2 = enums.AIProfiles.AI_OBSTACLES_ATTACK_ARRAY.length; v1 = 0; while (v1 < v2) { if (obstacleType == enums.AIProfiles.AI_OBSTACLES_ATTACK_ARRAY[v1]) { return true; } ++v1; } return false; }; v1.COUNT = 4; v1.DUMB = 0; v1.WEAK = 1; v1.NORMAL = 2; v1.CLEVER = 3; v1.C_INFO_DEVIATION_COS = 0; v1.C_INFO_WILL_TO_FIRE = 1; v1.AI_PROFILE_SETUP_ARRAY = [[0.4, 0.05], [0.2, 0.3], [0.005, 0.8], [0, 1]]; v1.C_WPN_INFO_DIRECTION_ANGLE = 0; v1.C_WPN_INFO_DISPERSION_ANGLE_COS = 1; v1.C_WPN_INFO_IS_ABSOLUTE_ANGLE = 2; v1.C_WPN_INFO_MAX_RANGE = 3; v1.C_1_DEG_RAD = 0.0174532925199433; v1.AI_WPN_SETUP_ARRAY = [[0, Math.cos(2 * enums.AIProfiles.C_1_DEG_RAD), 0, 1000], [-170, Math.cos(2 * enums.AIProfiles.C_1_DEG_RAD), 0, 1000], [0, Math.cos(2 * enums.AIProfiles.C_1_DEG_RAD), 0, 900], [0, Math.cos(2 * enums.AIProfiles.C_1_DEG_RAD), 0, 400], [0, Math.cos(60 * enums.AIProfiles.C_1_DEG_RAD), 0, 300], [180, Math.cos(10 * enums.AIProfiles.C_1_DEG_RAD), 0, 250], [60, Math.cos(30 * enums.AIProfiles.C_1_DEG_RAD), 1, 600], [0, Math.cos(90 * enums.AIProfiles.C_1_DEG_RAD), 0, 2000], [360, Math.cos(360 * enums.AIProfiles.C_1_DEG_RAD), 1, 150], [90, Math.cos(180 * enums.AIProfiles.C_1_DEG_RAD), 1, 600], [undefined, undefined, undefined, undefined], [undefined, undefined, undefined, undefined], [undefined, undefined, undefined, undefined], [undefined, undefined, undefined, undefined], [undefined, undefined, undefined, undefined], [undefined, undefined, undefined, undefined], [undefined, undefined, undefined, undefined], [undefined, undefined, undefined, undefined], [undefined, undefined, undefined, undefined], [undefined, undefined, undefined, undefined]]; v1.AI_OBSTACLES_AVOID_ARRAY = [enums.ObstacleTypes.STORM_CLOUD, enums.ObstacleTypes.TORNADO, enums.ObstacleTypes.BIRD_FORMATION, enums.ObstacleTypes.AIRSHIP]; v1.AI_OBSTACLES_ATTACK_ARRAY = [enums.ObstacleTypes.AIRPLANE, enums.ObstacleTypes.BALOON, enums.ObstacleTypes.TARGET]; ASSetPropFlags(enums.AIProfiles.prototype, null, 1); } #endinitclip } movieClip 1700 __Packages.gamemenu.components.AttribAdjuster { #initclip if (!_global.gamemenu) { _global.gamemenu = new Object(); } if (!_global.gamemenu.components) { _global.gamemenu.components = new Object(); } if (!_global.gamemenu.components.AttribAdjuster) { var v1 = function (xpos, ypos, attrType, maxStarsCount, curStarsCount, cashCounter, isAdditiveOnly) { this.__x = xpos; this.__y = ypos; this.__attrType = attrType; this.__maxStarsCount = maxStarsCount; this.__curStarsCount = curStarsCount >= maxStarsCount ? maxStarsCount : curStarsCount; if (isAdditiveOnly) { this.__undeletableStarsCount = this.__curStarsCount; } else { this.__undeletableStarsCount = 0; } this.__cashCounter = cashCounter; this.__isAdditiveOnly = isAdditiveOnly; var v3; var v5 = 80; var v6 = 25; v3 = this.__x; this.__textBtn = new MenuButton(MenuButton.C_CLIP_BTN, 'S_BLANK_RECT', v3, this.__y, v5, v6, gamemenu.components.AttribAdjuster.C_BTN_FEATHER, 0, this.__attrName, this.C_SMALL_FONT_BORDER, false, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); this.__textBtn.SetLabelFormat(this.C_FONT_SIZE, true, 'center'); this.__textBtn.AllowFadeOutAfterClick(false); this.__textBtn.addEventListener(MenuButton.EVT_ROLL_OVER, mx.utils.Delegate.create(this, this.showInfoBarTotalUpgrade)); this.__textBtn.addEventListener(MenuButton.EVT_ROLL_OUT, mx.utils.Delegate.create(this, this.HideItemInfo)); this.__textBtn.SetMaxAlpha(100); this.InitTextHints(this.__attrType); v3 = v3 + v5 + this.C_PADDING; if (!this.__isAdditiveOnly) { this.__minusBtn = new MenuButton(MenuButton.C_CLIP_BTN, 'S_SHOP_MINUS_BTN', v3, this.__y, v6, v6, gamemenu.components.AttribAdjuster.C_BTN_FEATHER, 0, '', this.C_LARGE_FONT_BORDER, false, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); this.__minusBtn.SetLabelFormat(this.C_BTN_SELL_BUY_STAR_FONT_SIZE, true, 'center'); this.__minusBtn.SetHint('Sell upgrade point'); this.__minusBtn.AllowFadeOutAfterClick(false); this.__minusBtn.SetMaxAlpha(100); v3 = v3 + v6 + this.C_PADDING; } this.__emptyStarArray = new Array(); this.__fullStarArray = new Array(); var v4; var v2; v4 = 0; while (v4 < this.__maxStarsCount) { v2 = new MenuButton(MenuButton.C_CLIP_BTN, Const.C_EMPTY_STAR_CLIP_NAME, v3 + 12, this.__y + 10, 25, 25, 0, 0, '', -7, false, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v2.SetMaxAlpha(100); v2.AllowFadeOutAfterClick(false); v2.SetMaxAlpha(100); v5 = v2.__skin._width; this.__emptyStarArray.push(v2); if (v4 == 0) { var v7; v7 = v3 + this.C_OVERALL_MAX_STARS_COUNT * (v5 + this.C_PADDING); this.__plusBtn = new MenuButton(MenuButton.C_CLIP_BTN, 'S_SHOP_PLUS_BTN', v7, this.__y, v6, v6, gamemenu.components.AttribAdjuster.C_BTN_FEATHER, 0, '', this.C_LARGE_FONT_BORDER, false, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); this.__plusBtn.SetLabelFormat(this.C_BTN_SELL_BUY_STAR_FONT_SIZE, true, 'center'); this.__plusBtn.SetHint('Buy upgrade point'); this.__plusBtn.AllowFadeOutAfterClick(false); this.__plusBtn.SetMaxAlpha(100); } v2 = new MenuButton(MenuButton.C_CLIP_BTN, Const.C_FULL_STAR_CLIP_NAME, v3 + 12, this.__y + 10, 40, 40, gamemenu.components.AttribAdjuster.C_BTN_FEATHER, 0, '', this.C_LARGE_FONT_BORDER, true, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v2.SetMaxAlpha(100); this.__fullStarArray.push(v2); v3 = v3 + v5 + this.C_PADDING; ++v4; } this.InitListeners(); this.UpdateGlow(undefined, this.__cashCounter.getCashAmount()); }; gamemenu.components.AttribAdjuster = v1; var v2 = v1.prototype; v2.InitListeners = function () { this.__minusBtn.addEventListener(MenuButton.EVT_CLICK, mx.utils.Delegate.create(this, this.SubStar)); this.__plusBtn.addEventListener(MenuButton.EVT_CLICK, mx.utils.Delegate.create(this, this.AddStar)); this.__minusBtn.addEventListener(MenuButton.EVT_ROLL_OVER, DelegatePlus.create(this, this.ShowItemInfoSell)); this.__minusBtn.addEventListener(MenuButton.EVT_ROLL_OUT, DelegatePlus.create(this, this.HideItemInfo)); this.__plusBtn.addEventListener(MenuButton.EVT_ROLL_OVER, DelegatePlus.create(this, this.ShowItemInfo)); this.__plusBtn.addEventListener(MenuButton.EVT_ROLL_OUT, DelegatePlus.create(this, this.HideItemInfo)); if (this.__cashCounter != undefined) { this.__cashCounter.addEventListener(gamemenu.components.CashCounter.EVT_DATA_CHANGE, DelegatePlus.create(this, this.UpdateGlow)); } }; v2.InitTextHints = function (attrType) { this.__attrName = PlaneConfig.getAttrInfo(attrType, PlaneConfig.C_ATTR_INFO_NAME); this.__attrHint = 'Total ' + this.__attrName.toLowerCase() + ': ' + PlaneConfig.getAbsoluteUpgradeInfo(attrType, this.__curStarsCount); this.__textBtn.SetLabel(this.__attrName); this.__textBtn.SetHint(this.__attrHint); }; v2.FadeIn = function () { this.__textBtn.FadeIn(); this.__plusBtn.FadeIn(); this.__minusBtn.FadeIn(); var v2; v2 = 0; while (v2 < this.__emptyStarArray.length) { this.__emptyStarArray[v2].FadeIn(); ++v2; } v2 = 0; while (v2 < this.__curStarsCount) { this.__fullStarArray[v2].SetFadeSpeedInFrames(MenuButton.C_DEFAULT_FADE_SPEED_IN_FRAMES); this.__fullStarArray[v2].FadeIn(); ++v2; } }; v2.FadeOut = function (destroyAfterFadeOut) { this.__textBtn.FadeOut(destroyAfterFadeOut); this.__plusBtn.FadeOut(destroyAfterFadeOut); this.__minusBtn.FadeOut(destroyAfterFadeOut); var v2; v2 = 0; while (v2 < this.__emptyStarArray.length) { this.__emptyStarArray[v2].FadeOut(destroyAfterFadeOut); ++v2; } v2 = 0; while (v2 < this.__fullStarArray.length) { this.__fullStarArray[v2].SetFadeSpeedInFrames(MenuButton.C_DEFAULT_FADE_SPEED_IN_FRAMES); this.__fullStarArray[v2].FadeOut(destroyAfterFadeOut); ++v2; } }; v2.Destroy = function () { this.__textBtn.Destroy(); this.__plusBtn.Destroy(); this.__minusBtn.Destroy(); var v2; v2 = 0; while (v2 < this.__emptyStarArray.length) { this.__emptyStarArray[v2].Destroy(); ++v2; } v2 = 0; while (v2 < this.__fullStarArray.length) { this.__fullStarArray[v2].Destroy(); ++v2; } }; v2.FadeInOutNStars = function (n) { var v2; v2 = 0; while (v2 < this.__maxStarsCount) { if (v2 < n) { if (!this.__fullStarArray[v2].isDisplayed()) { this.__fullStarArray[v2].SetFadeSpeedInFrames(this.C_STAR_FADE_SPEED_IN_FRAMES); this.__fullStarArray[v2].FadeIn(); } } else { if (this.__fullStarArray[v2].isDisplayed()) { this.__fullStarArray[v2].SetFadeSpeedInFrames(this.C_STAR_FADE_SPEED_IN_FRAMES); this.__fullStarArray[v2].FadeOut(); } } ++v2; } }; v2.AddStar = function () { if (this.__curStarsCount >= this.__maxStarsCount) { return undefined; } var v2; v2 = this.getNextStarCost(); if (this.BuyStar(v2)) { ++this.__curStarsCount; this.FadeInOutNStars(this.__curStarsCount); this.ShowItemInfo(); } else { this.ShowMessageToInfoBar('Not enough cash!'); } if (this.__curStarsCount >= this.__maxStarsCount) { this.__plusBtn.setDisabledButton(true, true); this.HideItemInfo(); } if (this.__curStarsCount >= 0) { this.__minusBtn.setDisabledButton(false, true); this.HideItemInfo(); } this.InitTextHints(this.__attrType); this.UpdateGlow(undefined, this.__cashCounter.getCashAmount()); }; v2.SubStar = function () { if (this.__curStarsCount <= 0) { return undefined; } var v2; v2 = this.getCurStarCost(); if (this.SellStar(v2)) { --this.__curStarsCount; this.FadeInOutNStars(this.__curStarsCount); } if (this.__curStarsCount <= 0) { this.__minusBtn.setDisabledButton(true, true); this.HideItemInfo(); } if (this.__curStarsCount < this.__maxStarsCount) { this.__plusBtn.setDisabledButton(false, true); this.HideItemInfo(); } this.InitTextHints(this.__attrType); this.UpdateGlow(undefined, this.__cashCounter.getCashAmount()); }; v2.BuyStar = function (starCost) { var v2; v2 = this.__cashCounter.getCashAmount(); if (v2 >= starCost) { this.__cashCounter.SubCash(starCost); WebApi.TrackEvent(WebApi.C_TR_EVT_STAR_BOUGHT, this.__attrType); return true; } else { return false; } }; v2.SellStar = function (starCost) { if (this.__curStarsCount - this.__undeletableStarsCount == 0) { return false; } else { this.__cashCounter.AddCash(starCost); WebApi.TrackEvent(WebApi.C_TR_EVT_STAR_SOLD, this.__attrType); return true; } }; v2.getCurStarsCount = function () { return this.__curStarsCount; }; v2.ShowItemInfo = function (evtObj) { var v5; var v7; var v3; var v2; var v6; v5 = this.__attrName; v7 = 'Plane upgrade attribute'; v3 = 'None'; v2 = String(this.getNextStarCost()); v6 = PlaneConfig.getAttrInfo(this.__attrType, PlaneConfig.C_ATTR_INFO_HINT); var v4; v4 = PlaneConfig.getUpgradeInfo(this.__attrType, this.__curStarsCount + 1); this.__infoBar.SetInfo('Additional ' + v4 + ' to ' + v5.toLowerCase(), 'Class: ' + v7, 'Damage: ' + v3, 'Cost: ' + v2, '' + v6); }; v2.ShowItemInfoSell = function (evtObj) { var v5; var v7; var v3; var v2; var v6; v5 = this.__attrName; v7 = 'Plane upgrade attribute'; v3 = 'None'; v2 = String(this.getCurStarCost()); v6 = PlaneConfig.getAttrInfo(this.__attrType, PlaneConfig.C_ATTR_INFO_HINT); var v4; v4 = PlaneConfig.getUpgradeInfo(this.__attrType, this.__curStarsCount); this.__infoBar.SetInfo('Additional ' + v4 + ' to ' + v5.toLowerCase(), 'Class: ' + v7, 'Damage: ' + v3, 'Sell cost: ' + v2, '' + v6); }; v2.ShowMessageToInfoBar = function (messageText) { this.__infoBar.SetInfo(messageText, '', '', '', ''); }; v2.HideItemInfo = function (evtObj) { var v2; v2 = GameConfig.getCurrentLevelId(); var v3; v3 = config.levels.WorldConfig.getAdviseInfo(v2); this.__infoBar.SetInfo('HINT:', v3, '', '', ''); }; v2.setInfoBar = function (infoBarObj) { this.__infoBar = infoBarObj; }; v2.getNextStarCost = function () { var v2; var v3; v2 = this.getCurStarsCount(); if (v2 >= this.__maxStarsCount) { return 1.0e+018; } v3 = PlaneConfig.getAttrBuyCost(this.__attrType, v2); return v3; }; v2.getCurStarCost = function () { var v2; var v3; v2 = this.getCurStarsCount() - 1; v3 = PlaneConfig.getAttrBuyCost(this.__attrType, v2); return v3; }; v2.showInfoBarTotalUpgrade = function () { this.ShowMessageToInfoBar(this.__attrHint); }; v2.UpdateGlow = function (evt, curCash) { var v3; if (curCash != undefined) { v3 = curCash; } else { v3 = evt.dataVal; } var v5; v5 = this.getNextStarCost(); var v4; if (v3 >= v5) { v4 = true; } else { v4 = false; } LayMan.SetGlow(this.__plusBtn.__skin, v4); var v2; v2 = 0; while (v2 < this.__maxStarsCount) { LayMan.SetGlow(this.__emptyStarArray[v2].__skin, false); ++v2; } var v6; v6 = this.getCurStarsCount(); }; v2.C_STAR_FADE_SPEED_IN_FRAMES = 5; v2.C_PADDING = 5; v2.C_FONT_SIZE = 15; v2.C_BTN_FONT_SIZE = 13; v2.C_BTN_SELL_BUY_STAR_FONT_SIZE = 16; v2.C_DEPTH_TYPE = LayMan.C_S_MENU; v2.C_HINT_DEPTH_TYPE = LayMan.C_S_MENU_HINTS; v1.C_BTN_FEATHER = 10; v2.C_LARGE_FONT_BORDER = 0; v2.C_SMALL_FONT_BORDER = 0; v2.C_OVERALL_MAX_STARS_COUNT = 6; ASSetPropFlags(gamemenu.components.AttribAdjuster.prototype, null, 1); } #endinitclip } movieClip 1701 __Packages.gamemenu.components.CashCounter { #initclip if (!_global.gamemenu) { _global.gamemenu = new Object(); } if (!_global.gamemenu.components) { _global.gamemenu.components = new Object(); } if (!_global.gamemenu.components.CashCounter) { var v1 = function (x, y, cashAmount, txtPrefix, txtHint, pWidth) { mx.events.EventDispatcher.initialize(this); this.__x = x; this.__y = y; this.__w = (pWidth == undefined) ? this.C_DEFAULT_WIDTH : pWidth; this.__txtPrefix = (txtPrefix == undefined) ? 'Cash:' : txtPrefix; this.__txtHint = (txtHint == undefined) ? 'Cash (including medal rewards) available to spend on upgrades or devices/weapons' : txtHint; var v3; var v2; v3 = this.__w; v2 = this.__h; this.__cashAvailableBtn = new MenuButton(MenuButton.C_RECT_BTN, '', x, y, v3, v2, this.C_BTN_FEATHER, 0, '', this.PAD, false, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); this.__cashAvailableBtn.SetLabelFormat(this.C_FONT_SIZE, false, 'left'); this.__cashAvailableBtn.AllowFadeOutAfterClick(false); this.__cashAvailableBtn.SetHint(this.__txtHint); this.__cashAvailableBtn.SetLabel(this.__txtPrefix); this.__cashAvailableBtn.SetMaxAlpha(100); this.__cashAmountBtn = new MenuButton(MenuButton.C_CLIP_BTN, '', x, y, v3 - this.PAD, v2, this.C_BTN_FEATHER, 0, '', this.PAD, false, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); this.__cashAmountBtn.SetLabelFormat(this.C_FONT_SIZE, false, 'right'); this.__cashAmountBtn.AllowFadeOutAfterClick(false); this.__cashAmountBtn.SetHint(this.__txtHint); this.__cashAmountBtn.SetMaxAlpha(100); this.__cashAmount = cashAmount; this.setCash(this.__cashAmount); }; gamemenu.components.CashCounter = v1; var v2 = v1.prototype; v2.setCash = function (availableCash) { this.__cashAmount = availableCash; this.UpdateCashText(this.__cashAmount); this.dispatchEvent({'target': this, 'type': gamemenu.components.CashCounter.EVT_DATA_CHANGE, 'dataVal': this.__cashAmount}); }; v2.getCashAmount = function () { return this.__cashAmount; }; v2.SubCash = function (diff) { this.__cashAmount -= diff; this.UpdateCashText(this.__cashAmount); this.dispatchEvent({'target': this, 'type': gamemenu.components.CashCounter.EVT_DATA_CHANGE, 'dataVal': this.__cashAmount}); }; v2.AddCash = function (diff) { this.__cashAmount += diff; this.UpdateCashText(this.__cashAmount); this.dispatchEvent({'target': this, 'type': gamemenu.components.CashCounter.EVT_DATA_CHANGE, 'dataVal': this.__cashAmount}); }; v2.UpdateCashText = function (cashAmount) { this.__cashAmountBtn.SetLabel(this.C_CURRENCY_SYMBOL + ' ' + String(cashAmount)); }; v2.FadeIn = function () { this.__cashAvailableBtn.FadeIn(); this.__cashAmountBtn.FadeIn(); }; v2.FadeOut = function (destroyAfterFadeOut) { this.__cashAvailableBtn.FadeOut(destroyAfterFadeOut); this.__cashAmountBtn.FadeOut(destroyAfterFadeOut); }; v2.Destroy = function () { this.__cashAvailableBtn.DestroyBtn(); this.__cashAmountBtn.DestroyBtn(); }; v1.EVT_DATA_CHANGE = 'datachange'; v2.C_FONT_SIZE = 20; v2.C_CURRENCY_SYMBOL = '$'; v2.C_BTN_FEATHER = 10; v2.PAD = 5; v2.C_DEFAULT_WIDTH = 275; v2.__h = 40; ASSetPropFlags(gamemenu.components.CashCounter.prototype, null, 1); } #endinitclip } movieClip 1702 __Packages.DelegatePlus { #initclip if (!_global.DelegatePlus) { var v1 = function (f) { super(); this.func = f; }; _global.DelegatePlus = v1; _global.DelegatePlus extends Object; var v2 = v1.prototype; v1.create = function (obj, func) { var parameters = new Array(); var v2 = 2; while (v2 < arguments.length) { parameters[v2 - 2] = arguments[v2]; ++v2; } var v3 = function () { var v3 = arguments.callee.target; var v4 = arguments.callee.func; var v2 = arguments.concat(parameters); return v4.apply(v3, v2); }; v3.target = obj; v3.func = func; return v3; }; v2.createDelegatePlus = function (obj) { return DelegatePlus.create(obj, this.func); }; ASSetPropFlags(_global.DelegatePlus.prototype, null, 1); } #endinitclip } movieClip 1703 __Packages.GrpMan { #initclip if (!_global.GrpMan) { var v1 = function () {}; _global.GrpMan = v1; var v2 = v1.prototype; v1.getGroupCount = function (groupId) { return GrpMan.OBJS_IN_GROUP_COUNT[groupId]; }; v1.registerInGroup = function (groupId) { if (GrpMan.OBJS_IN_GROUP_COUNT[groupId] == -1) { GrpMan.OBJS_IN_GROUP_COUNT[groupId] = 1; return groupId; } ++GrpMan.OBJS_IN_GROUP_COUNT[groupId]; return groupId; }; v1.unregisterFromGroup = function (groupId) { --GrpMan.OBJS_IN_GROUP_COUNT[groupId]; }; v1.isGroupEmpty = function (groupId) { if (GrpMan.OBJS_IN_GROUP_COUNT[groupId] < -1) { return undefined; } if (GrpMan.OBJS_IN_GROUP_COUNT[groupId] == 0) { GrpMan.OBJS_IN_GROUP_COUNT[groupId] = -1; return true; } else { return false; } }; v1.isLastManStanding = function (groupId) { var v3 = 0; var v1; var v4; v4 = GrpMan.OBJS_IN_GROUP_COUNT.length; var v2; v1 = 0; while (v1 < v4) { v2 = GrpMan.getGroupCount(v1); if (v2 != -1) { v3 += GrpMan.getGroupCount(v1); } ++v1; } if (v3 == 1) { return true; } else { return false; } }; v1.setGroupColor = function (groupId, color) { GrpMan.GROUP_COLORS[groupId] = color; }; v1.getGroupColor = function (groupId) { return GrpMan.GROUP_COLORS[groupId]; }; v1.setIsGroupColorShowed = function (value) { GrpMan.__isGroupColorShowed = value; }; v1.getIsGroupColorShowed = function () { return GrpMan.__isGroupColorShowed; }; v1.C_DEFAULT_GROUP_ID = 0; v1.OBJS_IN_GROUP_COUNT = [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1]; v1.GROUP_COLORS = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; v1.__isGroupColorShowed = false; ASSetPropFlags(_global.GrpMan.prototype, null, 1); } #endinitclip } movieClip 1704 __Packages.enums.TargetTypes { #initclip if (!_global.enums) { _global.enums = new Object(); } if (!_global.enums.TargetTypes) { var v1 = function () {}; enums.TargetTypes = v1; var v2 = v1.prototype; v2.GameTypes = function () {}; v1.NONE = 0; v1.PRIMARY = 1; v1.SECONDARY = 2; v1.PRIMARY_ALLY = 3; v1.SECONDARY_ALLY = 4; ASSetPropFlags(enums.TargetTypes.prototype, null, 1); } #endinitclip } movieClip 1705 __Packages.config.levels.LevelConfig { #initclip if (!_global.config) { _global.config = new Object(); } if (!_global.config.levels) { _global.config.levels = new Object(); } if (!_global.config.levels.LevelConfig) { var v1 = function () { this.__timeLimitSec = -1; }; config.levels.LevelConfig = v1; var v2 = v1.prototype; v2.getConfigItem = function (itemType) { switch (itemType) { case config.levels.LevelConfig.TITLE: return String(this.__title); break; case config.levels.LevelConfig.SUBTITLE: return String(this.__subTitle); break; case config.levels.LevelConfig.MISSION: return String(this.__mission); break; case config.levels.LevelConfig.LOCATION: return Number(this.__location); break; case config.levels.LevelConfig.WEATHER: return Number(this.__weather); break; case config.levels.LevelConfig.WEATHER_PARAMS: return Array(this.__weatherParams); break; case config.levels.LevelConfig.WIND_DIR: return Vector2D(this.__windDir); break; case config.levels.LevelConfig.AIR_OBSTACLES_ARRAY: return Array(this.__airObstaclesArray); break; case config.levels.LevelConfig.AIR_BKG_OBJS_ARRAY: return Array(this.__airBkgObjsArray); break; case config.levels.LevelConfig.PLANES_POS_AND_CONF: return this.__planesPosAndConf; break; case config.levels.LevelConfig.GAME_SUBTYPE: return Number(this.__gameSubType); break; case config.levels.LevelConfig.GAME_SUBTYPE_PARAMS: return Array(this.__gameSubTypeParams); break; case config.levels.LevelConfig.BONUSES_ARRAY: return Array(this.__bonusesArray); break; case config.levels.LevelConfig.ARENA_SIZE_TYPE: return Number(this.__arenaSizeType); break; case config.levels.LevelConfig.TIME_LIMIT_SEC: return Number(this.__timeLimitSec); break; case config.levels.LevelConfig.TIME_LIMIT_SEC_IS_POSITIVE: return Number(this.__timeLimitSecIsPositive); break; case config.levels.LevelConfig.SKY_TYPE: return Number(this.__skyType); } }; v2.getConfigItemArr = function (itemType) { switch (itemType) { case config.levels.LevelConfig.OBJECTIVE_CLIP_DESC: return this.__objectiveClipDesc; break; case config.levels.LevelConfig.WEATHER_CLIP_DESC: return this.__weatherClipDesc; break; case config.levels.LevelConfig.HINTS_CLIP_DESC: return this.__hintsClipDesc; break; case config.levels.LevelConfig.WEATHER_PARAMS: return this.__weatherParams; break; case config.levels.LevelConfig.AIR_OBSTACLES_ARRAY: return this.__airObstaclesArray; break; case config.levels.LevelConfig.AIR_BKG_OBJS_ARRAY: return this.__airBkgObjsArray; break; case config.levels.LevelConfig.PLANES_POS_AND_CONF: return this.__planesPosAndConf; break; case config.levels.LevelConfig.GAME_SUBTYPE_PARAMS: return this.__gameSubTypeParams; break; case config.levels.LevelConfig.BONUSES_ARRAY: return this.__bonusesArray; break; case config.levels.LevelConfig.HINT_DIALOG_ARRAY: return this.__hintDialogArray; } }; v2.setConfigItem = function (itemType, obj) { switch (itemType) { case config.levels.LevelConfig.TITLE: this.__title = String(obj); break; case config.levels.LevelConfig.SUBTITLE: this.__subTitle = String(obj); break; case config.levels.LevelConfig.MISSION: this.__mission = String(obj); break; case config.levels.LevelConfig.LOCATION: this.__location = Number(obj); break; case config.levels.LevelConfig.WEATHER: this.__weather = Number(obj); break; case config.levels.LevelConfig.WIND_DIR: this.__windDir = Vector2D(obj); break; case config.levels.LevelConfig.GAME_SUBTYPE: this.__gameSubType = Number(this.__gameSubType); break; case config.levels.LevelConfig.ARENA_SIZE_TYPE: this.__arenaSizeType = Number(obj); break; case config.levels.LevelConfig.TIME_LIMIT_SEC: this.__timeLimitSec = Number(obj); break; case config.levels.LevelConfig.TIME_LIMIT_SEC_IS_POSITIVE: this.__timeLimitSecIsPositive = Boolean(obj); break; case config.levels.LevelConfig.SKY_TYPE: this.__skyType = Number(obj); break; default: } }; v2.setConfigItemArr = function (itemType, obj) { switch (itemType) { case config.levels.LevelConfig.OBJECTIVE_CLIP_DESC: this.__objectiveClipDesc = obj; break; case config.levels.LevelConfig.WEATHER_CLIP_DESC: this.__weatherClipDesc = obj; break; case config.levels.LevelConfig.HINTS_CLIP_DESC: this.__hintsClipDesc = obj; break; case config.levels.LevelConfig.WEATHER_PARAMS: this.__weatherParams = obj; break; case config.levels.LevelConfig.AIR_OBSTACLES_ARRAY: this.__airObstaclesArray = obj; break; case config.levels.LevelConfig.AIR_BKG_OBJS_ARRAY: this.__airBkgObjsArray = obj; break; case config.levels.LevelConfig.PLANES_POS_AND_CONF: this.__planesPosAndConf = obj; break; case config.levels.LevelConfig.GAME_SUBTYPE_PARAMS: this.__gameSubTypeParams = obj; break; case config.levels.LevelConfig.BONUSES_ARRAY: this.__bonusesArray = obj; break; case config.levels.LevelConfig.HINT_DIALOG_ARRAY: this.__hintDialogArray = obj; break; default: } }; v1.TITLE = 0; v1.SUBTITLE = 1; v1.MISSION = 2; v1.OBJECTIVE_CLIP_DESC = 3; v1.WEATHER_CLIP_DESC = 4; v1.HINTS_CLIP_DESC = 5; v1.LOCATION = 6; v1.WEATHER = 7; v1.WEATHER_PARAMS = 8; v1.WIND_DIR = 9; v1.AIR_OBSTACLES_ARRAY = 10; v1.AIR_BKG_OBJS_ARRAY = 11; v1.PLANES_POS_AND_CONF = 12; v1.GAME_SUBTYPE = 13; v1.GAME_SUBTYPE_PARAMS = 14; v1.BONUSES_ARRAY = 15; v1.ARENA_SIZE_TYPE = 16; v1.TIME_LIMIT_SEC = 17; v1.TIME_LIMIT_SEC_IS_POSITIVE = 18; v1.SKY_TYPE = 19; v1.HINT_DIALOG_ARRAY = 20; v2.__skyType = enums.SkyTypes.BLUE; ASSetPropFlags(config.levels.LevelConfig.prototype, null, 1); } #endinitclip } movieClip 1706 __Packages.Vector2D { #initclip if (!_global.Vector2D) { var v1 = function (x, y) { this.__x = x; this.__y = y; }; _global.Vector2D = v1; var v2 = v1.prototype; v2.Normalize = function () { var v2 = Math.sqrt(this.__x * this.__x + this.__y * this.__y); this.__x /= v2; this.__y /= v2; }; v2.Rotate = function (alpha_degrees) { var v2; v2 = Math.sqrt(this.__x * this.__x + this.__y * this.__y); this.__x = v2 * Math.cos(alpha_degrees * Vector2D.C_2_PI_360); this.__y = v2 * Math.sin(alpha_degrees * Vector2D.C_2_PI_360); }; v2.Length = function () { return Math.sqrt(this.__x * this.__x + this.__y * this.__y); }; v2.Add = function (otherVector) { this.__x += otherVector.getX(); this.__y += otherVector.getY(); }; v2.AddXY = function (ox, oy) { this.__x += ox; this.__y += oy; }; v2.Sub = function (otherVector) { this.__x -= otherVector.getX(); this.__y -= otherVector.getY(); }; v2.SubXY = function (ox, oy) { this.__x -= ox; this.__y -= oy; }; v2.Flip = function () { this.__x *= -1; this.__y *= -1; }; v2.getX = function () { return this.__x; }; v2.getY = function () { return this.__y; }; v2.setX = function (x) { this.__x = x; }; v2.setXY = function (x, y) { this.__x = x; this.__y = y; }; v2.setY = function (y) { this.__y = y; }; v2.setVec = function (vec) { this.__x = vec.getX(); this.__y = vec.getY(); }; v2.Multiply = function (k) { this.__x *= k; this.__y *= k; }; v2.getAlpha = function () { return Math.atan2(this.__y, this.__x); }; v2.getAlphaDeg = function () { return Vector2D.C_180_PI * Math.atan2(this.__y, this.__x); }; v1.getAlphaDegXY = function (x, y) { return Vector2D.C_180_PI * Math.atan2(y, x); }; v2.Dot = function (vec2) { return this.getX() * vec2.getX() + this.getY() * vec2.getY(); }; v2.Distance = function (vec2) { var v3; var v2; v3 = this.__x - vec2.getX(); v2 = this.__y - vec2.getY(); return Math.sqrt(v3 * v3 + v2 * v2); }; v2.isInfinite = function () { if (this.__x == undefined && this.__y == undefined) { return true; } return false; }; v1.C_2_PI_360 = 0.0174532925199433; v1.C_180_PI = 57.29577951308232; ASSetPropFlags(_global.Vector2D.prototype, null, 1); } #endinitclip } movieClip 1707 __Packages.gamemenu.components.PlaneInventory { #initclip if (!_global.gamemenu) { _global.gamemenu = new Object(); } if (!_global.gamemenu.components) { _global.gamemenu.components = new Object(); } if (!_global.gamemenu.components.PlaneInventory) { var v1 = function (x, y, rows, columns, shopType, isDraggable, cashCounter, itemList, weaponsLimitCount, weaponLimitInfo) { super.constructor.apply(this, arguments); this.__weaponLimitInfo = weaponLimitInfo; this.__weaponLimitInfo.SetPlaneInventory(this); this.__cashCounter = cashCounter; this.__maxNumOfWeapons = weaponsLimitCount; this.InitItemList(itemList); this.InitListener(); }; gamemenu.components.PlaneInventory = v1; gamemenu.components.PlaneInventory extends gamemenu.components.ItemMatrix; var v2 = v1.prototype; v2.InitItemList = function (itemList) { var v2; var v4; var v3; v4 = itemList.length; v2 = 0; while (v2 < v4) { v3 = itemList[v2]; this.AddItem(v3); ++v2; } }; v2.InitListener = function () { this.addEventListener('click', DelegatePlus.create(this, this.HandleSellAction)); }; v2.HandleSellAction = function (evtObj) { var v2; v2 = this.getSelectedItemId(); if (v2 == enums.ItemTypes.NONE) { return undefined; } var v7; var v4; var v3; v7 = this.__cashCounter.getCashAmount(); if (GameConfig.getSGameType() == enums.GameTypes.MULTIPLAYER) { v4 = Number(enums.ItemTypes.getItemInfo(v2, enums.ItemTypes.COST)); } else { v4 = Number(enums.ItemTypes.getItemInfo(v2, enums.ItemTypes.SELL_COST)); } v3 = String(enums.ItemTypes.getItemInfo(v2, enums.ItemTypes.NAME)); if (v2 == enums.ItemTypes.EXTRA_CARGO_STORAGE) { if (!this.RemoveRow()) { this.ShowMessageToInfoBar('Cannot sell ' + v3 + '!\nHint: Remove all items from the last row or sell some items.'); return undefined; } } if (v2 == enums.ItemTypes.ADVANCED_WEAPON_RACK) { var v5; var v6; v5 = this.getCountOfItems(enums.ItemTypes.CLASS_PRIMARY_WEAPON); v6 = this.getCountOfItems(enums.ItemTypes.CLASS_SECONDARY_WEAPON); if (v5 == this.__maxNumOfWeapons) { this.ShowMessageToInfoBar('Cannot sell ' + v3 + '! Selling this device will decrease weapon carriage limit.\nHint: Sell some primary weapons to sell this item.'); return undefined; } if (v6 == this.__maxNumOfWeapons) { this.ShowMessageToInfoBar('Cannot sell ' + v3 + '! Selling this device will decrease weapon carriage limit.\nHint: Sell some secondary weapons to sell this item.'); return undefined; } this.DecWeaponsCountLimit(); } this.RemoveItem(v2); this.__cashCounter.AddCash(v4); this.ShowMessageToInfoBar(v3 + ' sold for ' + String(v4) + ' $'); this.RefocusSelection(); WebApi.TrackEvent(WebApi.C_TR_EVT_ITEM_SOLD, v2); }; v2.getWeaponsCountLimit = function () { return this.__maxNumOfWeapons; }; v2.RefocusSelection = function () { var v2; v2 = this.findNonEmtySlotRowCol(); if (v2[0] != -1 && v2[1] != -1) { this.SelectSlot(this, v2[0], v2[1]); } }; v2.IncWeaponsCountLimit = function () { ++this.__maxNumOfWeapons; this.dispatchEvent({'target': this, 'type': gamemenu.components.PlaneInventory.EVT_INC_WEAPON_LIMIT}); return this.__maxNumOfWeapons; }; v2.DecWeaponsCountLimit = function () { --this.__maxNumOfWeapons; this.dispatchEvent({'target': this, 'type': gamemenu.components.PlaneInventory.EVT_DEC_WEAPON_LIMIT}); return this.__maxNumOfWeapons; }; v2.CheckInvUpgrade = function (itemId) { switch (itemId) { case enums.ItemTypes.EXTRA_CARGO_STORAGE: this.AddRow(); break; case enums.ItemTypes.ADVANCED_WEAPON_RACK: this.IncWeaponsCountLimit(); } }; v2.AddItem = function (itemId) { this.CheckInvUpgrade(itemId); super.AddItem(itemId); }; v1.EVT_INC_WEAPON_LIMIT = 'EVT_INC_WEAPON_LIMIT'; v1.EVT_DEC_WEAPON_LIMIT = 'EVT_DEC_WEAPON_LIMIT'; ASSetPropFlags(gamemenu.components.PlaneInventory.prototype, null, 1); } #endinitclip } movieClip 1708 __Packages.gamemenu.components.WeaponLimitInfo { #initclip if (!_global.gamemenu) { _global.gamemenu = new Object(); } if (!_global.gamemenu.components) { _global.gamemenu.components = new Object(); } if (!_global.gamemenu.components.WeaponLimitInfo) { var v1 = function (x, y, weaponsLimitCount) { mx.events.EventDispatcher.initialize(this); this.__x = x; this.__y = y; this.__maxNumOfWeapons = weaponsLimitCount; }; gamemenu.components.WeaponLimitInfo = v1; var v2 = v1.prototype; v2.InitSemaphoreArray = function () { this.__semaphoresBtnArray = new Array(); var v7; var v2; var v3; var v6; var v4; var v5; var v8; v6 = this.__x; v4 = this.__y; v5 = 3 * this.C_STEP + 5; v8 = (this.__maxNumOfWeapons + 1) * (this.C_STEP + 15); v2 = new MenuButton(MenuButton.C_RECT_BTN, '', v6, v4, v5, v8, gamemenu.components.WeaponLimitInfo.C_BTN_FEATHER, 0, 'P', gamemenu.components.WeaponLimitInfo.C_FONT_BORDER, false, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v2.SetHint(this.C_PRIMARY_WPN_INFO); v2.AllowFadeOutAfterClick(false); v2.SetLabelFormat(14, true, 'center'); v3 = new MenuButton(MenuButton.C_RECT_BTN, '', v6 + v5 + this.C_STEP, v4, v5, v8, gamemenu.components.WeaponLimitInfo.C_BTN_FEATHER, 0, 'S', gamemenu.components.WeaponLimitInfo.C_FONT_BORDER, false, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v3.SetHint(this.C_SECONDARY_WPN_INFO); v3.AllowFadeOutAfterClick(false); v3.SetLabelFormat(14, true, 'center'); this.__semaphoresBtnArray.push(new Array(v2, v3)); v4 += 15 + this.C_STEP; v7 = 0; while (v7 < this.__maxNumOfWeapons) { v2 = new MenuButton(MenuButton.C_CLIP_BTN, this.C_SEMAPHORE_CLIP_NAME, v6 + 4, v4, v5, v8, gamemenu.components.WeaponLimitInfo.C_BTN_FEATHER, 0, '', IngMenu.C_SMALL_FONT_BORDER, false, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v2.SetHint(this.C_DEFAULT_WPN_SLOT_INFO); v2.AllowFadeOutAfterClick(false); v2.__skin._xscale = this.C_SEM_SCALE; v2.__skin._yscale = this.C_SEM_SCALE; v2.__skin.gotoAndStop(this.C_SEM_COLOR_EMPTY); v2.addEventListener(MenuButton.EVT_ACTIVE, DelegatePlus.create(this, this.InitSemColor)); this.__lastRowPrimXPos = v6 + 4; v3 = new MenuButton(MenuButton.C_CLIP_BTN, this.C_SEMAPHORE_CLIP_NAME, v6 + 4 + v5 + this.C_STEP, v4, v5, v8, gamemenu.components.WeaponLimitInfo.C_BTN_FEATHER, 0, '', IngMenu.C_SMALL_FONT_BORDER, false, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v3.SetHint(this.C_DEFAULT_WPN_SLOT_INFO); v3.AllowFadeOutAfterClick(false); v3.__skin._xscale = this.C_SEM_SCALE; v3.__skin._yscale = this.C_SEM_SCALE; v3.__skin.gotoAndStop(this.C_SEM_COLOR_EMPTY); v3.addEventListener(MenuButton.EVT_ACTIVE, DelegatePlus.create(this, this.InitSemColor)); this.__lastRowSecXPos = v6 + 4 + v5 + this.C_STEP; this.__semaphoresBtnArray.push(new Array(v2, v3)); v4 += v2.__skin._height + this.C_STEP; this.__lastRowYPos = v4; ++v7; } }; v2.InitListener = function () { this.__planeInventory.addEventListener(gamemenu.components.ItemMatrix.EVT_ITEM_ADDED, DelegatePlus.create(this, this.RefreshWeaponInfo)); this.__planeInventory.addEventListener(gamemenu.components.ItemMatrix.EVT_ITEM_REMOVED, DelegatePlus.create(this, this.RefreshWeaponInfo)); this.__planeInventory.addEventListener(gamemenu.components.ItemMatrix.EVT_ITEM_RELEASE_DRAG, DelegatePlus.create(this, this.RefreshWeaponInfo)); }; v2.RefreshWeaponInfo = function (evtObj) { this.ResetWeaponInfo(); var v4; var v14; v14 = evtObj.type; v4 = evtObj.itemId; this.CheckForAdvancedRackUpgrade(v14, v4); var v10; var v7; var v11; v11 = this.__planeInventory.getItemList(); var v12; var v13; v12 = this.__planeInventory.getColSize(); v13 = this.__planeInventory.getRowSize(); var v3; var v5; var v2; var v8; var v9; var v6; v8 = 1; v9 = 1; v10 = 0; while (v10 < v13) { v7 = 0; while (v7 < v12) { v4 = v11[v10][v7]; v3 = String(enums.ItemTypes.getItemInfo(v4, enums.ItemTypes.CLASS)); v5 = String(enums.ItemTypes.getItemInfo(v4, enums.ItemTypes.NAME)); if (v3 == enums.ItemTypes.CLASS_PRIMARY_WEAPON) { v2 = 0; } if (v3 == enums.ItemTypes.CLASS_SECONDARY_WEAPON) { v2 = 1; } if (v3 == enums.ItemTypes.CLASS_PRIMARY_WEAPON) { v5 = String(enums.ItemTypes.getItemInfo(v4, enums.ItemTypes.NAME)); v6 = this.__semaphoresBtnArray[v8][v2].__skin; v6.gotoAndStop(this.C_SEM_COLOR_OCCUPIED); this.__semaphoresBtnArray[v8][v2].SetHint(this.C_HINT_PREFIX + v5); ++v8; } if (v3 == enums.ItemTypes.CLASS_SECONDARY_WEAPON) { v5 = String(enums.ItemTypes.getItemInfo(v4, enums.ItemTypes.NAME)); v6 = this.__semaphoresBtnArray[v9][v2].__skin; v6.gotoAndStop(this.C_SEM_COLOR_OCCUPIED); this.__semaphoresBtnArray[v9][v2].SetHint(this.C_HINT_PREFIX + v5); ++v9; } ++v7; } ++v10; } }; v2.ResetWeaponInfo = function () { var v3; var v2; var v4; v3 = 1; while (v3 < this.__maxNumOfWeapons + 1) { v2 = 0; while (v2 < 2) { v4 = this.__semaphoresBtnArray[v3][v2].__skin; v4.gotoAndStop(this.C_SEM_COLOR_EMPTY); ++v2; } ++v3; } }; v2.InitSemColor = function (evtObj) { this.RefreshWeaponInfo(); }; v2.FadeIn = function () { var v3; var v2; v3 = 0; while (v3 < this.__maxNumOfWeapons + 1) { v2 = 0; while (v2 < 2) { this.__semaphoresBtnArray[v3][v2].FadeIn(); ++v2; } ++v3; } }; v2.FadeOut = function (destroyAfterFadeOut) { var v3; var v2; v3 = 0; while (v3 < this.__maxNumOfWeapons + 1) { v2 = 0; while (v2 < 2) { this.__semaphoresBtnArray[v3][v2].FadeOut(destroyAfterFadeOut); ++v2; } ++v3; } }; v2.Destroy = function () { var v3; var v2; v3 = 0; while (v3 < this.__maxNumOfWeapons + 1) { v2 = 0; while (v2 < 2) { this.__semaphoresBtnArray[v3][v2].Destroy(); ++v2; } ++v3; } }; v2.AddRow = function () { ++this.__maxNumOfWeapons; var v2; var v3; var v6; var v7; var v5; var v4; v6 = this.__lastRowPrimXPos; v7 = this.__lastRowYPos; v5 = 3 * this.C_STEP + 5; v4 = (this.__maxNumOfWeapons + 1) * (this.C_STEP + 15); this.__semaphoresBtnArray[0][0].RedrawButtonRect(v5, v4); this.__semaphoresBtnArray[0][1].RedrawButtonRect(v5, v4); v2 = new MenuButton(MenuButton.C_CLIP_BTN, this.C_SEMAPHORE_CLIP_NAME, v6, v7, v5, v4, gamemenu.components.WeaponLimitInfo.C_BTN_FEATHER, 0, '', IngMenu.C_SMALL_FONT_BORDER, false, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v2.SetHint(this.C_DEFAULT_WPN_SLOT_INFO); v2.AllowFadeOutAfterClick(false); v2.__skin._xscale = this.C_SEM_SCALE; v2.__skin._yscale = this.C_SEM_SCALE; v2.__skin.gotoAndStop(this.C_SEM_COLOR_EMPTY); v2.addEventListener(MenuButton.EVT_ACTIVE, DelegatePlus.create(this, this.InitSemColor)); v6 = this.__lastRowSecXPos; v3 = new MenuButton(MenuButton.C_CLIP_BTN, this.C_SEMAPHORE_CLIP_NAME, v6, v7, v5, v4, gamemenu.components.WeaponLimitInfo.C_BTN_FEATHER, 0, '', IngMenu.C_SMALL_FONT_BORDER, false, IngMenu.C_DEPTH_TYPE, IngMenu.C_HINT_DEPTH_TYPE); v3.SetHint(this.C_DEFAULT_WPN_SLOT_INFO); v3.AllowFadeOutAfterClick(false); v3.__skin._xscale = this.C_SEM_SCALE; v3.__skin._yscale = this.C_SEM_SCALE; v3.__skin.gotoAndStop(this.C_SEM_COLOR_EMPTY); v3.addEventListener(MenuButton.EVT_ACTIVE, DelegatePlus.create(this, this.InitSemColor)); this.__semaphoresBtnArray.push(new Array(v2, v3)); this.__lastRowYPos += v2.__skin._height + this.C_STEP; v2.FadeIn(); v3.FadeIn(); }; v2.RemoveRow = function () { if (this.__maxNumOfWeapons == 0) { return undefined; } var v2; var v6; v2 = this.__semaphoresBtnArray[this.__maxNumOfWeapons][0]; v6 = this.__semaphoresBtnArray[this.__maxNumOfWeapons][1]; var v5; v5 = v2.__skin._height; this.__lastRowYPos -= v5 + this.C_STEP; v2.FadeOut(true); v6.FadeOut(true); this.__semaphoresBtnArray.splice(this.__maxNumOfWeapons); this.__maxNumOfWeapons = this.__semaphoresBtnArray.length - 1; var v4; var v3; v4 = 3 * this.C_STEP + 5; v3 = (this.__maxNumOfWeapons + 1) * (this.C_STEP + 15); this.__semaphoresBtnArray[0][0].RedrawButtonRect(v4, v3); this.__semaphoresBtnArray[0][1].RedrawButtonRect(v4, v3); }; v2.CheckForAdvancedRackUpgrade = function (evtType, itemId) { if (itemId != enums.ItemTypes.ADVANCED_WEAPON_RACK) { return undefined; } if (evtType == gamemenu.components.ItemMatrix.EVT_ITEM_ADDED) { this.AddRow(); } if (evtType == gamemenu.components.ItemMatrix.EVT_ITEM_REMOVED) { this.RemoveRow(); } }; v2.SetPlaneInventory = function (planeInventory) { this.__planeInventory = planeInventory; this.InitSemaphoreArray(); this.InitListener(); this.RefreshWeaponInfo(); }; v1.C_BTN_FEATHER = 5; v1.C_FONT_BORDER = 0; v2.C_SEM_COLOR_EMPTY = 'F_GREY'; v2.C_SEM_COLOR_OCCUPIED = 'F_GREEN'; v2.C_HINT_PREFIX = 'Mounted weapon: '; v2.C_DEFAULT_WPN_SLOT_INFO = gamemenu.components.WeaponLimitInfo.prototype.C_HINT_PREFIX + 'NONE'; v2.C_PRIMARY_WPN_INFO = 'Mounted primary weapon indicator'; v2.C_SECONDARY_WPN_INFO = 'Mounted secondary weapon indicator'; v2.C_SEMAPHORE_CLIP_NAME = 'S_WPN_MOUNT_SEMAPHORE'; v2.C_STEP = 5; v2.C_SEM_SCALE = 80; ASSetPropFlags(gamemenu.components.WeaponLimitInfo.prototype, null, 1); } #endinitclip } movieClip 1709 __Packages.enums.GameTypes { #initclip if (!_global.enums) { _global.enums = new Object(); } if (!_global.enums.GameTypes) { var v1 = function () {}; enums.GameTypes = v1; var v2 = v1.prototype; v1.INS_SINGLEPLAYER = 0; v1.SINGLE_LEVEL = 1; v1.TUTORIAL = 2; v1.MULTIPLAYER = 3; v1.DEFENCE = 4; ASSetPropFlags(enums.GameTypes.prototype, null, 1); } #endinitclip } movieClip 1710 __Packages.MenuPage { #initclip if (!_global.MenuPage) { var v1 = function (pageName, parentPage) { this.__pageName = pageName; this.__parentPage = parentPage; this.itemsArray = new Array(); this.itemsCnt = 0; this.__fadedIn = false; }; _global.MenuPage = v1; var v2 = v1.prototype; v2.AddItem = function (component) { var v2; this.itemsCnt = this.itemsArray.push(component); v2 = this.itemsCnt - 1; return v2; }; v2.GetItem = function (idx) { return this.itemsArray[idx]; }; v2.FadeIn = function () { this.__fadedIn = true; this.__parentPage.FadeOut(); var v2; var v3; v2 = 0; while (v2 < this.itemsCnt) { v3 = this.itemsArray[v2]; v3.FadeIn(); ++v2; } }; v2.FadeOut = function (destroyAfterFadeOut) { this.__fadedIn = false; var v4; if (typeof destroyAfterFadeOut == 'object') { v4 = false; } else { v4 = (destroyAfterFadeOut == undefined) ? false : destroyAfterFadeOut; } var v2; var v3; v2 = 0; while (v2 < this.itemsCnt) { v3 = this.itemsArray[v2]; v3.FadeOut(v4); ++v2; } }; v2.setVacantRowX = function (x) { this.__vacantRowX = x; }; v2.setVacantRowY = function (y) { this.__vacantRowY = y; }; v2.getVacantRowX = function () { return this.__vacantRowX; }; v2.getVacantRowY = function () { return this.__vacantRowY; }; v2.incVacantRowX = function (padding) { this.__vacantRowX += padding; }; v2.incVacantRowY = function (padding) { this.__vacantRowY += padding; }; v2.setParent = function (parentPage) { this.__parentPage = parentPage; }; v2.DestroyPage = function () { this.Destroy(); }; v2.isDisplayed = function () { return this.__fadedIn; }; v2.Destroy = function () { this.__fadedIn = false; var v3; var v2; v3 = this.itemsArray.length; v2 = 0; while (v2 < v3) { this.itemsArray[v2].Destroy(); ++v2; } }; v2.C_BTN_FEATHER = 10; ASSetPropFlags(_global.MenuPage.prototype, null, 1); } #endinitclip } movieClip 1711 __Packages.enums.LocationTypes { #initclip if (!_global.enums) { _global.enums = new Object(); } if (!_global.enums.LocationTypes) { var v1 = function () {}; enums.LocationTypes = v1; var v2 = v1.prototype; v1.getLocationInfo = function (id, infoType) { return enums.LocationTypes.LocationInfoList[id][infoType]; }; v1.COUNT = 2; v1.NEVADA_DESERT = 0; v1.DOLOMITES = 1; v1.C_INFO_NAME = 0; v1.C_INFO_BKG_CLIP_NAME = 1; v1.C_INFO_GROUND_CLIP_NAME = 2; v1.LocationInfoList = [['Nevada desert', 'S_BACKGROUND', 'S_GRASS'], ['Dolomites', 'S_DOLOMITES', 'S_DOLOMITES_GRASS']]; ASSetPropFlags(enums.LocationTypes.prototype, null, 1); } #endinitclip } movieClip 1712 __Packages.gamemenu.components.GameShop { #initclip if (!_global.gamemenu) { _global.gamemenu = new Object(); } if (!_global.gamemenu.components) { _global.gamemenu.components = new Object(); } if (!_global.gamemenu.components.GameShop) { var v1 = function (x, y, rows, columns, shopType, isDraggable, childInventory, cashCounter) { WebApi.setGameShop(this); super.constructor.apply(this, arguments); this.__planeInventory = childInventory; this.__cashCounter = cashCounter; this.AddAllItemsToShop(); this.InitListener(); this.UpdateGlow(undefined, this.__cashCounter.getCashAmount()); }; gamemenu.components.GameShop = v1; gamemenu.components.GameShop extends gamemenu.components.ItemMatrix; var v2 = v1.prototype; v2.AddAllItemsToShop = function () { var v2; v2 = 0; while (v2 < enums.ItemTypes.ITEMS_COUNT) { this.AddItem(enums.ItemTypes.ItemShopOrder[v2]); ++v2; } this.RefreshItemLocks(); }; v2.InitListener = function () { this.addEventListener('click', DelegatePlus.create(this, this.HandleBuyAction)); this.__cashCounter.addEventListener(gamemenu.components.CashCounter.EVT_DATA_CHANGE, DelegatePlus.create(this, this.UpdateGlow)); this.addEventListener(gamemenu.components.ItemMatrix.EVT_WEBAPI_BUY_CLICKED, DelegatePlus.create(this, this.HandleWebApiBuyAction)); }; v2.HandleBuyAction = function (evtObj) { var v2; var v4; v2 = this.getSelectedItemId(); v4 = String(enums.ItemTypes.getItemInfo(v2, enums.ItemTypes.CLASS)); if (this.__planeInventory.isFull()) { this.ShowMessageToInfoBar('Plane inventory full!'); return undefined; } var v6; v6 = this.__planeInventory.findItemIdFromRowCol(v2); if (v6[0] != enums.ItemTypes.NONE && v6[1] != enums.ItemTypes.NONE) { this.__infoBar.SetInfo('Item already mounted!', '', '', '', ''); this.ShowMessageToInfoBar('Item already mounted!'); return undefined; } var v3; v3 = this.__planeInventory.getCountOfItems(enums.ItemTypes.CLASS_PRIMARY_WEAPON); if (v4 == enums.ItemTypes.CLASS_PRIMARY_WEAPON && v3 >= this.__planeInventory.getWeaponsCountLimit()) { this.ShowMessageToInfoBar('Only ' + String(v3) + ' primary weapon(s) allowed for this plane!'); return undefined; } v3 = this.__planeInventory.getCountOfItems(enums.ItemTypes.CLASS_SECONDARY_WEAPON); if (v4 == enums.ItemTypes.CLASS_SECONDARY_WEAPON && v3 >= this.__planeInventory.getWeaponsCountLimit()) { this.ShowMessageToInfoBar('Only ' + String(v3) + ' secondary weapon(s) allowed for this plane!'); return undefined; } var v7; var v5; v7 = this.__cashCounter.getCashAmount(); v5 = Number(enums.ItemTypes.getItemInfo(v2, enums.ItemTypes.COST)); if (v5 > v7) { this.ShowMessageToInfoBar('Not enough cash!'); return undefined; } this.__planeInventory.AddItem(v2); this.__cashCounter.SubCash(v5); var v8; v8 = String(enums.ItemTypes.getItemInfo(v2, enums.ItemTypes.NAME)); this.ShowMessageToInfoBar(v8 + ' bought for ' + String(v5) + ' $'); if (v4 == enums.ItemTypes.CLASS_SECONDARY_WEAPON) { this.SetSecWpnBought(); } WebApi.TrackEvent(WebApi.C_TR_EVT_ITEM_BOUGHT, v2); }; v2.HandleWebApiBuyAction = function () { WebApi.ShowStore(this); }; v2.getChildCashCounter = function () { return this.__cashCounter; }; v2.UpdateGlow = function (evt, curCash) { var v7; if (curCash != undefined) { v7 = curCash; } else { v7 = evt.dataVal; } var v5; var v2; v5 = 0; while (v5 < this.__rows) { v2 = 0; while (v2 < this.__columns) { var v3; v3 = this.__itemDataArray[v5][v2]; var v6; v6 = Number(enums.ItemTypes.getItemInfo(v3, enums.ItemTypes.COST)); var v4; if (v7 >= v6) { v4 = !this.isBought(this.__planeInventory, v3); } else { v4 = false; } LayMan.SetGlow(this.__itemSlotsArray[v5][v2].__skin, v4); ++v2; } ++v5; } }; v2.isBought = function (inventory, itemId) { var v1; v1 = inventory.findItemIdFromRowCol(itemId); if (v1[0] == -1 && v1[1] == -1) { return false; } else { return true; } }; v2.SetSecWpnBought = function () { GameConfig.SetSecWpnBoughtFor1StTime(); }; ASSetPropFlags(gamemenu.components.GameShop.prototype, null, 1); } #endinitclip } movieClip 1713 __Packages.FrameMan { #initclip if (!_global.FrameMan) { var v1 = function () { FrameMan.__frm = 0; }; _global.FrameMan = v1; var v2 = v1.prototype; v1.Update = function () { ++FrameMan.__frm; }; v1.getFrameIdx = function () { return FrameMan.__frm; }; v1.isEvenFrame = function () { if (FrameMan.__frm % 2 == 0) { return true; } else { return false; } }; v1.isNthFrame = function (n) { if (FrameMan.__frm % n == 0) { return true; } else { return false; } }; v1.getFPS = function () { var v1 = getTimer(); var v2; v2 = 1000 / ((v1 - FrameMan.__oldTime) / (FrameMan.__frm - FrameMan.__oldFrameIdx)); FrameMan.__oldTime = v1; FrameMan.__oldFrameIdx = FrameMan.__frm; return Math.round(v2, 1); }; v1.__frm = 0; v1.__oldFrameIdx = -1; ASSetPropFlags(_global.FrameMan.prototype, null, 1); } #endinitclip } movieClip 1714 __Packages.gamemenu.components.MsgDialog { #initclip if (!_global.gamemenu) { _global.gamemenu = new Object(); } if (!_global.gamemenu.components) { _global.gamemenu.components = new Object(); } if (!_global.gamemenu.components.MsgDialog) { var v1 = function (title, txt, dlgSize, btnLabels) { mx.events.EventDispatcher.initialize(this); var v3; if (dlgSize == undefined) { this.__size = gamemenu.components.MsgDialog.C_SIZE_SMALL; } else { this.__size = dlgSize; } this.__btnCount = btnLabels.length; this.__bkgArray = new Array(); this.__btnArray = new Array(); if (btnLabels == undefined) { this.__btnCount = 1; v3 = 'Ok'; } var v2; var mx; var v12; var v13; var v14; mx = Const.C_SCENE_WIDTH / 2 - this.C_SIZES_ARRAY[this.__size][0] / 2; v12 = Const.C_SCENE_HEIGHT / 2 - this.C_SIZES_ARRAY[this.__size][1] / 2; v13 = this.C_SIZES_ARRAY[this.__size][0]; v14 = this.C_SIZES_ARRAY[this.__size][1]; v2 = new MenuButton(MenuButton.C_RECT_BTN, '', mx, v12, v13, v14, this.C_CORNER_FEATHER, 0, title, 5, true, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v2.SetLabelFormat(22, true, 'center'); v2.SetLabelColor(Const.C_COLOR_ORANGE); this.__bkgArray.push(v2); v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', mx, v12 + 2 * this.C_BTN_PAD, v13, v14 - this.C_BTN_HEIGHT - 2 * this.C_BTN_PAD, this.C_CORNER_FEATHER, 0, '\n' + txt, 0, true, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v2.SetLabelFormat(18, false, 'center'); v2.SetLabelColor(Const.C_COLOR_WHITE); this.__bkgArray.push(v2); var v4; var v7; var v8; var v11 = this.C_BTN_PAD; v7 = this.C_BTN_WIDTH; v8 = this.C_BTN_HEIGHT; var v6; var v9; var v10; if (this.__btnCount == 1) { v6 = mx + v13 / 2 - v7 / 2; v9 = v12 + v14 - v8 - v11; v10 = 0; } if (this.__btnCount > 1) { v6 = mx + v11; v9 = v12 + v14 - v8 - v11; v10 = (v13 - this.__btnCount * v7 - 2 * v11) / (this.__btnCount - 1) + v7; } v4 = 0; while (v4 < this.__btnCount) { if (this.__btnCount == 1) { if (btnLabels[0] == undefined) { v3 = v3; } else { v3 = btnLabels[v4]; } } else { v3 = btnLabels[v4]; } v2 = new MenuButton(MenuButton.C_RECT_BTN, '', v6, v9, v7, v8, this.C_CORNER_FEATHER, 0, v3, 3, false, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v2.SetLabelFormat(15, true, 'center'); v2.AllowFadeOutAfterClick(false); v2.SetMaxAlpha(50); v2.SetLabel(v3); v2.addEventListener(MenuButton.EVT_CLICK, DelegatePlus.create(this, this.DoActionWhenButtonClicked, v4)); this.__btnArray.push(v2); v6 += v10; ++v4; } }; gamemenu.components.MsgDialog = v1; var v2 = v1.prototype; v2.FadeIn = function () { var v2; v2 = 0; while (v2 < 2) { this.__bkgArray[v2].FadeIn(); ++v2; } v2 = 0; while (v2 < this.__btnCount) { this.__btnArray[v2].FadeIn(); ++v2; } }; v2.FadeOut = function (destroyAfterFadeOut) { var v2; v2 = 0; while (v2 < 2) { this.__bkgArray[v2].FadeOut(destroyAfterFadeOut); ++v2; } v2 = 0; while (v2 < this.__btnCount) { this.__btnArray[v2].FadeOut(destroyAfterFadeOut); ++v2; } }; v2.Destroy = function () { var v2; v2 = 0; while (v2 < 2) { this.__bkgArray[v2].DestroyBtn(); ++v2; } v2 = 0; while (v2 < this.__btnCount) { this.__btnArray[v2].DestroyBtn(); ++v2; } }; v2.DoActionWhenButtonClicked = function (evtObj, btnIdx) { this.dispatchEvent({'target': this, 'type': MenuButton.EVT_CLICK, 'buttonIdx': btnIdx}); }; v1.C_SIZE_VERY_SMALL = 0; v1.C_SIZE_SMALL = 1; v1.C_SIZE_WIDE = 2; v1.C_SIZE_MEDIUM = 3; v2.C_SIZES_ARRAY = [[300, 200], [400, 200], [550, 250], [550, 350]]; v2.C_CORNER_FEATHER = 10; v2.C_DEPTH_TYPE = LayMan.C_S_MENU; v2.C_HINT_DEPTH_TYPE = LayMan.C_S_MENU_HINTS; v2.C_BTN_WIDTH = 122; v2.C_BTN_HEIGHT = 30; v2.C_BTN_PAD = 10; ASSetPropFlags(gamemenu.components.MsgDialog.prototype, null, 1); } #endinitclip } movieClip 1715 __Packages.TransitionFader { #initclip if (!_global.TransitionFader) { var v1 = function (parentGame) { this.__parentGame = parentGame; this.__splash = this.__parentGame.getSplash(); this.__mainMenu = this.__parentGame.getMainMenu(); this.__intro = this.__parentGame.getIntro(); this.__briefingMenu = this.__parentGame.getBriefingMenu(); this.__world = this.__parentGame.getWorld(); this.__scoreMenu = this.__parentGame.getScoreMenu(); this.__shopMenu = this.__parentGame.getShopMenu(); this.__outro = this.__parentGame.getOutro(); this.__toggMenu = this.__parentGame.getToggleMenu(); this.__clip = LayMan.RegisterClip('S_TRANSITION_FADER', LayMan.C_S_LAST_LAYER_GROUP); this.__isDarkening = true; this.__currTransFrom = undefined; this.__currTransTo = undefined; }; _global.TransitionFader = v1; var v2 = v1.prototype; v2.DoTransition = function (transFromId, transToId) { this.__isDarkening = true; if (transFromId == undefined || transToId == undefined) { return undefined; } this.__currTransFrom = transFromId; this.__currTransTo = transToId; gotoAndStop('F_transition_begin'); this.__clip._visible = true; if (transFromId == TransitionFader.C_INIT) { this.__clip._alpha = 100; } else { this.__clip._alpha = 0; } this.AddUpdateListener(); }; v2.Render = function () { if (this.__clip._alpha >= 100) { this.__isDarkening = false; this.__clip._alpha = 100; this.SwitchContent(); } if (this.__isDarkening) { this.RenderFadedObjects(this.__currTransFrom); this.__clip._alpha += TransitionFader.C_FADE_STEP; } else { this.RenderFadedObjects(this.__currTransTo); this.__clip._alpha -= TransitionFader.C_FADE_STEP; } if (this.__clip._alpha < 0) { this.__clip._alpha = 0; this.__clip._visible = false; this.__isDarkening = true; this.GotoProperFrame(this.__currTransTo); } }; v2.SwitchContent = function () { if (this.__currTransFrom == TransitionFader.C_INIT && this.__currTransTo == TransitionFader.C_SPLASH) { this.__splash = new gamemenu.Cinematics(Game.C_SPLASH_CLIP_NAME, TransitionFader.C_SPLASH, TransitionFader.C_INTRO, this.__parentGame, undefined, undefined, Const.IS_SKIP_SPLASH_BANNED); this.__parentGame.setSplash(this.__splash); } if (this.__currTransFrom == TransitionFader.C_INIT && this.__currTransTo == TransitionFader.C_MAIN_MENU) { this.__mainMenu = new MainMenu(this.__parentGame); this.__parentGame.setMainMenu(this.__mainMenu); this.__toggMenu.FadeIn(); } if (this.__currTransFrom == TransitionFader.C_SPLASH && this.__currTransTo == TransitionFader.C_INTRO) { this.__splash.Destroy(); this.__splash = undefined; this.__intro = new gamemenu.Cinematics(Game.C_INTRO_CLIP_NAME, TransitionFader.C_INTRO, TransitionFader.C_MAIN_MENU, this.__parentGame, undefined, Game.C_INTRO_MUSIC_NAME); this.__parentGame.setSplash(this.__splash); this.__parentGame.setIntro(this.__intro); this.__toggMenu.FadeIn(); } if (this.__currTransFrom == TransitionFader.C_INTRO && this.__currTransTo == TransitionFader.C_MAIN_MENU) { this.__toggMenu.FadeIn(); this.__intro.Destroy(); this.__intro = undefined; this.__mainMenu = new MainMenu(this.__parentGame); this.__parentGame.setIntro(this.__intro); this.__parentGame.setMainMenu(this.__mainMenu); } if (this.__currTransFrom == TransitionFader.C_MAIN_MENU && this.__currTransTo == TransitionFader.C_SHOP_MENU) { this.__mainMenu.Destroy(); this.__mainMenu = undefined; this.__shopMenu = new gamemenu.ShopMenu(this.__parentGame); this.__parentGame.setMainMenu(this.__mainMenu); this.__parentGame.setShopMenu(this.__shopMenu); } if (this.__currTransFrom == TransitionFader.C_MAIN_MENU && this.__currTransTo == TransitionFader.C_BRIEFING_MENU) { this.__mainMenu.Destroy(); this.__mainMenu = undefined; this.__briefingMenu = new gamemenu.BriefingMenu(this.__parentGame); this.__parentGame.setMainMenu(this.__mainMenu); this.__parentGame.setBriefingMenu(this.__briefingMenu); } if (this.__currTransFrom == TransitionFader.C_MAIN_MENU && this.__currTransTo == TransitionFader.C_WORLD) { this.__mainMenu.Destroy(); this.__mainMenu = undefined; this.__world = new World(this.__parentGame); this.__parentGame.setMainMenu(this.__mainMenu); this.__parentGame.setWorld(this.__world); this.__world.PostProcessCmd(); } if (this.__currTransFrom == TransitionFader.C_WORLD && this.__currTransTo == TransitionFader.C_WORLD) { this.__world.Destroy(); this.__world = undefined; this.__world = new World(this.__parentGame); this.__parentGame.setWorld(this.__world); this.__world.PostProcessCmd(); } if (this.__currTransFrom == TransitionFader.C_BRIEFING_MENU && this.__currTransTo == TransitionFader.C_WORLD) { this.__briefingMenu.Destroy(); this.__briefingMenu = undefined; this.__world = new World(this.__parentGame); this.__parentGame.setBriefingMenu(this.__briefingMenu); this.__parentGame.setWorld(this.__world); this.__world.PostProcessCmd(); } if (this.__currTransFrom == TransitionFader.C_BRIEFING_MENU && this.__currTransTo == TransitionFader.C_SHOP_MENU) { this.__briefingMenu.Destroy(); this.__briefingMenu = undefined; this.__shopMenu = new gamemenu.ShopMenu(this.__parentGame); this.__parentGame.setBriefingMenu(this.__briefingMenu); this.__parentGame.setShopMenu(this.__shopMenu); } if (this.__currTransFrom == TransitionFader.C_WORLD && this.__currTransTo == TransitionFader.C_SCORE_MENU) { this.__world.Destroy(); this.__world = undefined; this.__scoreMenu = new gamemenu.ScoreMenu(this.__parentGame); this.__parentGame.setWorld(this.__world); this.__parentGame.setScoreMenu(this.__scoreMenu); this.__world.PostProcessCmd(); } if (this.__currTransFrom == TransitionFader.C_WORLD && this.__currTransTo == TransitionFader.C_BRIEFING_MENU) { this.__world.Destroy(); this.__world = undefined; this.__briefingMenu = new gamemenu.BriefingMenu(this.__parentGame); this.__parentGame.setWorld(this.__world); this.__parentGame.setBriefingMenu(this.__briefingMenu); this.__world.PostProcessCmd(); } if (this.__currTransFrom == TransitionFader.C_SCORE_MENU && this.__currTransTo == TransitionFader.C_SHOP_MENU) { this.__scoreMenu.Destroy(); this.__scoreMenu = undefined; this.__shopMenu = new gamemenu.ShopMenu(this.__parentGame); this.__parentGame.setScoreMenu(this.__scoreMenu); this.__parentGame.setShopMenu(this.__shopMenu); } if (this.__currTransFrom == TransitionFader.C_SCORE_MENU && this.__currTransTo == TransitionFader.C_MAIN_MENU) { this.__scoreMenu.Destroy(); this.__scoreMenu = undefined; this.__mainMenu = new MainMenu(this.__parentGame); this.__parentGame.setScoreMenu(this.__scoreMenu); this.__parentGame.setMainMenu(this.__mainMenu); } if (this.__currTransFrom == TransitionFader.C_SCORE_MENU && this.__currTransTo == TransitionFader.C_WORLD) { this.__scoreMenu.Destroy(); this.__scoreMenu = undefined; this.__world = new World(this.__parentGame); this.__parentGame.setScoreMenu(this.__scoreMenu); this.__parentGame.setWorld(this.__world); this.__world.PostProcessCmd(); } if (this.__currTransFrom == TransitionFader.C_SHOP_MENU && this.__currTransTo == TransitionFader.C_BRIEFING_MENU) { this.__shopMenu.Destroy(); this.__shopMenu = undefined; this.__briefingMenu = new gamemenu.BriefingMenu(this.__parentGame); this.__parentGame.setShopMenu(this.__shopMenu); this.__parentGame.setBriefingMenu(this.__briefingMenu); } if (this.__currTransFrom == TransitionFader.C_WORLD && this.__currTransTo == TransitionFader.C_MAIN_MENU) { this.__world.Destroy(); this.__world = undefined; if (GameConfig.getGameType() == enums.GameTypes.TUTORIAL) { this.__mainMenu = new MainMenu(this.__parentGame, MainMenu.C_MENU_IDX_PLAY); } else { this.__mainMenu = new MainMenu(this.__parentGame); } this.__parentGame.setWorld(this.__world); this.__parentGame.setMainMenu(this.__mainMenu); this.__world.PostProcessCmd(); } if (this.__currTransFrom == TransitionFader.C_SCORE_MENU && this.__currTransTo == TransitionFader.C_OUTRO) { this.__scoreMenu.Destroy(); this.__scoreMenu = undefined; this.__outro = new gamemenu.Cinematics(Game.C_OUTRO_CLIP_NAME, TransitionFader.C_OUTRO, TransitionFader.C_MAIN_MENU, this.__parentGame, undefined, Game.C_OUTRO_MUSIC_NAME); this.__parentGame.setScoreMenu(this.__scoreMenu); this.__parentGame.setOutro(this.__outro); } if (this.__currTransFrom == TransitionFader.C_SCORE_MENU && this.__currTransTo == TransitionFader.C_FOKKER_OUTRO) { this.__scoreMenu.Destroy(); this.__scoreMenu = undefined; this.__outro = new gamemenu.Cinematics(Game.C_FOKKER_OUTRO_CLIP_NAME, TransitionFader.C_OUTRO, TransitionFader.C_MAIN_MENU, this.__parentGame, undefined, Game.C_OUTRO_MUSIC_NAME); this.__parentGame.setScoreMenu(this.__scoreMenu); this.__parentGame.setOutro(this.__outro); } if (this.__currTransFrom == TransitionFader.C_MAIN_MENU && this.__currTransTo == TransitionFader.C_OUTRO) { this.__mainMenu.Destroy(); this.__mainMenu = undefined; this.__outro = new gamemenu.Cinematics(Game.C_OUTRO_CLIP_NAME, TransitionFader.C_OUTRO, TransitionFader.C_MAIN_MENU, this.__parentGame, 'Menu', Game.C_OUTRO_MUSIC_NAME); this.__parentGame.setMainMenu(this.__mainMenu); this.__parentGame.setOutro(this.__outro); } if (this.__currTransFrom == TransitionFader.C_MAIN_MENU && this.__currTransTo == TransitionFader.C_FOKKER_OUTRO) { this.__mainMenu.Destroy(); this.__mainMenu = undefined; this.__outro = new gamemenu.Cinematics(Game.C_FOKKER_OUTRO_CLIP_NAME, TransitionFader.C_FOKKER_OUTRO, TransitionFader.C_MAIN_MENU, this.__parentGame, 'Menu', Game.C_OUTRO_MUSIC_NAME); this.__parentGame.setMainMenu(this.__mainMenu); this.__parentGame.setOutro(this.__outro); } if (this.__currTransFrom == TransitionFader.C_OUTRO && this.__currTransTo == TransitionFader.C_MAIN_MENU) { this.__outro.Destroy(); this.__outro = undefined; this.__mainMenu = new MainMenu(this.__parentGame); this.__parentGame.setOutro(this.__outro); this.__parentGame.setMainMenu(this.__mainMenu); } if (this.__currTransFrom == TransitionFader.C_FOKKER_OUTRO && this.__currTransTo == TransitionFader.C_MAIN_MENU) { this.__outro.Destroy(); this.__outro = undefined; this.__mainMenu = new MainMenu(this.__parentGame); this.__parentGame.setOutro(this.__outro); this.__parentGame.setMainMenu(this.__mainMenu); } }; v2.GotoProperFrame = function (transToId) { switch (transToId) { case TransitionFader.C_SPLASH: gotoAndStop('F_splash_begin'); break; case TransitionFader.C_MAIN_MENU: gotoAndStop('F_main_menu_begin'); break; case TransitionFader.C_INTRO: gotoAndStop('F_intro_begin'); break; case TransitionFader.C_BRIEFING_MENU: gotoAndStop('F_briefing_menu_begin'); break; case TransitionFader.C_WORLD: gotoAndStop('F_world_begin'); break; case TransitionFader.C_SCORE_MENU: gotoAndStop('F_score_menu_begin'); break; case TransitionFader.C_SHOP_MENU: gotoAndStop('F_shop_menu_begin'); break; case TransitionFader.C_OUTRO: gotoAndStop('F_outro_begin'); break; case TransitionFader.C_FOKKER_OUTRO: gotoAndStop('F_outro_begin'); } this.RemoveUpdateListener(); }; v2.RenderFadedObjects = function (transToId) { switch (transToId) { break; case TransitionFader.C_SPLASH: case TransitionFader.C_MAIN_MENU: this.__mainMenu.Render(); break; break; case TransitionFader.C_INTRO: case TransitionFader.C_BRIEFING_MENU: this.__briefingMenu.Render(); break; case TransitionFader.C_WORLD: this.__world.Update(); break; case TransitionFader.C_SCORE_MENU: this.__scoreMenu.Render(); break; case TransitionFader.C_SHOP_MENU: this.__shopMenu.Render(); break; break; case TransitionFader.C_OUTRO: case TransitionFader.C_FOKKER_OUTRO: } }; v2.AddUpdateListener = function () { this.__clip.onEnterFrame = mx.utils.Delegate.create(this, this.Render); }; v2.RemoveUpdateListener = function () { this.__clip.onEnterFrame = null; }; v1.C_INIT = -1; v1.C_SPLASH = 0; v1.C_MAIN_MENU = 1; v1.C_INTRO = 2; v1.C_BRIEFING_MENU = 3; v1.C_WORLD = 4; v1.C_SCORE_MENU = 5; v1.C_SHOP_MENU = 6; v1.C_OUTRO = 7; v1.C_FOKKER_OUTRO = 8; v1.C_FADE_FRAMES_COUNT = 13; v1.C_FADE_STEP = 100 / TransitionFader.C_FADE_FRAMES_COUNT; ASSetPropFlags(_global.TransitionFader.prototype, null, 1); } #endinitclip } movieClip 1716 __Packages.gamemenu.Cinematics { #initclip if (!_global.gamemenu) { _global.gamemenu = new Object(); } if (!_global.gamemenu.Cinematics) { var v1 = function (clipName, transFromType, transToType, parentGame, btnText, musicName, isSkipBanned) { mx.events.EventDispatcher.initialize(this); this.clipName = clipName; this.__gameConf = GameConfig.getInstance(); this.__gameConf.addEventListener(GameConfig.EVT_TOGGLE_MUSIC, DelegatePlus.create(this, this.ToggleSound)); Mouse.show(); btnText = (btnText == undefined) ? this.C_SKIP_TXT : btnText; this.__parentGame = parentGame; this.__transFrom = transFromType; this.__transTo = transToType; this.__clip = LayMan.RegisterClip(clipName, this.C_DEPTH_TYPE); this.__checkClip = LayMan.RegisterEmptyClip('', this.C_DEPTH_TYPE); if (this.__clip == undefined) { this.Skip(); } isSkipBanned = (isSkipBanned == undefined) ? false : true; if (!isSkipBanned) { this.__skipBtn = new MenuButton(MenuButton.C_RECT_BTN, '', this.C_X, this.C_Y, 100, 40, gamemenu.Cinematics.C_BTN_FEATHER, 1118481, btnText, MainMenu.C_LARGE_FONT_BORDER, false, this.C_DEPTH_TYPE, this.C_DEPTH_TYPE); this.__skipBtn.addEventListener(MenuButton.EVT_CLICK, mx.utils.Delegate.create(this, this.Skip)); } this.__checkClip.onEnterFrame = mx.utils.Delegate.create(this, this.CheckClipEnd); this.__music = new Sound(this.__clip); this.__music.attachSound(musicName); this.Play(); }; gamemenu.Cinematics = v1; var v2 = v1.prototype; v2.Play = function () { this.__clip.gotoAndPlay('F_BEGIN'); this.__skipBtn.FadeIn(); this.PlayMusic(); }; v2.PlayMusic = function () { if (this.__gameConf.isMusicEnabled()) { this.__music.start(); } }; v2.ToggleSound = function (evt) { if (evt.state == true) { this.__music.start(); } else { this.__music.stop(); } }; v2.StopMusic = function () { this.__music.start(); }; v2.Skip = function () { this.__skipBtn.FadeOut(); this.__clip.gotoAndStop('F_END'); this.__clip.Destroy(); this.__music.stop(); this.__parentGame.DoTransition(this.__transFrom, this.__transTo); }; v2.CheckClipEnd = function () { if (this.__clip._currentframe == this.__clip._totalframes) { this.__skipBtn.FadeOut(); this.__clip.stop(); this.__clip.Finish(); this.__music.stop(); this.__parentGame.DoTransition(this.__transFrom, this.__transTo); this.__checkClip.onEnterFrame = undefined; } }; v2.Destroy = function () { this.__skipBtn.Destroy(); LayMan.RemoveClip(this.__clip); LayMan.RemoveClip(this.__checkClip); LayMan.ResetMenuDepths(); this.__music.stop(); delete this.__music; }; v2.C_DEPTH_TYPE = LayMan.C_S_MENU; v2.C_SKIP_TXT = 'Skip'; v1.C_BTN_FEATHER = 20; v2.C_X = 680; v2.C_Y = 540; ASSetPropFlags(gamemenu.Cinematics.prototype, null, 1); } #endinitclip } movieClip 1717 __Packages.gamemenu.BriefingMenu { #initclip if (!_global.gamemenu) { _global.gamemenu = new Object(); } if (!_global.gamemenu.BriefingMenu) { var v1 = function (parentGame) { Mouse.show(); this.__parentGame = parentGame; this.__myWorld = this.__parentGame.getWorld(); this.__toggleMenu = this.__parentGame.getToggleMenu(); this.__gameConfig = this.__parentGame.getGameConfig(); this.__worldConfig = this.__parentGame.getWorldConfig(); this.__menuBkg = new MenuBkg(); this.__pagesArray = new Array(); this.CreateBriefing(); this.InitMusic(); this.AddUpdateListener(); }; gamemenu.BriefingMenu = v1; var v2 = v1.prototype; v2.CreateBriefing = function () { var v7; v7 = GameConfig.getCurrentLevelId(); var v3; v3 = this.__worldConfig.getLevelConfigObj(v7); var v2; v2 = new MenuPage('Briefing', null); this.CreateBlankPage(v2, String(v3.getConfigItem(config.levels.LevelConfig.TITLE))); this.AddDesc(v2, String(v3.getConfigItem(config.levels.LevelConfig.SUBTITLE)), String(v3.getConfigItem(config.levels.LevelConfig.MISSION))); var v4; v4 = v3.getConfigItemArr(config.levels.LevelConfig.OBJECTIVE_CLIP_DESC); var v8 = Const.C_COLOR_WHITE; var v9 = this.C_OBJECTIVE_FONT_SIZE; this.AddXClipDesc(v2, 'Objective', v4, v8, v9); v4 = v3.getConfigItemArr(config.levels.LevelConfig.WEATHER_CLIP_DESC); this.AddXClipDesc(v2, 'Weather', v4); v4 = v3.getConfigItemArr(config.levels.LevelConfig.HINTS_CLIP_DESC); this.AddXClipDesc(v2, 'Hints', v4); this.__pagesArray.push(v2); var v5; v5 = new MenuButton(MenuButton.C_RECT_BTN, '', 650, 540, 100, 40, gamemenu.BriefingMenu.C_BTN_FEATHER, 0, 'Play', gamemenu.BriefingMenu.C_LARGE_FONT_BORDER, false, gamemenu.BriefingMenu.C_DEPTH_TYPE, gamemenu.BriefingMenu.C_HINT_DEPTH_TYPE); v5.addEventListener('click', mx.utils.Delegate.create(this, this.ExitFromBriefingAndStartGame)); v5.SetHint('Start mission'); v2.AddItem(v5); if (GameConfig.getGameType() != enums.GameTypes.MULTIPLAYER) { var v6; v6 = new MenuButton(MenuButton.C_RECT_BTN, '', 545, 540, 100, 40, gamemenu.BriefingMenu.C_BTN_FEATHER, 0, 'Shop', gamemenu.BriefingMenu.C_LARGE_FONT_BORDER, false, gamemenu.BriefingMenu.C_DEPTH_TYPE, gamemenu.BriefingMenu.C_HINT_DEPTH_TYPE); v6.addEventListener('click', mx.utils.Delegate.create(this, this.ExitFromBriefingAndGotoShop)); v6.SetHint('Reconfigure aircraft in shop'); v2.AddItem(v6); } this.Show(); }; v2.Show = function () { this.__pagesArray[0].FadeIn(); }; v2.Hide = function () { this.__pagesArray[0].FadeOut(); }; v2.Destroy = function () { this.RemoveUpdateListener(); this.__menuBkg.Destroy(); var v2; var v3; v3 = this.__pagesArray.length; v2 = 0; while (v2 < v3) { this.__pagesArray[v2].Destroy(); ++v2; } this.DestroyMusic(); LayMan.ResetMenuDepths(); }; v2.AddDesc = function (thisPage, SubTitle, Desc, color, siz) { var v2; var v6; var v5; var v7; var v12; v6 = thisPage.getVacantRowX() + this.C_DEF_PADDING; v5 = thisPage.getVacantRowY(); v7 = this.C_DEF_PAGE_WIDTH; v12 = this.C_DEF_PAGE_HEIGHT; if (SubTitle != undefined && SubTitle != '') { var v3; v3 = new MenuButton(MenuButton.C_CLIP_BTN, '', v6, v5, v7 - 2 * this.C_DEF_PADDING, 30, MainMenu.C_BTN_FEATHER, 0, SubTitle, 0, true, gamemenu.BriefingMenu.C_DEPTH_TYPE, gamemenu.BriefingMenu.C_HINT_DEPTH_TYPE); v3.AllowFadeOutAfterClick(false); v3.SetLabelColor(Const.C_COLOR_ORANGE); v3.SetLabelFormat(this.C_SUBTITLE_FONT_SIZE, false, 'left'); v3.setAutoSize('center'); v3.SetMaxAlpha(100); thisPage.AddItem(v3); thisPage.incVacantRowY(this.C_DESC_FONT_SIZE + 12); v5 = thisPage.getVacantRowY(); } v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', v6, v5, v7 - 3 * this.C_DEF_PADDING, 50, MainMenu.C_BTN_FEATHER, 0, Desc, 0, true, gamemenu.BriefingMenu.C_DEPTH_TYPE, gamemenu.BriefingMenu.C_HINT_DEPTH_TYPE); v2.AllowFadeOutAfterClick(false); if (siz != undefined) { v2.SetLabelFormat(siz, false, 'left'); } else { v2.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); } v2.setAutoSize('center'); v2.SetMaxAlpha(100); if (color != undefined) { v2.SetLabelColor(color); } thisPage.AddItem(v2); var v8; v8 = v2.__txtField._height; thisPage.incVacantRowY(v8 + this.C_DEF_PADDING); }; v2.AddClipDesc = function (thisPage, SubTitle, clipName, clipMask, Desc, color, siz) { var v6; if (v6 != undefined) { v6 = LayMan.RegisterClip(clipMask, gamemenu.BriefingMenu.C_DEPTH_TYPE); } v6._visible = false; var v10; var v7; var v11; var v18; v10 = thisPage.getVacantRowX() + this.C_DEF_PADDING; v7 = thisPage.getVacantRowY(); v11 = this.C_DEF_PAGE_WIDTH; v18 = this.C_DEF_PAGE_HEIGHT; if (SubTitle != undefined && SubTitle != '') { var v5; v5 = new MenuButton(MenuButton.C_CLIP_BTN, '', v10, v7, v11 - 2 * this.C_DEF_PADDING, 30, MainMenu.C_BTN_FEATHER, 0, SubTitle, 0, true, gamemenu.BriefingMenu.C_DEPTH_TYPE, gamemenu.BriefingMenu.C_HINT_DEPTH_TYPE); v5.AllowFadeOutAfterClick(false); v5.SetLabelColor(Const.C_COLOR_ORANGE); v5.SetLabelFormat(this.C_SUBTITLE_FONT_SIZE, false, 'left'); v5.setAutoSize('center'); v5.SetMaxAlpha(100); thisPage.AddItem(v5); thisPage.incVacantRowY(this.C_DESC_FONT_SIZE + this.C_DEF_PADDING); v7 = thisPage.getVacantRowY(); } var v3; v3 = new MenuButton(MenuButton.C_CLIP_BTN, clipName, v10, v7, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, gamemenu.BriefingMenu.C_DEPTH_TYPE, gamemenu.BriefingMenu.C_HINT_DEPTH_TYPE); v3.AllowFadeOutAfterClick(false); v3.SetMaxAlpha(100); v3.setIsSkinStatic(true); thisPage.AddItem(v3); var v8; var v9; v8 = this.getWidth(v3.__skin, v6); v9 = this.getHeight(v3.__skin, v6); var v2; v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', v10 + v8 + this.C_DEF_PADDING, v7, v11 - (v8 + 5 * this.C_DEF_PADDING), v9, MainMenu.C_BTN_FEATHER, 0, Desc, MainMenu.C_LARGE_FONT_BORDER, true, gamemenu.BriefingMenu.C_DEPTH_TYPE, gamemenu.BriefingMenu.C_HINT_DEPTH_TYPE); v2.AllowFadeOutAfterClick(false); if (siz != undefined) { v2.SetLabelFormat(siz, false, 'left'); } else { v2.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); } v2.SetMaxAlpha(100); if (color != undefined) { v2.SetLabelColor(color); } thisPage.AddItem(v2); var v12; v12 = v2.__txtField._height > v9 ? v2.__txtField._height : v9; thisPage.incVacantRowY(v12 + this.C_DEF_PADDING); }; v2.AddClipClipDesc = function (thisPage, SubTitle, clip1Name, clip1Mask, clip2Name, clip2Mask, Desc, color, siz) { var v7; if (v7 != undefined) { v7 = LayMan.RegisterClip(clip1Mask, gamemenu.BriefingMenu.C_DEPTH_TYPE); } v7._visible = false; var v9; if (v9 != undefined) { v9 = LayMan.RegisterClip(clip2Mask, gamemenu.BriefingMenu.C_DEPTH_TYPE); } v9._visible = false; var v10; var v6; var v18; var v21; v10 = thisPage.getVacantRowX() + this.C_DEF_PADDING; v6 = thisPage.getVacantRowY(); v18 = this.C_DEF_PAGE_WIDTH; v21 = this.C_DEF_PAGE_HEIGHT; if (SubTitle != undefined && SubTitle != '') { var v5; v5 = new MenuButton(MenuButton.C_CLIP_BTN, '', v10, v6, v18 - 2 * this.C_DEF_PADDING, 30, MainMenu.C_BTN_FEATHER, 0, SubTitle, 0, true, gamemenu.BriefingMenu.C_DEPTH_TYPE, gamemenu.BriefingMenu.C_HINT_DEPTH_TYPE); v5.AllowFadeOutAfterClick(false); v5.SetLabelColor(Const.C_COLOR_ORANGE); v5.SetLabelFormat(this.C_SUBTITLE_FONT_SIZE, false, 'left'); v5.setAutoSize('center'); v5.SetMaxAlpha(100); thisPage.AddItem(v5); thisPage.incVacantRowY(this.C_DESC_FONT_SIZE + this.C_DEF_PADDING); v6 = thisPage.getVacantRowY(); } var v3; v3 = new MenuButton(MenuButton.C_CLIP_BTN, clip1Name, v10, v6, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, gamemenu.BriefingMenu.C_DEPTH_TYPE, gamemenu.BriefingMenu.C_HINT_DEPTH_TYPE); v3.AllowFadeOutAfterClick(false); v3.SetMaxAlpha(100); v3.setIsSkinStatic(true); thisPage.AddItem(v3); var v11; var v15; v11 = this.getWidth(v3.__skin, v7); v15 = this.getHeight(v3.__skin, v7); var v8; v8 = new MenuButton(MenuButton.C_CLIP_BTN, clip2Name, v10 + v11 + 2 * this.C_DEF_PADDING, v6, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, gamemenu.BriefingMenu.C_DEPTH_TYPE, gamemenu.BriefingMenu.C_HINT_DEPTH_TYPE); v8.AllowFadeOutAfterClick(false); v8.SetMaxAlpha(100); v8.setIsSkinStatic(true); thisPage.AddItem(v8); var v13; var v14; v13 = this.getWidth(v3.__skin, v9); v14 = this.getHeight(v3.__skin, v9); var v2; var v12; v12 = v15 > v14 ? v15 : v14; v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', v10 + v11 + v13 + 3 * this.C_DEF_PADDING, v6, this.C_DEF_PAGE_WIDTH - (v11 + v13 + 7 * this.C_DEF_PADDING), v12, MainMenu.C_BTN_FEATHER, 0, Desc, MainMenu.C_LARGE_FONT_BORDER, true, gamemenu.BriefingMenu.C_DEPTH_TYPE, gamemenu.BriefingMenu.C_HINT_DEPTH_TYPE); v2.AllowFadeOutAfterClick(false); if (siz != undefined) { v2.SetLabelFormat(siz, false, 'left'); } else { v2.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); } v2.SetMaxAlpha(100); if (color != undefined) { v2.SetLabelColor(color); } thisPage.AddItem(v2); var v16; v16 = v12 > v2.__txtField._height ? v12 : v2.__txtField._height; thisPage.incVacantRowY(v16 + this.C_DEF_PADDING); }; v2.AddClipClipClipDesc = function (thisPage, SubTitle, clip1Name, clip1Mask, clip2Name, clip2Mask, clip3Name, clip3Mask, Desc, color, siz) { var v14; if (v14 != undefined) { v14 = LayMan.RegisterClip(clip1Mask, gamemenu.BriefingMenu.C_DEPTH_TYPE); } v14._visible = false; var v13; if (v13 != undefined) { v13 = LayMan.RegisterClip(clip2Mask, gamemenu.BriefingMenu.C_DEPTH_TYPE); } v13._visible = false; var v12; if (v12 != undefined) { v12 = LayMan.RegisterClip(clip3Mask, gamemenu.BriefingMenu.C_DEPTH_TYPE); } v12._visible = false; var v10; var v8; var v22; var v25; v10 = thisPage.getVacantRowX() + this.C_DEF_PADDING; v8 = thisPage.getVacantRowY(); v22 = this.C_DEF_PAGE_WIDTH; v25 = this.C_DEF_PAGE_HEIGHT; if (SubTitle != undefined && SubTitle != '') { var v7; v7 = new MenuButton(MenuButton.C_CLIP_BTN, '', v10, v8, v22 - 2 * this.C_DEF_PADDING, 30, MainMenu.C_BTN_FEATHER, 0, SubTitle, 0, true, gamemenu.BriefingMenu.C_DEPTH_TYPE, gamemenu.BriefingMenu.C_HINT_DEPTH_TYPE); v7.AllowFadeOutAfterClick(false); v7.SetLabelColor(Const.C_COLOR_ORANGE); v7.SetLabelFormat(this.C_SUBTITLE_FONT_SIZE, false, 'left'); v7.setAutoSize('center'); v7.SetMaxAlpha(100); thisPage.AddItem(v7); thisPage.incVacantRowY(this.C_DESC_FONT_SIZE + 5); v8 = thisPage.getVacantRowY(); } var v6; v6 = new MenuButton(MenuButton.C_CLIP_BTN, clip1Name, v10, v8, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, gamemenu.BriefingMenu.C_DEPTH_TYPE, gamemenu.BriefingMenu.C_HINT_DEPTH_TYPE); v6.AllowFadeOutAfterClick(false); v6.SetMaxAlpha(100); v6.setIsSkinStatic(true); thisPage.AddItem(v6); var v11; var v19; v11 = this.getWidth(v6.__skin, v14); v19 = this.getHeight(v6.__skin, v14); var v5; v5 = new MenuButton(MenuButton.C_CLIP_BTN, clip2Name, v10 + v11 + 2 * this.C_DEF_PADDING, v8, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, gamemenu.BriefingMenu.C_DEPTH_TYPE, gamemenu.BriefingMenu.C_HINT_DEPTH_TYPE); v5.AllowFadeOutAfterClick(false); v5.SetMaxAlpha(100); v5.setIsSkinStatic(true); thisPage.AddItem(v5); var v15; var v18; v15 = this.getWidth(v5.__skin, v13); v18 = this.getHeight(v5.__skin, v13); var v4; v4 = new MenuButton(MenuButton.C_CLIP_BTN, clip3Name, v10 + v11 + v15 + 3 * this.C_DEF_PADDING, v8, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, gamemenu.BriefingMenu.C_DEPTH_TYPE, gamemenu.BriefingMenu.C_HINT_DEPTH_TYPE); v4.AllowFadeOutAfterClick(false); v4.SetMaxAlpha(100); v4.setIsSkinStatic(true); thisPage.AddItem(v4); var v16; var v17; v16 = this.getWidth(v4.__skin, v12); v17 = this.getHeight(v4.__skin, v12); var v2; var v9; v9 = v19 > v18 ? v19 : v18; v9 = v9 > v17 ? v9 : v17; v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', v10 + v11 + v15 + v16 + 4 * this.C_DEF_PADDING, v8, this.C_DEF_PAGE_WIDTH - (v11 + v15 + v16 + 9 * this.C_DEF_PADDING), v9, MainMenu.C_BTN_FEATHER, 0, Desc, MainMenu.C_LARGE_FONT_BORDER, true, gamemenu.BriefingMenu.C_DEPTH_TYPE, gamemenu.BriefingMenu.C_HINT_DEPTH_TYPE); v2.AllowFadeOutAfterClick(false); if (siz != undefined) { v2.SetLabelFormat(siz, false, 'left'); } else { v2.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); } v2.SetMaxAlpha(100); if (color != undefined) { v2.SetLabelColor(color); } thisPage.AddItem(v2); var v20; v20 = v9 > v2.__txtField._height ? v9 : v2.__txtField._height; thisPage.incVacantRowY(v20 + this.C_DEF_PADDING); }; v2.CreateBlankPage = function (thisPage, pageTitle) { var v5; var v4; var v7; var v6; v5 = this.C_DEF_PAGE_POS_X; v4 = this.C_DEF_PAGE_POS_Y; v7 = this.C_DEF_PAGE_WIDTH; v6 = this.C_DEF_PAGE_HEIGHT; thisPage.setVacantRowX(v5 + this.C_DEF_PADDING); thisPage.setVacantRowY(v4); var v2; v2 = new MenuButton(MenuButton.C_RECT_BTN, '', v5, v4, v7, v6, MainMenu.C_BTN_FEATHER, 0, pageTitle, MainMenu.C_SMALL_FONT_BORDER, true, gamemenu.BriefingMenu.C_DEPTH_TYPE, gamemenu.BriefingMenu.C_HINT_DEPTH_TYPE); v2.SetLabelColor(Const.C_COLOR_ORANGE); v2.SetLabelFormat(this.C_TITLE_FONT_SIZE, false, 'left'); v2.AllowFadeOutAfterClick(false); thisPage.AddItem(v2); thisPage.incVacantRowY(this.C_TITLE_FONT_SIZE + this.C_DEF_PADDING + 7); }; v2.getWidth = function (mc, mask) { if (mask == undefined) { return mc._width; } else { return mask._width; } }; v2.getHeight = function (mc, mask) { if (mask == undefined) { return mc._height; } else { return mask._height; } }; v2.AddXClipDesc = function (thisPage, subtitle, args, color, siz) { var v7; v7 = args.length; switch (v7) { case 1: this.AddDesc(thisPage, subtitle, args[0], color, siz); break; case 3: this.AddClipDesc(thisPage, subtitle, args[0], args[1], args[2], color, siz); break; case 5: this.AddClipClipDesc(thisPage, subtitle, args[0], args[1], args[2], args[3], args[4], color, siz); break; case 7: this.AddClipClipClipDesc(thisPage, subtitle, args[0], args[1], args[2], args[3], args[4], args[5], args[6], color, siz); } }; v2.ExitFromBriefingAndStartGame = function () { this.Hide(); this.__parentGame.DoTransition(TransitionFader.C_BRIEFING_MENU, TransitionFader.C_WORLD); }; v2.ExitFromBriefingAndGotoShop = function () { this.Hide(); this.__parentGame.DoTransition(TransitionFader.C_BRIEFING_MENU, TransitionFader.C_SHOP_MENU); }; v2.Render = function () { this.__menuBkg.Render(); FrameMan.Update(); this.__parentGame.UpdateFPSText(); }; v2.InitMusic = function () { var v2; v2 = LayMan.RegisterEmptyClip(this.C_MUSIC_NAME, LayMan.C_S_MENU); this.__music = new Sound(v2); this.__music.attachSound(this.C_MUSIC_NAME); this.__gameConfig.addEventListener(GameConfig.EVT_TOGGLE_MUSIC, mx.utils.Delegate.create(this, this.ToggleMusic)); if (this.__gameConfig.isMusicEnabled()) { this.__music.start(0, 99999); } }; v2.DestroyMusic = function () { this.__music.stop(); delete this.__music; }; v2.ToggleMusic = function (evt) { if (evt.state == true) { this.__music.start(0, 99999); } else { this.__music.stop(); } }; v2.AddUpdateListener = function () { this.__updateClip = LayMan.RegisterEmptyClip('MainMenuUpdate', LayMan.C_S_MENU); this.__updateClip.onEnterFrame = mx.utils.Delegate.create(this, this.Render); }; v2.RemoveUpdateListener = function () { this.__updateClip.onEnterFrame = null; }; v2.C_MUSIC_NAME = 'Batt-Edgen.wav'; v2.C_DEF_PAGE_POS_X = 12; v2.C_DEF_PAGE_POS_Y = 30; v2.C_DEF_PAGE_WIDTH = 776; v2.C_DEF_PAGE_HEIGHT = 565; v2.C_DEF_PADDING = 10; v2.C_BTN_FONT_SIZE = 18; v2.C_TITLE_FONT_SIZE = 20; v2.C_SUBTITLE_FONT_SIZE = 18; v2.C_DESC_FONT_SIZE = 15; v2.C_OBJECTIVE_FONT_SIZE = 17; v1.C_BTN_FEATHER = MainMenu.C_BTN_FEATHER; v1.C_LARGE_FONT_BORDER = MainMenu.C_LARGE_FONT_BORDER; v1.C_SMALL_FONT_BORDER = MainMenu.C_SMALL_FONT_BORDER; v1.C_DEPTH_TYPE = LayMan.C_S_MENU; v1.C_HINT_DEPTH_TYPE = LayMan.C_S_MENU_HINTS; ASSetPropFlags(gamemenu.BriefingMenu.prototype, null, 1); } #endinitclip } movieClip 1718 __Packages.gamemenu.ScoreMenu { #initclip if (!_global.gamemenu) { _global.gamemenu = new Object(); } if (!_global.gamemenu.ScoreMenu) { var v1 = function (parentGame) { Mouse.show(); this.__maskClip = LayMan.RegisterClip('S_PILOT_PICTURE_MASK', LayMan.C_S_OTHER); this.__parentGame = parentGame; this.__myWorld = this.__parentGame.getWorld(); this.__toggleMenu = this.__parentGame.getToggleMenu(); this.__gameConfig = this.__parentGame.getGameConfig(); this.__scoreHolder = this.__gameConfig.getScoreHolder(); this.__planeConfig = this.__gameConfig.getPlaneConfig(); this.__worldConfig = this.__parentGame.getWorldConfig(); this.__menuBkg = new MenuBkg(); this.__pagesArray = new Array(); if (GameConfig.getGameType() == enums.GameTypes.MULTIPLAYER) { this.CreateMultiplayerScoreTable(); } else { this.CreateScoreTable(); } this.__pagesArray[0].FadeIn(); this.InitMusic(); this.AddUpdateListener(); this.AutoSubmitScoreAtEndOfCampaign(); if (GameConfig.getGameType() == enums.GameTypes.INS_SINGLEPLAYER) { this.__scoreSubmNotification = LayMan.RegisterClip('S_SCORE_SUBMISSION_NOTIFICATION', LayMan.C_S_MENU_HINTS); this.__scoreSubmNotification._visible = false; } }; gamemenu.ScoreMenu = v1; var v2 = v1.prototype; v2.CreateScoreTable = function () { var v2; v2 = new MenuPage('Briefing', null); this.CreateBlankPage(v2, 'Scores & Stats'); this.__pagesArray.push(v2); this.__scoreTables = new Array(); var v7; var v4; var v3; v4 = this.C_DEF_PAGE_POS_X + this.C_DEF_PADDING; v3 = this.C_DEF_PAGE_POS_Y + 5 * this.C_DEF_PADDING + 30; var v9 = v3; v7 = new gamemenu.components.ScoreTable(v4, v3, gamemenu.components.ScoreTable.C_TYPE_CURRENT, this.__parentGame); v2.AddItem(v7); this.__scoreTables.push(v7); v9 = v3 + gamemenu.components.ScoreTable.C_HEIGHT + this.C_DEF_PADDING; this.__curCashCounter = new gamemenu.components.CashCounter(v4, v9, 0, this.C_CASH_PREFIX_CURRENT, this.C_CASH_HINT_CURRENT, gamemenu.components.ScoreTable.C_WIDTH); v2.AddItem(this.__curCashCounter); v4 = this.C_DEF_PAGE_POS_X + 2 * this.C_DEF_PADDING + gamemenu.components.ScoreTable.C_WIDTH; v3 = this.C_DEF_PAGE_POS_Y + 5 * this.C_DEF_PADDING + 30; v7 = new gamemenu.components.ScoreTable(v4, v3, gamemenu.components.ScoreTable.C_TYPE_OVERALL, this.__parentGame); v2.AddItem(v7); this.__scoreTables.push(v7); this.__scoreTablesCount = this.__scoreTables.length; v9 = v3 + gamemenu.components.ScoreTable.C_HEIGHT + this.C_DEF_PADDING; this.__totCashCounter = new gamemenu.components.CashCounter(v4, v9, this.getCumulativeCashBeforeRenderStart(), this.C_CASH_PREFIX_OVERALL, this.C_CASH_HINT_OVERALL, gamemenu.components.ScoreTable.C_WIDTH); v2.AddItem(this.__totCashCounter); if (GameConfig.getGameType() == enums.GameTypes.INS_SINGLEPLAYER) { var v10; v10 = new MenuButton(MenuButton.C_RECT_BTN, '', 545, 540, 100, 40, gamemenu.ScoreMenu.C_BTN_FEATHER, 0, 'Submit', gamemenu.ScoreMenu.C_LARGE_FONT_BORDER, false, gamemenu.ScoreMenu.C_DEPTH_TYPE, gamemenu.ScoreMenu.C_HINT_DEPTH_TYPE); v10.AllowFadeOutAfterClick(false); v10.SetHint('Submit your score'); v10.addEventListener('click', mx.utils.Delegate.create(this, this.SubmitScoreClick)); v2.AddItem(v10); } var v5; v5 = new MenuButton(MenuButton.C_RECT_BTN, '', 650, 540, 100, 40, gamemenu.ScoreMenu.C_BTN_FEATHER, 0, 'Done', gamemenu.ScoreMenu.C_LARGE_FONT_BORDER, false, gamemenu.ScoreMenu.C_DEPTH_TYPE, gamemenu.ScoreMenu.C_HINT_DEPTH_TYPE); v5.SetHint('Press to continue game'); var v15; v15 = GameConfig.getGameType(); switch (v15) { case enums.GameTypes.INS_SINGLEPLAYER: v5.SetLabel('Done'); v5.addEventListener('click', mx.utils.Delegate.create(this, this.ExitToShopOrOutro)); v5.SetHint('Continue game'); break; case enums.GameTypes.SINGLE_LEVEL: v5.SetLabel('Menu'); v5.addEventListener('click', mx.utils.Delegate.create(this, this.ExitFromScoreAndGotoMainMenu)); v5.SetHint('Return to main menu'); break; default: v5.SetLabel('Done'); v5.addEventListener('click', mx.utils.Delegate.create(this, this.ExitFromScoreAndShowShop)); v5.SetHint('Continue game'); } v2.AddItem(v5); this.__scoreTables[0].addEventListener(gamemenu.components.ScoreTable.EVT_SHOWED_SCORE_STAT, mx.utils.Delegate.create(this, this.UpdateOtherComponents)); v4 = this.C_DEF_PAGE_POS_X; v3 = v9 + 50; v2.setVacantRowX(v4); v2.setVacantRowY(v3); this.AddDesc(v2, 'Medals', ''); this.__medalList = new gamemenu.components.MedalList(v4, v3, this.__scoreHolder, this.__planeConfig); v2.AddItem(this.__medalList); var v8; v8 = this.__planeConfig.getPlaneType(); var v11; var v14; v4 = this.C_DEF_PAGE_POS_X + 2 * (this.C_DEF_PADDING + gamemenu.components.ScoreTable.C_WIDTH) + 3 * this.C_DEF_PADDING; v3 = this.C_DEF_PAGE_POS_Y + 3 * this.C_DEF_PADDING; v2.setVacantRowX(v4); v2.setVacantRowY(v3); v11 = enums.PlaneTypes.getPlaneInfo(v8, enums.PlaneTypes.C_INFO_PILOT_NAME); if (v8 == enums.PlaneTypes.FOKKER) { v11 = 'M. von Richthoffen'; } v14 = enums.PlaneTypes.getPlaneInfo(v8, enums.PlaneTypes.C_INFO_PILOT_CLIP); this.AddClipDesc(v2, v11, v14, this.__maskClip, ''); var v13; var v12; v13 = enums.PlaneTypes.getPlaneInfo(v8, enums.PlaneTypes.C_INFO_PLANE_NAME); v12 = enums.PlaneTypes.getPlaneInfo(v8, enums.PlaneTypes.C_INFO_PLANE_CLIP); this.AddClipDesc(v2, v13, v12, this.__maskClip, ''); this.AddDesc(v2, 'Rank', ''); v4 = v2.getVacantRowX(v4); v3 = v2.getVacantRowY(v3) - 10; this.__rankDisplay = new gamemenu.components.RankDisplay(v4, v3, this.__scoreHolder); v2.AddItem(this.__rankDisplay); var v6; v6 = new MenuButton(MenuButton.C_CLIP_BTN, 'S_SPONSOR_LOGO', 410, 80, 100, 40, gamemenu.ScoreMenu.C_BTN_FEATHER, 0, '', gamemenu.ScoreMenu.C_LARGE_FONT_BORDER, false, gamemenu.ScoreMenu.C_DEPTH_TYPE, gamemenu.ScoreMenu.C_HINT_DEPTH_TYPE); v6.SetMaxAlpha(100); v6.__skin._xscale = 40; v6.__skin._yscale = 40; v6.AllowFadeOutAfterClick(false); v6.addEventListener('click', DelegatePlus.create(MainMenu, MainMenu.ToSponsorSite, WebApi.C_SCORE_MENU_TREMOR_LOGO)); v2.AddItem(v6); this.Show(); }; v2.CreateMultiplayerScoreTable = function () { var v2; v2 = new MenuPage('Briefing', null); this.CreateBlankPage(v2, 'Scores & Stats'); this.__pagesArray.push(v2); this.__scoreTables = new Array(); var v9; var v20; var v17; v20 = this.C_DEF_PAGE_POS_X + this.C_DEF_PADDING; v17 = this.C_DEF_PAGE_POS_Y + 5 * this.C_DEF_PADDING; v2.getVacantRowX(v20); var v16 = 190; var v3; var v11; var v10; var v8 = true; v3 = 0; while (v3 < 4) { v2.setVacantRowY(v17); v11 = this.__gameConfig.getPlaneConfig(v3); v10 = v11.getPlaneType(); var v15; var v5; v15 = enums.PlaneTypes.getPlaneInfo(v10, enums.PlaneTypes.C_INFO_PLANE_NAME); if (v11.getDefaultKeyType() == enums.DefaultKeyTypes.OFF) { v5 = enums.DefaultKeyTypes.C_KEY_TYPES_CLIP_NAMES[enums.DefaultKeyTypes.OFF]; } else { v5 = enums.PlaneTypes.getPlaneInfo(v10, enums.PlaneTypes.C_INFO_PLANE_CLIP); } var v4; v4 = new MenuButton(MenuButton.C_CLIP_BTN, '', 65 + 180 * v3 + 10 * v3, v2.getVacantRowY(), 100, 40, gamemenu.ScoreMenu.C_BTN_FEATHER, 0, 'Player ' + String(v3 + 1), gamemenu.ScoreMenu.C_LARGE_FONT_BORDER, true, gamemenu.ScoreMenu.C_DEPTH_TYPE, gamemenu.ScoreMenu.C_HINT_DEPTH_TYPE); v4.AllowFadeOutAfterClick(false); v4.SetLabelColor(Const.C_COLOR_ORANGE); v2.AddItem(v4); v2.incVacantRowY(45); var v6; v6 = new MenuButton(MenuButton.C_CLIP_BTN, v5, 65 + 180 * v3 + 10 * v3, v2.getVacantRowY(), 100, 100, gamemenu.ScoreMenu.C_BTN_FEATHER, 0, '', gamemenu.ScoreMenu.C_LARGE_FONT_BORDER, false, gamemenu.ScoreMenu.C_DEPTH_TYPE, gamemenu.ScoreMenu.C_HINT_DEPTH_TYPE); v6.AllowFadeOutAfterClick(false); v2.AddItem(v6); v2.incVacantRowY(108); var v12 = v2.getVacantRowY(); if (this.getWinnerIdx() == v3) { v8 = true; } else { v8 = false; } if (v8) { var v7; v7 = new MenuButton(MenuButton.C_CLIP_BTN, '', 65 + 180 * v3 + 10 * v3, v12, 130, 40, gamemenu.ScoreMenu.C_BTN_FEATHER, 0, 'WINNER', gamemenu.ScoreMenu.C_LARGE_FONT_BORDER, false, gamemenu.ScoreMenu.C_DEPTH_TYPE, gamemenu.ScoreMenu.C_HINT_DEPTH_TYPE); v7.AllowFadeOutAfterClick(false); v2.AddItem(v7); } v2.incVacantRowY(45); var v14; var v13; v14 = v2.getVacantRowX(); v13 = v2.getVacantRowY(); v9 = new gamemenu.components.ScoreTable(v14, v13, gamemenu.components.ScoreTable.C_TYPE_CURRENT, this.__parentGame, 180, v3); v2.AddItem(v9); this.__scoreTables.push(v9); v2.incVacantRowX(v16); ++v3; } this.__scoreTablesCount = this.__scoreTables.length; var v19; v19 = new MenuButton(MenuButton.C_RECT_BTN, '', 565, 540, 100, 40, gamemenu.ScoreMenu.C_BTN_FEATHER, 0, 'Menu', gamemenu.ScoreMenu.C_LARGE_FONT_BORDER, false, gamemenu.ScoreMenu.C_DEPTH_TYPE, gamemenu.ScoreMenu.C_HINT_DEPTH_TYPE); v19.SetHint('Goto main menu'); v19.AllowFadeOutAfterClick(false); v19.addEventListener('click', mx.utils.Delegate.create(this, this.MenuBtnClick)); v2.AddItem(v19); var v18; v18 = new MenuButton(MenuButton.C_RECT_BTN, '', 670, 540, 100, 40, gamemenu.ScoreMenu.C_BTN_FEATHER, 0, 'Retry', gamemenu.ScoreMenu.C_LARGE_FONT_BORDER, false, gamemenu.ScoreMenu.C_DEPTH_TYPE, gamemenu.ScoreMenu.C_HINT_DEPTH_TYPE); v18.SetHint('Play again'); v18.AllowFadeOutAfterClick(false); v18.addEventListener('click', mx.utils.Delegate.create(this, this.RetryBtnClick)); v2.AddItem(v18); this.Show(); }; v2.Show = function () { this.__pagesArray[0].FadeIn(); }; v2.Hide = function () { this.__pagesArray[0].FadeOut(); }; v2.Destroy = function () { this.RemoveUpdateListener(); this.__menuBkg.Destroy(); var v2; var v3; v3 = this.__pagesArray.length; v2 = 0; while (v2 < v3) { this.__pagesArray[v2].Destroy(); ++v2; } LayMan.RemoveClip(this.__maskClip); this.DestroyMusic(); LayMan.ResetMenuDepths(); }; v2.AddDesc = function (thisPage, SubTitle, Desc) { var v2; var v6; var v5; var v7; var v10; v6 = thisPage.getVacantRowX() + this.C_DEF_PADDING; v5 = thisPage.getVacantRowY(); v7 = this.C_DEF_PAGE_WIDTH; v10 = this.C_DEF_PAGE_HEIGHT; if (SubTitle != undefined && SubTitle != '') { var v3; v3 = new MenuButton(MenuButton.C_CLIP_BTN, '', v6, v5, v7 - 2 * this.C_DEF_PADDING, 30, MainMenu.C_BTN_FEATHER, 0, SubTitle, 0, true, gamemenu.ScoreMenu.C_DEPTH_TYPE, gamemenu.ScoreMenu.C_HINT_DEPTH_TYPE); v3.AllowFadeOutAfterClick(false); v3.SetLabelColor(Const.C_COLOR_ORANGE); v3.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v3.setAutoSize('center'); v3.SetMaxAlpha(100); thisPage.AddItem(v3); thisPage.incVacantRowY(this.C_DESC_FONT_SIZE + 5); v5 = thisPage.getVacantRowY(); } v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', v6, v5, v7 - 3 * this.C_DEF_PADDING, 50, MainMenu.C_BTN_FEATHER, 0, Desc, 0, true, gamemenu.ScoreMenu.C_DEPTH_TYPE, gamemenu.ScoreMenu.C_HINT_DEPTH_TYPE); v2.AllowFadeOutAfterClick(false); v2.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v2.setAutoSize('center'); v2.SetMaxAlpha(100); thisPage.AddItem(v2); var v8; v8 = v2.__txtField._height; thisPage.incVacantRowY(v8 + this.C_DEF_PADDING); }; v2.AddClipDesc = function (thisPage, SubTitle, clipName, clipMask, Desc) { var v8; var v6; var v10; var v15; v8 = thisPage.getVacantRowX() + this.C_DEF_PADDING; v6 = thisPage.getVacantRowY(); v10 = this.C_DEF_PAGE_WIDTH; v15 = this.C_DEF_PAGE_HEIGHT; if (SubTitle != undefined && SubTitle != '') { var v5; v5 = new MenuButton(MenuButton.C_CLIP_BTN, '', v8, v6, v10 - 2 * this.C_DEF_PADDING, 30, MainMenu.C_BTN_FEATHER, 0, SubTitle, 0, true, gamemenu.ScoreMenu.C_DEPTH_TYPE, gamemenu.ScoreMenu.C_HINT_DEPTH_TYPE); v5.AllowFadeOutAfterClick(false); v5.SetLabelColor(Const.C_COLOR_ORANGE); v5.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v5.setAutoSize('center'); v5.SetMaxAlpha(100); thisPage.AddItem(v5); thisPage.incVacantRowY(this.C_DESC_FONT_SIZE + this.C_DEF_PADDING); v6 = thisPage.getVacantRowY(); } var v12; v12 = v8 + gamemenu.components.RankDisplay.C_WIDTH / 2 - gamemenu.components.RankDisplay.C_CLIP_WIDTH / 2 - this.C_DEF_PADDING; var v3; v3 = new MenuButton(MenuButton.C_CLIP_BTN, clipName, v12, v6, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, gamemenu.ScoreMenu.C_DEPTH_TYPE, gamemenu.ScoreMenu.C_HINT_DEPTH_TYPE); v3.AllowFadeOutAfterClick(false); v3.SetMaxAlpha(100); v3.setIsSkinStatic(true); thisPage.AddItem(v3); var v9; var v7; v9 = this.getWidth(v3.__skin, clipMask); v7 = this.getHeight(v3.__skin, clipMask); var v2; v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', v8 + v9 + this.C_DEF_PADDING, v6, v10 - (v9 + 3 * this.C_DEF_PADDING), v7, MainMenu.C_BTN_FEATHER, 0, Desc, MainMenu.C_LARGE_FONT_BORDER, true, gamemenu.ScoreMenu.C_DEPTH_TYPE, gamemenu.ScoreMenu.C_HINT_DEPTH_TYPE); v2.AllowFadeOutAfterClick(false); v2.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v2.SetMaxAlpha(100); thisPage.AddItem(v2); var v11; v11 = v2.__txtField._height > v7 ? v2.__txtField._height : v7; thisPage.incVacantRowY(v11 + this.C_DEF_PADDING); }; v2.AddClipClipDesc = function (thisPage, SubTitle, clip1Name, clip1Mask, clip2Name, clip2Mask, Desc) { var v8; var v6; var v16; var v19; v8 = thisPage.getVacantRowX() + this.C_DEF_PADDING; v6 = thisPage.getVacantRowY(); v16 = this.C_DEF_PAGE_WIDTH; v19 = this.C_DEF_PAGE_HEIGHT; if (SubTitle != undefined && SubTitle != '') { var v5; v5 = new MenuButton(MenuButton.C_CLIP_BTN, '', v8, v6, v16 - 2 * this.C_DEF_PADDING, 30, MainMenu.C_BTN_FEATHER, 0, SubTitle, 0, true, gamemenu.ScoreMenu.C_DEPTH_TYPE, gamemenu.ScoreMenu.C_HINT_DEPTH_TYPE); v5.AllowFadeOutAfterClick(false); v5.SetLabelColor(Const.C_COLOR_ORANGE); v5.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v5.setAutoSize('center'); v5.SetMaxAlpha(100); thisPage.AddItem(v5); thisPage.incVacantRowY(this.C_DESC_FONT_SIZE + 5); v6 = thisPage.getVacantRowY(); } var v2; v2 = new MenuButton(MenuButton.C_CLIP_BTN, clip1Name, v8, v6, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, gamemenu.ScoreMenu.C_DEPTH_TYPE, gamemenu.ScoreMenu.C_HINT_DEPTH_TYPE); v2.AllowFadeOutAfterClick(false); v2.setIsSkinStatic(true); v2.SetMaxAlpha(100); thisPage.AddItem(v2); var v9; var v13; v9 = this.getWidth(v2.__skin, clip1Mask); v13 = this.getHeight(v2.__skin, clip1Mask); var v7; v7 = new MenuButton(MenuButton.C_CLIP_BTN, clip2Name, v8 + v9 + 2 * this.C_DEF_PADDING, v6, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, gamemenu.ScoreMenu.C_DEPTH_TYPE, gamemenu.ScoreMenu.C_HINT_DEPTH_TYPE); v7.AllowFadeOutAfterClick(false); v7.SetMaxAlpha(100); v7.setIsSkinStatic(true); thisPage.AddItem(v7); var v11; var v12; v11 = this.getWidth(v2.__skin, clip2Mask); v12 = this.getHeight(v2.__skin, clip2Mask); var v4; var v10; v10 = v13 > v12 ? v13 : v12; v4 = new MenuButton(MenuButton.C_CLIP_BTN, '', v8 + v9 + v11 + 3 * this.C_DEF_PADDING, v6, this.C_DEF_PAGE_WIDTH - (v9 + v11 + 5 * this.C_DEF_PADDING), v10, MainMenu.C_BTN_FEATHER, 0, Desc, MainMenu.C_LARGE_FONT_BORDER, true, gamemenu.ScoreMenu.C_DEPTH_TYPE, gamemenu.ScoreMenu.C_HINT_DEPTH_TYPE); v4.AllowFadeOutAfterClick(false); v4.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v4.SetMaxAlpha(100); thisPage.AddItem(v4); var v14; v14 = v10 > v4.__txtField._height ? v10 : v4.__txtField._height; thisPage.incVacantRowY(v14 + this.C_DEF_PADDING); }; v2.AddClipClipClipDesc = function (thisPage, SubTitle, clip1Name, clip1Mask, clip2Name, clip2Mask, clip3Name, clip3Mask, Desc) { var v10; var v8; var v19; var v23; v10 = thisPage.getVacantRowX() + this.C_DEF_PADDING; v8 = thisPage.getVacantRowY(); v19 = this.C_DEF_PAGE_WIDTH; v23 = this.C_DEF_PAGE_HEIGHT; if (SubTitle != undefined && SubTitle != '') { var v7; v7 = new MenuButton(MenuButton.C_CLIP_BTN, '', v10, v8, v19 - 2 * this.C_DEF_PADDING, 30, MainMenu.C_BTN_FEATHER, 0, SubTitle, 0, true, gamemenu.ScoreMenu.C_DEPTH_TYPE, gamemenu.ScoreMenu.C_HINT_DEPTH_TYPE); v7.AllowFadeOutAfterClick(false); v7.SetLabelColor(Const.C_COLOR_ORANGE); v7.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v7.setAutoSize('center'); v7.SetMaxAlpha(100); thisPage.AddItem(v7); thisPage.incVacantRowY(this.C_DESC_FONT_SIZE + 5); v8 = thisPage.getVacantRowY(); } var v6; v6 = new MenuButton(MenuButton.C_CLIP_BTN, clip1Name, v10, v8, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, gamemenu.ScoreMenu.C_DEPTH_TYPE, gamemenu.ScoreMenu.C_HINT_DEPTH_TYPE); v6.AllowFadeOutAfterClick(false); v6.SetMaxAlpha(100); v6.setIsSkinStatic(true); thisPage.AddItem(v6); var v11; var v16; v11 = this.getWidth(v6.__skin, clip1Mask); v16 = this.getHeight(v6.__skin, clip1Mask); var v5; v5 = new MenuButton(MenuButton.C_CLIP_BTN, clip2Name, v10 + v11 + 2 * this.C_DEF_PADDING, v8, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, gamemenu.ScoreMenu.C_DEPTH_TYPE, gamemenu.ScoreMenu.C_HINT_DEPTH_TYPE); v5.AllowFadeOutAfterClick(false); v5.SetMaxAlpha(100); v5.setIsSkinStatic(true); thisPage.AddItem(v5); var v12; var v15; v12 = this.getWidth(v5.__skin, clip2Mask); v15 = this.getHeight(v5.__skin, clip2Mask); var v4; v4 = new MenuButton(MenuButton.C_CLIP_BTN, clip3Name, v10 + v11 + v12 + 3 * this.C_DEF_PADDING, v8, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, gamemenu.ScoreMenu.C_DEPTH_TYPE, gamemenu.ScoreMenu.C_HINT_DEPTH_TYPE); v4.AllowFadeOutAfterClick(false); v4.SetMaxAlpha(100); v4.setIsSkinStatic(true); thisPage.AddItem(v4); var v13; var v14; v13 = this.getWidth(v4.__skin, clip3Mask); v14 = this.getHeight(v4.__skin, clip3Mask); var v3; var v9; v9 = v16 > v15 ? v16 : v15; v9 = v9 > v14 ? v9 : v14; v3 = new MenuButton(MenuButton.C_CLIP_BTN, '', v10 + v11 + v12 + v13 + 4 * this.C_DEF_PADDING, v8, this.C_DEF_PAGE_WIDTH - (v11 + v12 + v13 + 7 * this.C_DEF_PADDING), v9, MainMenu.C_BTN_FEATHER, 0, Desc, MainMenu.C_LARGE_FONT_BORDER, true, gamemenu.ScoreMenu.C_DEPTH_TYPE, gamemenu.ScoreMenu.C_HINT_DEPTH_TYPE); v3.AllowFadeOutAfterClick(false); v3.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v3.SetMaxAlpha(100); thisPage.AddItem(v3); var v17; v17 = v9 > v3.__txtField._height ? v9 : v3.__txtField._height; thisPage.incVacantRowY(v17 + this.C_DEF_PADDING); }; v2.CreateBlankPage = function (thisPage, pageTitle) { var v5; var v4; var v7; var v6; v5 = this.C_DEF_PAGE_POS_X; v4 = this.C_DEF_PAGE_POS_Y; v7 = this.C_DEF_PAGE_WIDTH; v6 = this.C_DEF_PAGE_HEIGHT; thisPage.setVacantRowX(v5 + this.C_DEF_PADDING); thisPage.setVacantRowY(v4); var v2; v2 = new MenuButton(MenuButton.C_RECT_BTN, '', v5, v4, v7, v6, MainMenu.C_BTN_FEATHER, 0, pageTitle, MainMenu.C_SMALL_FONT_BORDER, true, gamemenu.ScoreMenu.C_DEPTH_TYPE, gamemenu.ScoreMenu.C_HINT_DEPTH_TYPE); v2.SetLabelColor(Const.C_COLOR_ORANGE); v2.SetLabelFormat(this.C_TITLE_FONT_SIZE, false, 'left'); v2.AllowFadeOutAfterClick(false); thisPage.AddItem(v2); thisPage.incVacantRowY(this.C_TITLE_FONT_SIZE + this.C_DEF_PADDING + 5); }; v2.getWidth = function (mc, mask) { if (mask == undefined) { return mc._width; } else { return mask._width; } }; v2.getHeight = function (mc, mask) { if (mask == undefined) { return mc._height; } else { return mask._height; } }; v2.AddXClipDesc = function (thisPage, subtitle, args) { var v5; v5 = args.length; switch (v5) { case 1: this.AddDesc(thisPage, subtitle, args[0]); break; case 3: this.AddClipDesc(thisPage, subtitle, args[0], args[1], args[2]); break; case 5: this.AddClipClipDesc(thisPage, subtitle, args[0], args[1], args[2], args[3], args[4]); break; case 7: this.AddClipClipClipDesc(thisPage, subtitle, args[0], args[1], args[2], args[3], args[4], args[5], args[6]); } }; v2.ExitToShopOrOutro = function () { this.Hide(); var v3; v3 = this.__planeConfig.getPlaneType(); var v2; v2 = GameConfig.getGameEndType(); if (v2 == 0) { this.__parentGame.DoTransition(TransitionFader.C_SCORE_MENU, TransitionFader.C_SHOP_MENU); } if (v2 == -1) { this.__parentGame.DoTransition(TransitionFader.C_SCORE_MENU, TransitionFader.C_OUTRO); } if (v2 == -2) { this.__parentGame.DoTransition(TransitionFader.C_SCORE_MENU, TransitionFader.C_FOKKER_OUTRO); } }; v2.ExitFromScoreAndShowShop = function () { this.Hide(); this.__parentGame.DoTransition(TransitionFader.C_SCORE_MENU, TransitionFader.C_SHOP_MENU); }; v2.ExitFromScoreAndGotoMainMenu = function () { this.Hide(); this.__parentGame.DoTransition(TransitionFader.C_SCORE_MENU, TransitionFader.C_MAIN_MENU); }; v2.Render = function () { Timer.UpdateFrameCounter(); this.__menuBkg.Render(); var v2; v2 = 0; while (v2 < this.__scoreTablesCount) { this.__scoreTables[v2].Render(); ++v2; } FrameMan.Update(); this.__parentGame.UpdateFPSText(); }; v2.SaveStatsAndCash = function () {}; v2.getCumulativeCashBeforeRenderStart = function (winnerIdx) { var v2; var v4; v4 = this.__planeConfig.getCash(); var v3; v3 = this.__gameConfig.getScoreHolder(winnerIdx); var v5; v5 = v3.getScoreValue(enums.ScoreTypes.CURRENT_SCORE, enums.ScoreTypes.C_STAT_TYPE_CURRENT); v2 = v4 - v5; if (v2 >= 0) { v2 = v2; return v2; } v2 = 0; return v2; }; v2.UpdateOtherComponents = function (evtObj) { var v2; v2 = evtObj.subtotalValue; this.__curCashCounter.AddCash(v2); this.__totCashCounter.AddCash(v2); var v4; v4 = this.__scoreTables[enums.ScoreTypes.C_STAT_TYPE_TOTAL].getCurrentTotal(); this.__rankDisplay.Update(v4, this.__planeConfig); var v3; v3 = evtObj.scoreType; this.__medalList.Update(v3, this.__curCashCounter, this.__totCashCounter); if (v3 == enums.ScoreTypes.CURRENT_SCORE) { var v5; v5 = GameConfig.getGameEndType(); if (v5 < 0) { this.SubmitScoreClick(this); } } }; v2.getWinnerIdx = function () { var v6 = -1; var v5; var v3; var v4 = -1; var v2; v2 = 0; while (v2 < 4) { v5 = this.__gameConfig.getScoreHolder(v2); v3 = v5.getScoreValue(enums.ScoreTypes.CURRENT_SCORE, enums.ScoreTypes.C_STAT_TYPE_CURRENT); if (v3 > v4) { v6 = v2; v4 = v3; } ++v2; } return v6; }; v2.SubmitScoreClick = function (evtObj) { var v3; var v5; var v4; v4 = GameConfig.getGameType(); var v2; switch (v4) { case enums.GameTypes.MULTIPLAYER: var v8; v8 = this.getWinnerIdx(); v2 = this.__gameConfig.getScoreHolder(v8); v3 = v2.getScoreValue(enums.ScoreTypes.CURRENT_SCORE, enums.ScoreTypes.C_STAT_TYPE_CURRENT); break; case enums.GameTypes.SINGLE_LEVEL: v2 = this.__gameConfig.getScoreHolder(); v3 = v2.getScoreValue(enums.ScoreTypes.CURRENT_SCORE, enums.ScoreTypes.C_STAT_TYPE_CURRENT); v5 = GameConfig.getCurrentLevelId(); break; default: v2 = this.__gameConfig.getScoreHolder(); v3 = v2.getScoreValue(enums.ScoreTypes.CURRENT_SCORE, enums.ScoreTypes.C_STAT_TYPE_TOTAL); v5 = GameConfig.getCurrentLevelId(); } var v7 = GameConfig.__playerName; if (WebApi.isUserLoggedIn() && v4 == enums.GameTypes.INS_SINGLEPLAYER) { this.__scoreSubmNotification._visible = true; this.__scoreSubmNotification.gotoAndPlay('F_BEGIN'); WebApi.SaveScore(v4, v5, v3); } else { this.__guestScoreSubmitDlg = LayMan.RegisterClip('S_DLG_GUEST_SUBMIT_SCORE', gamemenu.ScoreMenu.C_DEPTH_TYPE); this.__guestScoreSubmitDlg._visible = true; this.__guestScoreSubmitBtn = new MenuButton(MenuButton.C_RECT_BTN, '', 340, 390, 120, 40, gamemenu.ScoreMenu.C_BTN_FEATHER, 0, 'Submit', gamemenu.ScoreMenu.C_LARGE_FONT_BORDER, false, gamemenu.ScoreMenu.C_DEPTH_TYPE, gamemenu.ScoreMenu.C_HINT_DEPTH_TYPE); this.__guestScoreSubmitBtn.SetMaxAlpha(100); var v6; v6 = this.__guestScoreSubmitDlg; v6.txtScoreVal = v3; v6.txtPlayerName.text = v7; this.__guestScoreSubmitBtn.addEventListener('click', DelegatePlus.create(this, this.SubmitGuestScore, v4, v5, v3)); this.__guestScoreSubmitBtn.FadeIn(); } }; v2.SubmitGuestScore = function (evtObj, gameType, levelId, scoreVal) { var v2; v2 = this.__guestScoreSubmitDlg.txtPlayerName.text; GameConfig.__playerName = v2; WebApi.SaveScore(gameType, levelId, scoreVal, v2); this.__scoreSubmNotification._visible = true; this.__scoreSubmNotification.gotoAndPlay('F_BEGIN'); this.__guestScoreSubmitDlg._visible = false; this.__guestScoreSubmitBtn.FadeOut(true); }; v2.MenuBtnClick = function (evtObj) { this.__parentGame.DoTransition(TransitionFader.C_SCORE_MENU, TransitionFader.C_MAIN_MENU); }; v2.RetryBtnClick = function (evtObj) { this.__parentGame.DoTransition(TransitionFader.C_SCORE_MENU, TransitionFader.C_WORLD); }; v2.InitMusic = function () { var v2; v2 = LayMan.RegisterEmptyClip(this.C_MUSIC_NAME, LayMan.C_S_MENU); this.__music = new Sound(v2); this.__music.attachSound(this.C_MUSIC_NAME); this.__gameConfig.addEventListener(GameConfig.EVT_TOGGLE_MUSIC, mx.utils.Delegate.create(this, this.ToggleMusic)); if (this.__gameConfig.isMusicEnabled()) { this.__music.start(0, 99999); } }; v2.DestroyMusic = function () { this.__music.stop(); delete this.__music; }; v2.ToggleMusic = function (evt) { if (evt.state == true) { this.__music.start(0, 99999); } else { this.__music.stop(); } }; v2.AddUpdateListener = function () { this.__updateClip = LayMan.RegisterEmptyClip('MainMenuUpdate', LayMan.C_S_MENU); this.__updateClip.onEnterFrame = mx.utils.Delegate.create(this, this.Render); }; v2.RemoveUpdateListener = function () { this.__updateClip.onEnterFrame = null; }; v2.AutoSubmitScoreAtEndOfCampaign = function () { var v2; v2 = GameConfig.getGameEndType(); if (v2 == -1 || v2 == -2) { this.SubmitScoreClick(undefined); } }; v2.RedirectToSponsorSite = function () { var v1; v1 = WebApi.getTrackingURL(WebApi.C_INGAME_SPONSOR_LOGO); getURL(v1, Const.C_SPONSOR_WEBSITE); }; v2.C_MUSIC_NAME = 'Falle-calpomat.wav'; v2.C_DEF_PAGE_POS_X = 12; v2.C_DEF_PAGE_POS_Y = 30; v2.C_DEF_PAGE_WIDTH = 776; v2.C_DEF_PAGE_HEIGHT = 565; v2.C_DEF_PADDING = 10; v2.C_BTN_FONT_SIZE = 18; v2.C_TITLE_FONT_SIZE = 20; v2.C_DESC_FONT_SIZE = 20; v1.C_BTN_FEATHER = MainMenu.C_BTN_FEATHER; v1.C_LARGE_FONT_BORDER = MainMenu.C_LARGE_FONT_BORDER; v1.C_SMALL_FONT_BORDER = MainMenu.C_SMALL_FONT_BORDER; v1.C_DEPTH_TYPE = LayMan.C_S_MENU; v1.C_HINT_DEPTH_TYPE = LayMan.C_S_MENU_HINTS; v2.C_CASH_PREFIX_CURRENT = 'Won:'; v2.C_CASH_HINT_CURRENT = 'Cash won in last mission. Medal rewards included.'; v2.C_CASH_PREFIX_OVERALL = 'Total:'; v2.C_CASH_HINT_OVERALL = 'Total cash available for byuing upgrades/weapons/devices. Medal rewards included.'; ASSetPropFlags(gamemenu.ScoreMenu.prototype, null, 1); } #endinitclip } movieClip 1719 __Packages.Timer { #initclip if (!_global.Timer) { var v1 = function (triggerTimeInterval) { this.__triggerTimeInterval = triggerTimeInterval; this.__startTime = 0; this.__currentTime = 0; this.__isTimerStartedBool = false; this.__isTimerStartedBoolOld = false; this.__framesNeededToTrigger = Math.round((triggerTimeInterval / 1000) * Timer.C_FPS); this.__frameWhenTimerStarted = 0; this.__frameOfChange = 0; }; _global.Timer = v1; var v2 = v1.prototype; v1.UpdateFrameCounter = function () { ++Timer.frameCounter; }; v1.SetFPS = function (framesPerSecond) { Timer.C_FPS = framesPerSecond; }; v2.SetTriggerTime = function (triggerTimeInterval) { this.__triggerTimeInterval = triggerTimeInterval; this.__framesNeededToTrigger = Math.round((triggerTimeInterval / 1000) * Timer.C_FPS); }; v2.StartTimer = function () { this.__frameWhenTimerStarted = Timer.frameCounter; this.__isTimerStartedBoolOld = false; this.__isTimerStartedBool = true; this.__frameOfChange = Timer.frameCounter; }; v2.UpdateTimer = function () {}; v2.TimeIntervalElapsed = function () { if (Timer.frameCounter - this.__frameWhenTimerStarted > this.__framesNeededToTrigger) { return true; } else { return false; } }; v2.GetElapsedTime = function () { return ((Timer.frameCounter - this.__frameWhenTimerStarted) / Timer.C_FPS) * 1000; }; v2.GetTimerRelativePosition = function () { var v2; v2 = (Timer.frameCounter - this.__frameWhenTimerStarted) / this.__framesNeededToTrigger; return v2; }; v2.StopTimer = function () { this.__isTimerStartedBoolOld = true; this.__isTimerStartedBool = false; this.__frameOfChange = Timer.frameCounter; }; v2.isTimerStarted = function () { return this.__isTimerStartedBool; }; v2.GetTimeFromBeginning = function () { if (!this.__isTimerStartedBool) { return 0; } return (Timer.frameCounter - this.__frameWhenTimerStarted) * (1 / Timer.C_FPS) * 1000; }; v2.isChangingToStarted = function () { if (this.__isTimerStartedBoolOld == false && this.__isTimerStartedBool == true && this.__frameOfChange == Timer.frameCounter) { return true; } else { return false; } }; v2.isChangingToStopped = function () { if (this.__isTimerStartedBoolOld == true && this.__isTimerStartedBool == false && this.__frameOfChange == Timer.frameCounter) { return true; } else { return false; } }; v1.C_FPS = 48; v1.frameCounter = 0; ASSetPropFlags(_global.Timer.prototype, null, 1); } #endinitclip } movieClip 1720 __Packages.ScoreHolder { #initclip if (!_global.ScoreHolder) { var v1 = function () { this.Init(); this.InitMedals(); }; _global.ScoreHolder = v1; var v2 = v1.prototype; v2.Init = function () { this.__scoreArray = new Array(); var v3; v3 = new Array(); var v2; v2 = 0; while (v2 < enums.ScoreTypes.ALL_COUNT) { v3[v2] = 0; ++v2; } this.__scoreArray.push(v3); v3 = new Array(); v2 = 0; while (v2 < enums.ScoreTypes.ALL_COUNT) { v3[v2] = 0; ++v2; } this.__scoreArray.push(v3); }; v2.ResetScoreStats = function (statType) { var v2; v2 = 0; while (v2 < enums.ScoreTypes.ALL_COUNT) { this.__scoreArray[statType][v2] = 0; ++v2; } if (statType == enums.ScoreTypes.C_STAT_TYPE_TOTAL) { var v3; v3 = this.__medalsArray.length; v2 = 0; while (v2 < v3) { this.setHaveMedal(v2, false); ++v2; } } }; v2.ResetAllStats = function () { this.ResetScoreStats(enums.ScoreTypes.C_STAT_TYPE_CURRENT); this.ResetScoreStats(enums.ScoreTypes.C_STAT_TYPE_TOTAL); }; v2.AddScore = function (scoreType, isNegativeAddition) { var v2; v2 = Number(enums.ScoreTypes.getScoreInfo(scoreType, enums.ScoreTypes.C_INFO_REWARD)); isNegativeAddition = (isNegativeAddition == undefined) ? false : isNegativeAddition; if (isNegativeAddition) { --this.__scoreArray[enums.ScoreTypes.C_STAT_TYPE_CURRENT][scoreType]; } else { ++this.__scoreArray[enums.ScoreTypes.C_STAT_TYPE_CURRENT][scoreType]; } if (v2 != -1) { this.AddToCumulative(v2, enums.ScoreTypes.C_STAT_TYPE_CURRENT, String('scoreType:' + scoreType)); } return v2; }; v2.AddValueToScore = function (scoreType, scoreStatType, value) { var v2; v2 = (scoreStatType == undefined) ? enums.ScoreTypes.C_STAT_TYPE_CURRENT : scoreStatType; this.__scoreArray[v2][scoreType] += value; }; v2.getScoreValue = function (scoreType, scoreStatType) { return this.__scoreArray[scoreStatType][scoreType]; }; v2.setScoreValue = function (scoreType, scoreStatType, value) { this.__scoreArray[scoreStatType][scoreType] = value; }; v2.getCashFromScore = function (scoreStatType) { return this.getScoreValue(enums.ScoreTypes.CURRENT_SCORE, scoreStatType); }; v2.ComputeAndSave = function () { this.ComputeCurrentScore(); this.ComputeOverallScore(); this.TraceAllScore(); }; v2.ComputeCurrentScore = function () { var v2 = enums.ScoreTypes.C_STAT_TYPE_CURRENT; var v4; var v8; var v5; v8 = this.__scoreArray[v2][enums.ScoreTypes.SHOTS_HIT]; v5 = this.__scoreArray[v2][enums.ScoreTypes.SHOTS_FIRED]; if (v5 == 0) { v4 = 0; } else { v4 = Math.round((v8 / v5) * 100); } this.__scoreArray[v2][enums.ScoreTypes.SHOOT_ACCURACY] = v4; var v3; var v7; var v6; v7 = this.__scoreArray[v2][enums.ScoreTypes.CUMUL_SURVIVAL_TIME_SEC]; v6 = this.__scoreArray[v2][enums.ScoreTypes.SURVIVAL_TIMER_STOPS]; if (v6 == 0) { v3 = 0; } else { v3 = Math.round(v7 / v6); } this.__scoreArray[v2][enums.ScoreTypes.AVG_SURVIVAL_TIME_SEC] = v3; this.RecomputeTotalScore(v2); }; v2.ComputeOverallScore = function () { var v2 = enums.ScoreTypes.C_STAT_TYPE_TOTAL; this.SyncNonadditiveScoreTypes(); this.SyncAdditiveScoreTypes(); this.SyncNonadditiveScoreTypes(); this.RecomputeTotalScore(v2); }; v2.SyncNonadditiveScoreTypes = function () { var v2 = enums.ScoreTypes.C_STAT_TYPE_TOTAL; if (this.__scoreArray[v2][enums.ScoreTypes.BEST_KILLS_IN_A_ROW] < this.__scoreArray[enums.ScoreTypes.C_STAT_TYPE_CURRENT][enums.ScoreTypes.BEST_KILLS_IN_A_ROW]) { this.__scoreArray[v2][enums.ScoreTypes.BEST_KILLS_IN_A_ROW] = this.__scoreArray[enums.ScoreTypes.C_STAT_TYPE_CURRENT][enums.ScoreTypes.BEST_KILLS_IN_A_ROW]; } var v7; var v8; var v3; v8 = this.__scoreArray[v2][enums.ScoreTypes.SHOTS_HIT]; v3 = this.__scoreArray[v2][enums.ScoreTypes.SHOTS_FIRED]; v3 = (v3 == 0) ? 1 : v3; v7 = Math.round((v8 / v3) * 100); this.__scoreArray[v2][enums.ScoreTypes.SHOOT_ACCURACY] = v7; var v4; var v6; var v5; v6 = this.__scoreArray[v2][enums.ScoreTypes.CUMUL_SURVIVAL_TIME_SEC]; v5 = this.__scoreArray[v2][enums.ScoreTypes.SURVIVAL_TIMER_STOPS]; if (v5 == 0) { v4 = 0; } else { v4 = Math.round(v6 / v5); } this.__scoreArray[v2][enums.ScoreTypes.AVG_SURVIVAL_TIME_SEC] = v4; }; v2.SyncAdditiveScoreTypes = function () { var v3 = enums.ScoreTypes.C_STAT_TYPE_TOTAL; var v2; v2 = 0; while (v2 < enums.ScoreTypes.ALL_COUNT) { if (v2 == enums.ScoreTypes.BEST_KILLS_IN_A_ROW || v2 == enums.ScoreTypes.AVG_SURVIVAL_TIME_SEC || v2 == enums.ScoreTypes.SHOOT_ACCURACY || v2 == enums.ScoreTypes.RANK || v2 == enums.ScoreTypes.CURRENT_SCORE) { } else { this.__scoreArray[v3][v2] += this.__scoreArray[enums.ScoreTypes.C_STAT_TYPE_CURRENT][v2]; } ++v2; } }; v2.RecomputeTotalScore = function (scoreStatType) { this.__scoreArray[scoreStatType][enums.ScoreTypes.CURRENT_SCORE] = 0; var v2; var v6; var v3; var v5; v2 = 0; while (v2 < enums.ScoreTypes.ALL_COUNT) { if (v2 == enums.ScoreTypes.RANK || v2 == enums.ScoreTypes.CURRENT_SCORE) { } else { v6 = Number(enums.ScoreTypes.getScoreInfo(v2, enums.ScoreTypes.C_INFO_REWARD)); v3 = this.__scoreArray[scoreStatType][v2]; v5 = v6 * v3; this.AddToCumulative(v5, scoreStatType); } ++v2; } }; v2.AddToCumulative = function (value, statType, debug) { statType = (statType == undefined) ? enums.ScoreTypes.C_STAT_TYPE_CURRENT : statType; if (value == undefined || value == NaN) { } this.__scoreArray[statType][enums.ScoreTypes.CURRENT_SCORE] += value; }; v2.TraceAllScore = function () { var v2; var v3; v3 = 0; while (v3 < 2) { v2 = 0; while (v2 < enums.ScoreTypes.ALL_COUNT) { var v5; v5 = String(enums.ScoreTypes.getScoreInfo(v2, enums.ScoreTypes.C_INFO_NAME)); var v4; v4 = Number(enums.ScoreTypes.getScoreInfo(v2, enums.ScoreTypes.C_INFO_REWARD)); var v6; v6 = this.__scoreArray[v3][v2]; ++v2; } ++v3; } }; v2.setRank = function (rank) { this.__scoreArray[enums.ScoreTypes.C_STAT_TYPE_CURRENT][enums.ScoreTypes.RANK] = rank; this.__scoreArray[enums.ScoreTypes.C_STAT_TYPE_TOTAL][enums.ScoreTypes.RANK] = rank; }; v2.getRank = function () { return this.__scoreArray[enums.ScoreTypes.C_STAT_TYPE_TOTAL][enums.ScoreTypes.RANK]; }; v2.InitMedals = function () { this.__medalsArray = new Array(); var v2; v2 = 0; while (v2 < enums.MedalTypes.COUNT) { this.__medalsArray.push(false); ++v2; } }; v2.getHaveMedal = function (medalId) { return this.__medalsArray[medalId]; }; v2.setHaveMedal = function (medalId, value) { value = (value == undefined) ? true : value; this.__medalsArray[medalId] = value; }; v2.saveScore = function (cookieObj) { cookieObj.data.cookieCreated = true; cookieObj.splice(); cookieObj.data.__scoreArray = new Array(); cookieObj.data.__scoreArray = this.__scoreArray.slice(); cookieObj.data.splice(); cookieObj.data.__medalsArray = new Array(); cookieObj.data.__medalsArray = this.__medalsArray.slice(); }; v2.loadScore = function (cookieObj) { if (!cookieObj.data.cookieCreated) { return undefined; } this.__scoreArray.splice(); this.__scoreArray = cookieObj.data.__scoreArray.slice(); this.__medalsArray.splice(); this.__medalsArray = cookieObj.data.__medalsArray.slice(); }; v2.showData = function (cookieObj) { var v2; var v1; var v4; v2 = 0; while (v2 < cookieObj.data.__scoreArray.length) { v4 = cookieObj.data.__scoreArray[v2]; v1 = 0; while (v1 < cookieObj.data.__scoreArray[v2].length) { ++v1; } ++v2; } }; ASSetPropFlags(_global.ScoreHolder.prototype, null, 1); } #endinitclip } movieClip 1721 __Packages.enums.ScoreTypes { #initclip if (!_global.enums) { _global.enums = new Object(); } if (!_global.enums.ScoreTypes) { var v1 = function () {}; enums.ScoreTypes = v1; var v2 = v1.prototype; v1.getScoreInfo = function (id, infoType) { return enums.ScoreTypes.ScoreInfoList[id][infoType]; }; v1.ALL_COUNT = 17; v1.KILLS = 0; v1.DOUBLE_KILLS = 1; v1.TRIPLE_KILLS = 2; v1.NONPLANE_KILLS = 3; v1.BUFFED_KILLS = 4; v1.BEST_KILLS_IN_A_ROW = 5; v1.AVG_SURVIVAL_TIME_SEC = 6; v1.SHOOT_ACCURACY = 7; v1.SAVED_LIVES = 8; v1.TIME_LEFT = 9; v1.CURRENT_SCORE = 10; v1.RANK = 11; v1.CURR_KILLS_IN_A_ROW = 12; v1.CUMUL_SURVIVAL_TIME_SEC = 13; v1.SHOTS_HIT = 14; v1.SHOTS_FIRED = 15; v1.SURVIVAL_TIMER_STOPS = 16; v1.C_INFO_NAME = 0; v1.C_INFO_REWARD = 1; v1.C_INFO_LABEL_MSG = 2; v1.C_INFO_HINT = 3; v1.C_STAT_TYPE_CURRENT = 0; v1.C_STAT_TYPE_TOTAL = 1; v1.ScoreInfoList = [['Kills', 150, 'Kill', 'Number of planes shot down'], ['Double kills', 300, 'Double kill!', 'Number of double kills - 2 planes shot down within a specified time limit'], ['Triple kills', 600, 'Triple kill!', 'Number of triple kills - 3 planes shot down within a specified time limit'], ['Non-plane kills', 50, '', 'Number of non-plane objects shot down - baloons, targets, airships etc.'], ['Buffed kills', 100, 'Buffed kill!', 'Number of planes shot down by using bonus advantage - gun berserk, afterburner, screwcutter'], ['Kills in a row', 100, '', 'Number of planes shot down in a row without losing own life'], ['Avg life time', 2, '', 'Average number of seconds you have survived in the air'], ['Shoot accuracy', 2, '', 'Shoot accuracy in percents'], ['Saved lives', 120, '', 'Number of own lives saved at the end of the level'], ['Time left', 2, '', 'Number of seconds left at the end of the level'], ['Total score', -1, '', 'Sum of all score rows above'], ['Rank', 100, '', 'Own rank that depends on overall score for all levels'], ['Current kills in a row', 0, '', ''], ['Seconds in the air cumul', 0, '', ''], ['Shots hit', 0, '', ''], ['Shots fired', 0, '', ''], ['Survival timer stops', 0, '', '']]; v1.ScoreOrderList = [enums.ScoreTypes.KILLS, enums.ScoreTypes.DOUBLE_KILLS, enums.ScoreTypes.TRIPLE_KILLS, enums.ScoreTypes.NONPLANE_KILLS, enums.ScoreTypes.BUFFED_KILLS, enums.ScoreTypes.BEST_KILLS_IN_A_ROW, enums.ScoreTypes.SHOOT_ACCURACY, enums.ScoreTypes.AVG_SURVIVAL_TIME_SEC, enums.ScoreTypes.SAVED_LIVES, enums.ScoreTypes.TIME_LEFT, enums.ScoreTypes.CURRENT_SCORE]; ASSetPropFlags(enums.ScoreTypes.prototype, null, 1); } #endinitclip } movieClip 1722 __Packages.enums.MedalTypes { #initclip if (!_global.enums) { _global.enums = new Object(); } if (!_global.enums.MedalTypes) { var v1 = function () {}; enums.MedalTypes = v1; var v2 = v1.prototype; v1.getInfo = function (id, infoType) { return enums.MedalTypes.MedalList[id][infoType]; }; v1.isMedalAcquired = function (medalId, scoreHolder) { var v6; var v3; var v5; var v4; var v2 = true; var v1; var v7; v7 = enums.MedalTypes.MedalGetConditions.length; v1 = 0; while (v1 < v7) { v6 = enums.MedalTypes.MedalGetConditions[v1][0]; if (v6 != medalId) { } else { v3 = enums.MedalTypes.MedalGetConditions[v1][1]; v5 = enums.MedalTypes.MedalGetConditions[v1][2]; v4 = scoreHolder.getScoreValue(v3, enums.ScoreTypes.C_STAT_TYPE_TOTAL); if (v4 >= v5) { v2 = true; } else { v2 = false; } if (v2 == false) { return false; } } ++v1; } return v2; }; v1.COUNT = 10; v1.BALOON_BUSTER = 0; v1.SHARPSHOOTER = 1; v1.DISTINGUISHED_SHARPSHOOTER = 2; v1.LORD_OF_THE_SKIES = 3; v1.SURVIVOR = 4; v1.DISTINGUISHED_SURVIVOR = 5; v1.AVIATOR = 6; v1.DISTINGUISHED_AVIATOR = 7; v1.ACE = 8; v1.ACE_OF_ACES = 9; v1.C_INFO_NAME = 0; v1.C_INFO_REWARD = 1; v1.C_INFO_CLIP_HAVE = 2; v1.C_INFO_CLIP_BLANK = 3; v1.C_INFO_HINT = 4; v1.MedalList = [['Baloon Buster', 700, 'S_MEDAL_01', 'S_MEDAL_01_SILHOUETTE', ''], ['Sharpshooter', 1000, 'S_MEDAL_02', 'S_MEDAL_02_SILHOUETTE', ''], ['Distinguished sharpshooter', 2500, 'S_MEDAL_03', 'S_MEDAL_03_SILHOUETTE', ''], ['Lord of the skies', 2500, 'S_MEDAL_04', 'S_MEDAL_04_SILHOUETTE', ''], ['Survivor', 1000, 'S_MEDAL_05', 'S_MEDAL_05_SILHOUETTE', ''], ['Distinguished survivor', 3000, 'S_MEDAL_06', 'S_MEDAL_06_SILHOUETTE', ''], ['Aviator', 2000, 'S_MEDAL_07', 'S_MEDAL_07_SILHOUETTE', ''], ['Distinguished aviator', 5000, 'S_MEDAL_08', 'S_MEDAL_08_SILHOUETTE', ''], ['Ace', 4000, 'S_MEDAL_09', 'S_MEDAL_09_SILHOUETTE', ''], ['Ace of aces', 10000, 'S_MEDAL_10', 'S_MEDAL_10_SILHOUETTE', '']]; v1.MedalGetConditions = [[enums.MedalTypes.BALOON_BUSTER, enums.ScoreTypes.NONPLANE_KILLS, 7], [enums.MedalTypes.BALOON_BUSTER, enums.ScoreTypes.RANK, 2], [enums.MedalTypes.SHARPSHOOTER, enums.ScoreTypes.SHOOT_ACCURACY, 45], [enums.MedalTypes.SHARPSHOOTER, enums.ScoreTypes.RANK, 3], [enums.MedalTypes.DISTINGUISHED_SHARPSHOOTER, enums.ScoreTypes.SHOOT_ACCURACY, 55], [enums.MedalTypes.DISTINGUISHED_SHARPSHOOTER, enums.ScoreTypes.RANK, 4], [enums.MedalTypes.LORD_OF_THE_SKIES, enums.ScoreTypes.KILLS, 20], [enums.MedalTypes.LORD_OF_THE_SKIES, enums.ScoreTypes.NONPLANE_KILLS, 10], [enums.MedalTypes.LORD_OF_THE_SKIES, enums.ScoreTypes.BUFFED_KILLS, 3], [enums.MedalTypes.LORD_OF_THE_SKIES, enums.ScoreTypes.DOUBLE_KILLS, 3], [enums.MedalTypes.LORD_OF_THE_SKIES, enums.ScoreTypes.TRIPLE_KILLS, 1], [enums.MedalTypes.LORD_OF_THE_SKIES, enums.ScoreTypes.RANK, 6], [enums.MedalTypes.SURVIVOR, enums.ScoreTypes.AVG_SURVIVAL_TIME_SEC, 20], [enums.MedalTypes.SURVIVOR, enums.ScoreTypes.SAVED_LIVES, 15], [enums.MedalTypes.SURVIVOR, enums.ScoreTypes.RANK, 5], [enums.MedalTypes.DISTINGUISHED_SURVIVOR, enums.ScoreTypes.AVG_SURVIVAL_TIME_SEC, 25], [enums.MedalTypes.DISTINGUISHED_SURVIVOR, enums.ScoreTypes.SAVED_LIVES, 50], [enums.MedalTypes.DISTINGUISHED_SURVIVOR, enums.ScoreTypes.RANK, 6], [enums.MedalTypes.AVIATOR, enums.ScoreTypes.KILLS, 30], [enums.MedalTypes.AVIATOR, enums.ScoreTypes.BEST_KILLS_IN_A_ROW, 5], [enums.MedalTypes.AVIATOR, enums.ScoreTypes.SHOOT_ACCURACY, 30], [enums.MedalTypes.AVIATOR, enums.ScoreTypes.RANK, 5], [enums.MedalTypes.DISTINGUISHED_AVIATOR, enums.ScoreTypes.KILLS, 50], [enums.MedalTypes.DISTINGUISHED_AVIATOR, enums.ScoreTypes.BEST_KILLS_IN_A_ROW, 8], [enums.MedalTypes.DISTINGUISHED_AVIATOR, enums.ScoreTypes.SHOOT_ACCURACY, 30], [enums.MedalTypes.DISTINGUISHED_AVIATOR, enums.ScoreTypes.RANK, 7], [enums.MedalTypes.ACE, enums.ScoreTypes.KILLS, 60], [enums.MedalTypes.ACE, enums.ScoreTypes.NONPLANE_KILLS, 20], [enums.MedalTypes.ACE, enums.ScoreTypes.DOUBLE_KILLS, 10], [enums.MedalTypes.ACE, enums.ScoreTypes.DOUBLE_KILLS, 6], [enums.MedalTypes.ACE, enums.ScoreTypes.TRIPLE_KILLS, 1], [enums.MedalTypes.ACE_OF_ACES, enums.ScoreTypes.KILLS, 81], [enums.MedalTypes.ACE_OF_ACES, enums.ScoreTypes.NONPLANE_KILLS, 30], [enums.MedalTypes.ACE_OF_ACES, enums.ScoreTypes.DOUBLE_KILLS, 20], [enums.MedalTypes.ACE_OF_ACES, enums.ScoreTypes.TRIPLE_KILLS, 10], [enums.MedalTypes.ACE_OF_ACES, enums.ScoreTypes.RANK, 9]]; ASSetPropFlags(enums.MedalTypes.prototype, null, 1); } #endinitclip } movieClip 1723 __Packages.gamemenu.components.MedalList { #initclip if (!_global.gamemenu) { _global.gamemenu = new Object(); } if (!_global.gamemenu.components) { _global.gamemenu.components = new Object(); } if (!_global.gamemenu.components.MedalList) { var v1 = function (x, y, scoreHolder, planeConfig) { this.__x = x; this.__y = y; this.__scoreHolder = scoreHolder; this.__planeConfig = planeConfig; this.__medalListClipArray = new Array(); this.CreateMedalList(); }; gamemenu.components.MedalList = v1; var v2 = v1.prototype; v2.CreateMedalList = function () { var v5; var v7; v5 = this.__x + this.C_X_OFFSET; v7 = this.__y + this.C_Y_OFFSET; var v4; var v2; var v8; var v9; var v6; var v3; v3 = 0; while (v3 < enums.MedalTypes.COUNT) { v8 = enums.MedalTypes.getInfo(v3, enums.MedalTypes.C_INFO_CLIP_BLANK); v9 = enums.MedalTypes.getInfo(v3, enums.MedalTypes.C_INFO_CLIP_HAVE); v4 = new MenuButton(MenuButton.C_CLIP_BTN, v8, v5, v7, 0, 0, this.C_BTN_FEATHER, 0, '', 0, false, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v6 = this.getHint(v3); v4.SetHint(v6); v4.SetMaxAlpha(100); v4.AllowFadeOutAfterClick(false); v2 = new MenuButton(MenuButton.C_CLIP_BTN, v9, v5, v7, 0, 0, this.C_BTN_FEATHER, 0, '', 0, false, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v2.SetHint(v6); v2.AllowFadeOutAfterClick(false); v2.SetMaxAlpha(100); this.__medalListClipArray.push([v4, v2]); v5 += v2.__skin._width - 1 * this.PAD; ++v3; } }; v2.getHint = function (medalId) { var v9; var v8; var v10; var v3 = ''; v8 = String(enums.MedalTypes.getInfo(medalId, enums.MedalTypes.C_INFO_NAME)); v10 = String(enums.MedalTypes.getInfo(medalId, enums.MedalTypes.C_INFO_REWARD)); var v1; var v6; var v4; var v5; var v2; v6 = enums.MedalTypes.MedalGetConditions.length; v1 = 0; while (v1 < v6) { if (enums.MedalTypes.MedalGetConditions[v1][0] == medalId) { v2 = Number(enums.MedalTypes.MedalGetConditions[v1][1]); v4 = String(enums.ScoreTypes.getScoreInfo(v2, enums.ScoreTypes.C_INFO_NAME)); v5 = gamemenu.components.ScoreTable.getScorePostfix(v2); v3 = v3 + ' - ' + v4 + ' at least ' + String(enums.MedalTypes.MedalGetConditions[v1][2]) + v5 + '\n'; } ++v1; } v9 = 'Medal: ' + v8 + '\n' + 'Reward:' + v10 + '$\n' + 'Requires:\n' + v3; return v9; }; v2.FadeIn = function () { var v2; v2 = 0; while (v2 < enums.MedalTypes.COUNT) { if (this.__scoreHolder.getHaveMedal(v2)) { this.__medalListClipArray[v2][1].FadeIn(); } else { this.__medalListClipArray[v2][0].FadeIn(); } ++v2; } }; v2.FadeOut = function (destroyAfterFadeOut) { var v2; v2 = 0; while (v2 < enums.MedalTypes.COUNT) { if (this.__scoreHolder.getHaveMedal(v2)) { this.__medalListClipArray[v2][1].FadeOut(destroyAfterFadeOut); } else { this.__medalListClipArray[v2][0].FadeOut(destroyAfterFadeOut); } ++v2; } }; v2.Destroy = function () { var v2; v2 = 0; while (v2 < enums.MedalTypes.COUNT) { LayMan.RemoveClip(this.__medalListClipArray[v2][0]); LayMan.RemoveClip(this.__medalListClipArray[v2][1]); ++v2; } }; v2.Update = function (scoreType, curCashCounter, totCashCounter) { if (scoreType != enums.ScoreTypes.TIME_LEFT) { return undefined; } var v2; var v4; v2 = 0; while (v2 < enums.MedalTypes.COUNT) { if (this.__scoreHolder.getHaveMedal(v2)) { } else { if (!this.__scoreHolder.getHaveMedal(v2)) { v4 = enums.MedalTypes.isMedalAcquired(v2, this.__scoreHolder); if (v4) { this.__medalListClipArray[v2][0].FadeOut(); this.__medalListClipArray[v2][1].FadeIn(); WebApi.UnlockAchievement(WebApi.C_ACH_TYPE_MEDAL_GET, v2); this.__scoreHolder.setHaveMedal(v2); var v3; v3 = Number(enums.MedalTypes.getInfo(v2, enums.MedalTypes.C_INFO_REWARD)); this.__planeConfig.AddCash(v3); curCashCounter.AddCash(v3); totCashCounter.AddCash(v3); } } } ++v2; } var v7; v7 = this.getCountOfMedalsEarned(); WebApi.AddStat(WebApi.C_NUMBER_OF_MEDALS_EARNED, v7); }; v2.getCountOfMedalsEarned = function () { var v2; var v3 = 0; v2 = 0; while (v2 < enums.MedalTypes.COUNT) { if (this.__scoreHolder.getHaveMedal(v2)) { ++v3; } ++v2; } return v3; }; v1.C_CLIP_WIDTH = 100; v1.C_WIDTH = 200; v2.C_FONT_SIZE = 20; v2.C_BTN_FEATHER = 10; v2.PAD = 5; v2.C_X_OFFSET = 15; v2.C_Y_OFFSET = 35; v2.C_DEPTH_TYPE = LayMan.C_S_MENU; v2.C_HINT_DEPTH_TYPE = LayMan.C_S_MENU_HINTS; ASSetPropFlags(gamemenu.components.MedalList.prototype, null, 1); } #endinitclip } movieClip 1724 __Packages.gamemenu.components.ScoreTable { #initclip if (!_global.gamemenu) { _global.gamemenu = new Object(); } if (!_global.gamemenu.components) { _global.gamemenu.components = new Object(); } if (!_global.gamemenu.components.ScoreTable) { var v1 = function (xpos, ypos, tableType, parentGame, tableWidth, planeIdx) { if (tableWidth != undefined && gamemenu.components.ScoreTable.C_WIDTH > tableWidth) { this.C_DESC_FONT_SIZE -= 4; } this.__width = (tableWidth == undefined) ? gamemenu.components.ScoreTable.C_WIDTH : tableWidth; mx.events.EventDispatcher.initialize(this); this.__x = xpos; this.__y = ypos; this.__parentGame = parentGame; this.__gameConf = this.__parentGame.getGameConfig(); this.__scoreHolder = this.__gameConf.getScoreHolder(planeIdx); this.__showedTotalScoreValue = 0; var v5; v5 = new MenuPage('Briefing', null); this.__page = v5; var v4; var v6; switch (tableType) { case gamemenu.components.ScoreTable.C_TYPE_CURRENT: v4 = this.C_TITLE_CURRENT; v6 = this.C_HINT_CURRENT; this.__scoreStatType = enums.ScoreTypes.C_STAT_TYPE_CURRENT; break; case gamemenu.components.ScoreTable.C_TYPE_OVERALL: v4 = this.C_TITLE_OVERALL; v6 = this.C_HINT_OVERALL; this.__scoreStatType = enums.ScoreTypes.C_STAT_TYPE_TOTAL; } gamemenu.components.ScoreTable.C_HEIGHT = 3 * this.C_DEF_PADDING + this.C_TITLE_FONT_SIZE + (this.C_DESC_FONT_SIZE + this.C_PAD_BETWEEN_STATS) * enums.ScoreTypes.ScoreOrderList.length; var v2; v2 = new MenuButton(MenuButton.C_RECT_BTN, '', this.__x, this.__y, this.__width, gamemenu.components.ScoreTable.C_HEIGHT, gamemenu.components.ScoreTable.C_BTN_FEATHER, 0, v4, gamemenu.components.ScoreTable.C_10_PAD_FONT_BORDER, true, gamemenu.components.ScoreTable.C_DEPTH_TYPE, gamemenu.components.ScoreTable.C_HINT_DEPTH_TYPE); v2.SetLabelColor(Const.C_COLOR_ORANGE); v2.SetLabelFormat(this.C_TITLE_FONT_SIZE, false, 'center'); v2.AllowFadeOutAfterClick(false); v2.SetMaxAlpha(80); v2.addEventListener(MenuButton.EVT_ACTIVE, mx.utils.Delegate.create(this, this.StartFadeInTimer)); v5.AddItem(v2); this.CreateBStatsArray(); this.__statFadeInTimer = new Timer(this.C_STAT_FADE_IN_INTERVAL); }; gamemenu.components.ScoreTable = v1; var v2 = v1.prototype; v2.CreateBStatsArray = function () { this.__bStatsArray = new Array(); var v19; v19 = this.__page; var v12; var v11; v12 = this.__x + this.C_DEF_PADDING; v11 = this.__y + 2 * this.C_DEF_PADDING + this.C_TITLE_FONT_SIZE; var v13; var v16; v13 = this.__width - 2 * this.C_DEF_PADDING; v16 = this.C_DESC_FONT_SIZE; var v9; var v4; var v17; var v2; var v8; var v18 = enums.ScoreTypes.ScoreOrderList.length; var v14; v9 = 0; while (v9 < v18) { v2 = enums.ScoreTypes.ScoreOrderList[v9]; if (v2 == enums.ScoreTypes.CURRENT_SCORE) { v8 = Const.C_COLOR_ORANGE; v14 = this.C_DESC_FONT_SIZE + 2; this.__totalScoreIdx = v9; } else { v8 = Const.C_COLOR_WHITE; v14 = this.C_DESC_FONT_SIZE; } v4 = String(enums.ScoreTypes.getScoreInfo(v2, enums.ScoreTypes.C_INFO_NAME)); v17 = String(enums.ScoreTypes.getScoreInfo(v2, enums.ScoreTypes.C_INFO_HINT)); var v3; v3 = new MenuButton(MenuButton.C_RECT_BTN, '', v12, v11, v13 - this.C_DEF_PADDING, this.C_DESC_FONT_SIZE + 6, 0, 0, v4, gamemenu.components.ScoreTable.C_ZERO_FONT_BORDER, false, gamemenu.components.ScoreTable.C_DEPTH_TYPE, gamemenu.components.ScoreTable.C_HINT_DEPTH_TYPE); v3.SetLabelColor(v8); v3.SetLabelFormat(v14, false, 'left'); v3.SetHint(v17); v3.AllowFadeOutAfterClick(false); var v10; if (v2 == enums.ScoreTypes.CURRENT_SCORE) { v10 = 0; v4 = ''; } else { v10 = Number(enums.ScoreTypes.getScoreInfo(v2, enums.ScoreTypes.C_INFO_REWARD)); v4 = String(v10) + ' x'; } var v6; v6 = new MenuButton(MenuButton.C_CLIP_BTN, '', v12, v11, v13 - 50, v16, 0, 0, v4, gamemenu.components.ScoreTable.C_ZERO_FONT_BORDER, true, gamemenu.components.ScoreTable.C_DEPTH_TYPE, gamemenu.components.ScoreTable.C_HINT_DEPTH_TYPE); v6.SetLabelColor(v8); v6.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'right'); v6.AllowFadeOutAfterClick(false); var v5; if (v2 == enums.ScoreTypes.CURRENT_SCORE) { if (this.__scoreStatType == enums.ScoreTypes.C_STAT_TYPE_CURRENT) { v5 = 0; } if (this.__scoreStatType == enums.ScoreTypes.C_STAT_TYPE_TOTAL) { v5 = 0; } this.__showedTotalScoreValue = v5; } else { v5 = Number(this.__scoreHolder.getScoreValue(v2, this.__scoreStatType)); } var v15; v15 = gamemenu.components.ScoreTable.getScorePostfix(v2); v4 = String(v5) + v15; var v7; v7 = new MenuButton(MenuButton.C_CLIP_BTN, '', v12, v11, v13, v16, 0, 0, v4, gamemenu.components.ScoreTable.C_ZERO_FONT_BORDER, true, gamemenu.components.ScoreTable.C_DEPTH_TYPE, gamemenu.components.ScoreTable.C_HINT_DEPTH_TYPE); v7.SetLabelColor(v8); v7.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'right'); v7.AllowFadeOutAfterClick(false); this.__bStatsArray.push([v3, v6, v7]); if (v2 != enums.ScoreTypes.CURRENT_SCORE) { v3.addEventListener(MenuButton.EVT_ACTIVE, DelegatePlus.create(this, this.DispatchShowScoreStat, v5, v10, v2)); } v11 += this.C_PAD_BETWEEN_STATS + this.C_DESC_FONT_SIZE; ++v9; } this.__bStatsCount = this.__bStatsArray.length; this.__bSubStatsCount = 3; this.__statsFadedInIdx = 0; }; v2.FadeIn = function () { this.__page.FadeIn(); this.__bStatsArray[this.__totalScoreIdx].FadeIn(); var v2; v2 = 0; while (v2 < this.__bSubStatsCount) { this.__bStatsArray[this.__totalScoreIdx][v2].FadeIn(); ++v2; } }; v2.FadeOut = function (destroyAfterFadeout) { this.__page.FadeOut(destroyAfterFadeout); var v3; var v2; v3 = 0; while (v3 < this.__bStatsCount) { v2 = 0; while (v2 < this.__bSubStatsCount) { this.__bStatsArray[v3][v2].FadeOut(destroyAfterFadeout); ++v2; } ++v3; } }; v2.Destroy = function () { this.__page.Destroy(); var v3; var v2; v3 = 0; while (v3 < this.__bStatsCount) { v2 = 0; while (v2 < this.__bSubStatsCount) { this.__bStatsArray[v3][v2].Destroy(); ++v2; } ++v3; } }; v2.getHeight = function () { return gamemenu.components.ScoreTable.C_HEIGHT; }; v2.Render = function () { if (this.__statsFadedInIdx >= this.__bStatsCount) { return undefined; } if (this.__statFadeInTimer.isTimerStarted() && this.__statFadeInTimer.TimeIntervalElapsed()) { var v2; v2 = 0; while (v2 < this.__bSubStatsCount) { this.__bStatsArray[this.__statsFadedInIdx][v2].FadeIn(); ++v2; } ++this.__statsFadedInIdx; this.__statFadeInTimer.StopTimer(); this.__statFadeInTimer.StartTimer(); } }; v2.StartFadeInTimer = function (evtObj) { this.__statFadeInTimer.StartTimer(); }; v2.DispatchShowScoreStat = function (evtObj, scoreValue, rew, scoretype) { var v2; v2 = scoreValue * rew; this.UpdateTotalScore(v2); this.dispatchEvent({'target': this, 'type': gamemenu.components.ScoreTable.EVT_SHOWED_SCORE_STAT, 'subtotalValue': v2, 'scoreType': scoretype}); }; v2.UpdateTotalScore = function (subTotal) { this.__showedTotalScoreValue += subTotal; this.__bStatsArray[this.__totalScoreIdx][2].SetLabel(String(this.__showedTotalScoreValue)); }; v2.getCurrentTotal = function () { return this.__showedTotalScoreValue; }; v1.getScorePostfix = function (scoreId) { var v1; switch (scoreId) { case enums.ScoreTypes.AVG_SURVIVAL_TIME_SEC: v1 = 's'; return v1; case enums.ScoreTypes.TIME_LEFT: v1 = 's'; return v1; case enums.ScoreTypes.SHOOT_ACCURACY: v1 = '%'; return v1; } v1 = ''; return v1; }; v1.EVT_SHOWED_SCORE_STAT = 'showed_score_stat'; v1.C_TYPE_CURRENT = enums.ScoreTypes.C_STAT_TYPE_CURRENT; v1.C_TYPE_OVERALL = enums.ScoreTypes.C_STAT_TYPE_TOTAL; v1.C_WIDTH = 250; v1.C_HEIGHT = 400; v2.__width = gamemenu.components.ScoreTable.C_WIDTH; v2.__height = gamemenu.components.ScoreTable.C_HEIGHT; v2.C_TITLE_CURRENT = 'Last round score'; v2.C_HINT_CURRENT = 'Score achieved in the last mission'; v2.C_TITLE_OVERALL = 'Campaign score'; v2.C_HINT_OVERALL = 'Score achieved for campaign'; v2.C_PAD_BETWEEN_STATS = 5; v2.C_DEF_PADDING = 10; v2.C_BTN_FONT_SIZE = 18; v2.C_TITLE_FONT_SIZE = 20; v2.C_DESC_FONT_SIZE = 16; v1.C_BTN_FEATHER = 10; v1.C_ZERO_FONT_BORDER = 0; v1.C_10_PAD_FONT_BORDER = 10; v1.C_DEPTH_TYPE = LayMan.C_S_MENU; v1.C_HINT_DEPTH_TYPE = LayMan.C_S_MENU_HINTS; v2.C_STAT_FADE_IN_INTERVAL = 150; ASSetPropFlags(gamemenu.components.ScoreTable.prototype, null, 1); } #endinitclip } movieClip 1725 __Packages.gamemenu.components.RankDisplay { #initclip if (!_global.gamemenu) { _global.gamemenu = new Object(); } if (!_global.gamemenu.components) { _global.gamemenu.components = new Object(); } if (!_global.gamemenu.components.RankDisplay) { var v1 = function (x, y, scoreHolder) { this.__x = x + 20; this.__y = y; this.__scoreHolder = scoreHolder; this.__curRank = this.__scoreHolder.getRank(); this.__rankNameBtnArray = new Array(); this.__rankClipBtnArray = new Array(); var v2; var v3; var v6; var v7; v3 = 0; while (v3 < enums.RankTypes.COUNT) { x = this.__x; y = this.__y; v6 = String(enums.RankTypes.getRankInfo(v3, enums.RankTypes.C_INFO_NAME)); v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', x, y, gamemenu.components.RankDisplay.C_WIDTH, this.C_FONT_SIZE, this.C_BTN_FEATHER, 0, v6, 0, true, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v2.SetLabelFormat(this.C_RANK_NAME_FONT_SIZE, false, 'center'); v2.SetMaxAlpha(100); this.__rankNameBtnArray.push(v2); x = this.__x + gamemenu.components.RankDisplay.C_WIDTH / 2 - gamemenu.components.RankDisplay.C_CLIP_WIDTH / 2; y = this.__y + this.C_RANK_NAME_FONT_SIZE + 15; v7 = String(enums.RankTypes.getRankInfo(v3, enums.RankTypes.C_INFO_CLIP_NAME)); v2 = new MenuButton(MenuButton.C_CLIP_BTN, v7, x, y, gamemenu.components.RankDisplay.C_WIDTH, this.C_FONT_SIZE, this.C_BTN_FEATHER, 0, '', 0, false, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v2.SetMaxAlpha(100); v2.SetHint(v6); v2.AllowFadeOutAfterClick(false); this.__rankClipBtnArray.push(v2); this.__rankClipBtnArray.SetMaxAlpha(100); ++v3; } }; gamemenu.components.RankDisplay = v1; var v2 = v1.prototype; v2.FadeIn = function () { this.__rankNameBtnArray[this.__curRank].FadeIn(); this.__rankClipBtnArray[this.__curRank].FadeIn(); }; v2.FadeOut = function (destroyAfterFadeOut) { this.__rankNameBtnArray[this.__curRank].FadeOut(destroyAfterFadeOut); this.__rankClipBtnArray[this.__curRank].FadeOut(destroyAfterFadeOut); }; v2.Destroy = function () { var v2; v2 = 0; while (v2 < enums.RankTypes.COUNT) { this.__rankNameBtnArray[this.__curRank].DestroyBtn(); this.__rankClipBtnArray[this.__curRank].DestroyBtn(); ++v2; } }; v2.Update = function (score) { var v2; v2 = enums.RankTypes.getRankFromScore(score); if (v2 > this.__curRank) { this.FadeOut(); this.__curRank = v2; this.__scoreHolder.setRank(this.__curRank); WebApi.UnlockAchievement(WebApi.C_ACH_TYPE_RANK_PROMOTION, this.__curRank); this.FadeIn(); } }; v1.C_CLIP_WIDTH = 100; v1.C_WIDTH = 200; v2.C_FONT_SIZE = 20; v2.C_RANK_NAME_FONT_SIZE = 15; v2.C_BTN_FEATHER = 10; v2.PAD = 15; v2.C_DEPTH_TYPE = LayMan.C_S_MENU; v2.C_HINT_DEPTH_TYPE = LayMan.C_S_MENU_HINTS; ASSetPropFlags(gamemenu.components.RankDisplay.prototype, null, 1); } #endinitclip } movieClip 1726 __Packages.enums.RankTypes { #initclip if (!_global.enums) { _global.enums = new Object(); } if (!_global.enums.RankTypes) { var v1 = function () {}; enums.RankTypes = v1; var v2 = v1.prototype; v1.getRankInfo = function (id, infoType) { return enums.RankTypes.RankInfoList[id][infoType]; }; v1.getRankFromScore = function (score) { var v1; var v2; var v3; v1 = 1; while (v1 < enums.RankTypes.COUNT) { v2 = enums.RankTypes.RankInfoList[v1 - 1][enums.RankTypes.C_INFO_MIN_SCORE]; v3 = enums.RankTypes.RankInfoList[v1][enums.RankTypes.C_INFO_MIN_SCORE]; if (score >= v2 && score < v3) { return v1 - 1; } ++v1; } }; v1.COUNT = 12; v1.C_INFO_NAME = 0; v1.C_INFO_MIN_SCORE = 1; v1.C_INFO_CLIP_NAME = 2; v1.RankInfoList = [['0. Officer Cadet', 0, 'S_RANK_00'], ['1. Flying Officer', 2000, 'S_RANK_01'], ['2. Flight Lieutenant', 4000, 'S_RANK_02'], ['3. Squadron Leader', 7000, 'S_RANK_03'], ['4. Wing Commander', 10000, 'S_RANK_04'], ['5. Group Captain', 15000, 'S_RANK_05'], ['6. Air Commodore', 25000, 'S_RANK_06'], ['7. Air Vice-Marshal', 40000, 'S_RANK_07'], ['8. Air Marshal', 60000, 'S_RANK_08'], ['9. Air Chief Marshal', 100000, 'S_RANK_09'], ['10. Marshal of the AF', 150000, 'S_RANK_10'], ['max possible', 999999, 'S_RANK_00']]; ASSetPropFlags(enums.RankTypes.prototype, null, 1); } #endinitclip } movieClip 1727 __Packages.gamemenu.ShopMenu { #initclip if (!_global.gamemenu) { _global.gamemenu = new Object(); } if (!_global.gamemenu.ShopMenu) { var v1 = function (parentGame, planeIdx, parentPage) { Mouse.show(); this.__parentPage = parentPage; this.__parentGame = parentGame; this.__myWorld = this.__parentGame.getWorld(); this.__toggleMenu = this.__parentGame.getToggleMenu(); this.__gameConfig = this.__parentGame.getGameConfig(); this.__worldConfig = this.__parentGame.getWorldConfig(); if (!this.isMultiplayer()) { this.__menuBkg = new MenuBkg(); } this.__pagesArray = new Array(); this.CreateShop(planeIdx); if (Const.C_ENABLE_CHEAT == true) { this.KeyListener = new Object(); this.KeyListener.onKeyDown = mx.utils.Delegate.create(this, this.CheatAddMoney); Key.addListener(this.KeyListener); } this.InitMusic(); this.AddUpdateListener(); }; gamemenu.ShopMenu = v1; var v2 = v1.prototype; v2.CreateShop = function (planeIdx) { var v5; v5 = this.__gameConfig.getPlaneConfig(planeIdx); this.__planeConfig = v5; var v33; v33 = v5.getPlaneType(); var v3; var v34; v3 = new MenuPage('Shop', null); var v9 = 400; var v16 = 30; var v18 = 776; var v21 = 565; var v19; v19 = new MenuButton(MenuButton.C_RECT_BTN, '', 12, v16, v18, v21, MainMenu.C_BTN_FEATHER, 0, 'Upgrade your plane', MainMenu.C_SMALL_FONT_BORDER, true, gamemenu.ShopMenu.C_DEPTH_TYPE, gamemenu.ShopMenu.C_HINT_DEPTH_TYPE); v19.SetLabelColor(Const.C_COLOR_ORANGE); v19.SetLabelFormat(22, false, 'left'); v19.AllowFadeOutAfterClick(false); v3.AddItem(v19); var v17; v17 = new MenuButton(MenuButton.C_CLIP_BTN, enums.PlaneTypes.C_PLAYER_PLANE_CLIP_NAME[v33] + '_STATIC', v9 + 120 + 40 - 70, v16 + 75, 0, 0, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_SMALL_FONT_BORDER, true, gamemenu.ShopMenu.C_DEPTH_TYPE, gamemenu.ShopMenu.C_HINT_DEPTH_TYPE); v17.__skin._xscale = 180; v17.__skin._yscale = 180; v17.SetMaxAlpha(100); v17.setIsSkinStatic(true); v3.AddItem(v17); var v12 = v9 + 40; var v4 = 140; var v28 = v4; var v6 = 30; var v26 = v6 + 10; var v24; v24 = new MenuButton(MenuButton.C_CLIP_BTN, '', v9 + v6 / 2, v4, v18, v21, MainMenu.C_BTN_FEATHER, 0, 'Airplane upgrades', MainMenu.C_SMALL_FONT_BORDER, true, gamemenu.ShopMenu.C_DEPTH_TYPE, gamemenu.ShopMenu.C_HINT_DEPTH_TYPE); v24.SetLabelColor(Const.C_COLOR_ORANGE); v24.SetLabelFormat(18, false, 'left'); v3.AddItem(v24); v4 += v26; var v29; v29 = v5.getCash(); this.__cashCounter = new gamemenu.components.CashCounter(92, v16 + v6 + v6 / 2 + 30, v29); v3.AddItem(this.__cashCounter); var v7; v7 = new Array(); var v11; var v10; var v13 = true; if (this.isMultiplayer()) { v13 = false; } else { v13 = true; } v11 = v5.getPlaneAttributeLimit(PlaneConfig.C_ATTR_FIREPOWER); v10 = v5.getPlaneAttribute(PlaneConfig.C_ATTR_FIREPOWER); this.__firepowerAttr = new gamemenu.components.AttribAdjuster(v12, v4, PlaneConfig.C_ATTR_FIREPOWER, v11, v10, this.__cashCounter, v13); v4 += v6; v3.AddItem(this.__firepowerAttr); v7.push(this.__firepowerAttr); v11 = v5.getPlaneAttributeLimit(PlaneConfig.C_ATTR_SPEED); v10 = v5.getPlaneAttribute(PlaneConfig.C_ATTR_SPEED); this.__speedAttr = new gamemenu.components.AttribAdjuster(v12, v4, PlaneConfig.C_ATTR_SPEED, v11, v10, this.__cashCounter, v13); v4 += v6; v3.AddItem(this.__speedAttr); v7.push(this.__speedAttr); v11 = v5.getPlaneAttributeLimit(PlaneConfig.C_ATTR_AGILITY); v10 = v5.getPlaneAttribute(PlaneConfig.C_ATTR_AGILITY); this.__agilityAttr = new gamemenu.components.AttribAdjuster(v12, v4, PlaneConfig.C_ATTR_AGILITY, v11, v10, this.__cashCounter, v13); v4 += v6; v3.AddItem(this.__agilityAttr); v7.push(this.__agilityAttr); v11 = v5.getPlaneAttributeLimit(PlaneConfig.C_ATTR_THRUST); v10 = v5.getPlaneAttribute(PlaneConfig.C_ATTR_THRUST); this.__thrustAttr = new gamemenu.components.AttribAdjuster(v12, v4, PlaneConfig.C_ATTR_THRUST, v11, v10, this.__cashCounter, v13); v4 += v6; v3.AddItem(this.__thrustAttr); v7.push(this.__thrustAttr); v11 = v5.getPlaneAttributeLimit(PlaneConfig.C_ATTR_ARMOUR); v10 = v5.getPlaneAttribute(PlaneConfig.C_ATTR_ARMOUR); this.__armourAttr = new gamemenu.components.AttribAdjuster(v12, v4, PlaneConfig.C_ATTR_ARMOUR, v11, v10, this.__cashCounter, v13); v4 += v6 - 10; v3.AddItem(this.__armourAttr); v7.push(this.__armourAttr); var v23; v23 = new MenuButton(MenuButton.C_CLIP_BTN, '', v9 + v6 / 2, v4, v18, v21, MainMenu.C_BTN_FEATHER, 0, 'Mounted devices', MainMenu.C_SMALL_FONT_BORDER, true, gamemenu.ShopMenu.C_DEPTH_TYPE, gamemenu.ShopMenu.C_HINT_DEPTH_TYPE); v23.SetLabelColor(Const.C_COLOR_ORANGE); v23.SetLabelFormat(18, false, 'left'); v3.AddItem(v23); v4 += v26 + 5; var v30; var v27; v30 = v5.getBuyedItemList(); v27 = v5.getWeaponLimit(); var v31; var v32; var v36; v31 = 2; v32 = v5.getInvColumnsCount(); this.__weaponLimitInfo = new gamemenu.components.WeaponLimitInfo(v9 + 220 + 40 - 70 - 20, v16 + 15, v27); v3.AddItem(this.__weaponLimitInfo); this.__planeInventory = new gamemenu.components.PlaneInventory(v12 + 40, v4, v31, v32, gamemenu.components.ItemMatrix.C_SHOP_TYPE_SELL, true, this.__cashCounter, v30, v27, this.__weaponLimitInfo); v3.AddItem(this.__planeInventory); var v15; v15 = new MenuButton(MenuButton.C_CLIP_BTN, 'S_SPONSOR_LOGO', v9 + 220 + 40 + 40, v16 + 45 + 35, 100, 40, gamemenu.ShopMenu.C_BTN_FEATHER, 0, '', gamemenu.ShopMenu.C_LARGE_FONT_BORDER, false, gamemenu.ShopMenu.C_DEPTH_TYPE, gamemenu.ShopMenu.C_HINT_DEPTH_TYPE); v15.SetMaxAlpha(100); v15.__skin._xscale = 40; v15.__skin._yscale = 40; v15.AllowFadeOutAfterClick(false); v15.addEventListener('click', DelegatePlus.create(MainMenu, MainMenu.ToSponsorSite, WebApi.C_SHOP_MENU_TREMOR_LOGO)); v3.AddItem(v15); var v22; v22 = new MenuButton(MenuButton.C_RECT_BTN, '', 650, 540, 100, 40, gamemenu.ShopMenu.C_BTN_FEATHER, 0, 'Done', gamemenu.ShopMenu.C_LARGE_FONT_BORDER, false, gamemenu.ShopMenu.C_DEPTH_TYPE, gamemenu.ShopMenu.C_HINT_DEPTH_TYPE); v22.SetHint('Leave the shop'); v22.addEventListener('click', mx.utils.Delegate.create(this, this.ExitFromShop)); v3.AddItem(v22); v9 = 12; v12 = v9 + 40; var v25; v25 = new MenuButton(MenuButton.C_CLIP_BTN, '', v9 + v6 / 2, v28, v18, v21, MainMenu.C_BTN_FEATHER, 0, 'Device shop', MainMenu.C_SMALL_FONT_BORDER, true, gamemenu.ShopMenu.C_DEPTH_TYPE, gamemenu.ShopMenu.C_HINT_DEPTH_TYPE); v25.SetLabelColor(Const.C_COLOR_ORANGE); v25.SetLabelFormat(18, false, 'left'); v3.AddItem(v25); var v37; this.__gameShop = new gamemenu.components.GameShop(v12 + 40, v28 + v26 + 5, 4, 5, gamemenu.components.ItemMatrix.C_SHOP_TYPE_BUY, false, this.__planeInventory, this.__cashCounter); v3.AddItem(this.__gameShop); v4 += 50; var v8; v8 = new gamemenu.components.InfoBar(v12, 410, 350, 165); this.__planeInventory.setInfoBar(v8); var v2; var v14; v14 = v7.length; v2 = 0; while (v2 < v14) { v7[v2].setInfoBar(v8); ++v2; } this.__planeInventory.setInfoBar(v8); this.__gameShop.setInfoBar(v8); v3.AddItem(v8); var v20; v20 = new MenuButton(MenuButton.C_CLIP_BTN, '', v9 + v6 / 2, v16 + 30, v18, 40, MainMenu.C_BTN_FEATHER, 0, 'Cash', MainMenu.C_SMALL_FONT_BORDER, true, gamemenu.ShopMenu.C_DEPTH_TYPE, gamemenu.ShopMenu.C_HINT_DEPTH_TYPE); v20.SetLabelColor(Const.C_COLOR_ORANGE); v20.SetLabelFormat(18, false, 'left'); v20.AllowFadeOutAfterClick(false); v3.AddItem(v20); this.__pagesArray.push(v3); if (!this.isMultiplayer()) { this.__pagesArray[0].FadeIn(); } }; v2.Show = function () { this.__pagesArray[0].FadeIn(); }; v2.FadeIn = function () { this.Show(); }; v2.Hide = function () { this.__pagesArray[0].FadeOut(); }; v2.FadeOut = function (destroyAfterFadeOut) { this.__pagesArray[0].FadeOut(destroyAfterFadeOut); }; v2.Destroy = function () { this.RemoveUpdateListener(); this.__menuBkg.Destroy(); var v2; var v3; v3 = this.__pagesArray.length; v2 = 0; while (v2 < v3) { this.__pagesArray[v2].Destroy(); ++v2; } if (this.KeyListener != undefined) { Key.removeListener(this.KeyListener); delete this.KeyListener; } this.DestroyMusic(); LayMan.ResetMenuDepths(); }; v2.SaveDataFromShopToPlaneConfig = function () { var v2; v2 = this.__planeConfig; v2.SavePlaneAttributes(this.__firepowerAttr, this.__speedAttr, this.__agilityAttr, this.__thrustAttr, this.__armourAttr); v2.SaveBuyedItemList(this.__planeInventory.getItemList()); v2.SaveCash(this.__cashCounter); this.__gameConfig.saveGame(); }; v2.ExitFromShop = function () { if (GameConfig.getGameType() == enums.GameTypes.MULTIPLAYER) { this.SaveDataFromShopToPlaneConfig(); this.__pagesArray[0].FadeOut(); this.__parentPage.FadeIn(); } else { this.SaveDataFromShopToPlaneConfig(); this.__pagesArray[0].FadeOut(); this.__parentGame.DoTransition(TransitionFader.C_SHOP_MENU, TransitionFader.C_BRIEFING_MENU); } }; v2.Render = function () { this.__menuBkg.Render(); FrameMan.Update(); this.__parentGame.UpdateFPSText(); }; v2.CheatAddMoney = function (evtObj) { if (Key.getAscii() == 43 || Key.getAscii() == 48) { var v2 = this.C_CHEAT_ADD_MONEY_AMT; if ((this.__gameConfig.getPlaneConfig()).getCash() == NaN) { (this.__gameConfig.getPlaneConfig()).setCash(v2); this.__cashCounter.setCash(v2); } else { (this.__gameConfig.getPlaneConfig()).AddCash(v2); this.__cashCounter.AddCash(v2); } } }; v2.isMultiplayer = function () { if (GameConfig.getGameType() == enums.GameTypes.MULTIPLAYER) { return true; } else { return false; } }; v2.InitMusic = function () { var v2; v2 = LayMan.RegisterEmptyClip(this.C_MUSIC_NAME, LayMan.C_S_MENU); this.__music = new Sound(v2); this.__music.attachSound(this.C_MUSIC_NAME); this.__gameConfig.addEventListener(GameConfig.EVT_TOGGLE_MUSIC, mx.utils.Delegate.create(this, this.ToggleMusic)); if (!this.isMultiplayer()) { if (this.__gameConfig.isMusicEnabled()) { this.__music.start(0, 99999); } } }; v2.DestroyMusic = function () { this.__music.stop(); delete this.__music; }; v2.ToggleMusic = function (evt) { if (!this.isMultiplayer()) { if (evt.state == true) { this.__music.start(0, 99999); } else { this.__music.stop(); } } }; v2.AddUpdateListener = function () { this.__updateClip = LayMan.RegisterEmptyClip('MainMenuUpdate', LayMan.C_S_MENU); this.__updateClip.onEnterFrame = mx.utils.Delegate.create(this, this.Render); }; v2.RemoveUpdateListener = function () { this.__updateClip.onEnterFrame = null; }; v2.RedirectToSponsorSite = function () { var v1; v1 = WebApi.getTrackingURL(WebApi.C_INGAME_SPONSOR_LOGO); getURL(v1, Const.C_SPONSOR_WEBSITE); }; v2.C_MUSIC_NAME = 'Batt-Edgen.wav'; v2.C_CHEAT_ADD_MONEY_AMT = 5000; v2.C_DEF_PAGE_POS_X = 12; v2.C_DEF_PAGE_POS_Y = 30; v2.C_DEF_PAGE_WIDTH = 776; v2.C_DEF_PAGE_HEIGHT = 565; v2.C_DEF_PADDING = 10; v2.C_BTN_FONT_SIZE = 18; v2.C_TITLE_FONT_SIZE = 20; v2.C_DESC_FONT_SIZE = 16; v1.C_BTN_FEATHER = MainMenu.C_BTN_FEATHER; v1.C_LARGE_FONT_BORDER = MainMenu.C_LARGE_FONT_BORDER; v1.C_SMALL_FONT_BORDER = MainMenu.C_SMALL_FONT_BORDER; v1.C_DEPTH_TYPE = LayMan.C_S_MENU; v1.C_HINT_DEPTH_TYPE = LayMan.C_S_MENU_HINTS; ASSetPropFlags(gamemenu.ShopMenu.prototype, null, 1); } #endinitclip } movieClip 1728 __Packages.gamemenu.ChoosePlaneMenu { #initclip if (!_global.gamemenu) { _global.gamemenu = new Object(); } if (!_global.gamemenu.ChoosePlaneMenu) { var v1 = function (parentPage, parentGame, buyBtn, playBtn) { Mouse.show(); this.__parentPage = parentPage; this.__parentGame = parentGame; this.__mainMenu = this.__parentGame.getMainMenu(); this.__gameConfig = this.__parentGame.getGameConfig(); this.__bUnlock = buyBtn; this.__bPlay = playBtn; this.__pagesArray = new Array(); this.__pagesCount = 0; this.__curPageIdx = 0; this.__clipMask100 = LayMan.RegisterClip(this.C_CLIP_MASK_100_100, LayMan.C_S_OTHER); this.CreatePages(parentPage); this.__gameConfig.setChosenPlaneIdx(this.__curPageIdx); }; gamemenu.ChoosePlaneMenu = v1; var v2 = v1.prototype; v2.CreatePages = function (parentPage) { var v2; var v14; var v3; v3 = 0; while (v3 < enums.PlaneTypes.COUNT) { v2 = new MenuPage('ChoosePlane', parentPage); parentPage = parentPage; this.CreateBlankPage(v2, 'Choose your character & aircraft'); var v13; var v6; v13 = enums.PlaneTypes.isPlaneWithHardMode(v3); if (v13) { v6 = 'Difficulty: HARD'; } else { v6 = 'Difficulty: MEDIUM'; } v14 = v2.getVacantRowY(); this.AddClipDesc(v2, enums.PlaneTypes.getPlaneInfo(v3, enums.PlaneTypes.C_INFO_PILOT_NAME), enums.PlaneTypes.getPlaneInfo(v3, enums.PlaneTypes.C_INFO_PILOT_CLIP), this.__clipMask100, enums.PlaneTypes.getPlaneInfo(v3, enums.PlaneTypes.C_INFO_PILOT_DESC)); this.AddClipDesc(v2, enums.PlaneTypes.getPlaneInfo(v3, enums.PlaneTypes.C_INFO_PLANE_NAME), enums.PlaneTypes.getPlaneInfo(v3, enums.PlaneTypes.C_INFO_PLANE_CLIP), this.__clipMask100, enums.PlaneTypes.getPlaneInfo(v3, enums.PlaneTypes.C_INFO_PLANE_DESC)); var v5; var v4; v5 = v2.getVacantRowX() + 300; v4 = v2.getVacantRowY(); this.AddDesc(v2, 'Abilities', ''); this.AddAttrStatistics(v2, v3); v2.setVacantRowX(v5); v2.setVacantRowY(v4); this.AddDesc(v2, 'Weapon slots', ''); v2.incVacantRowY(0); v5 = v2.getVacantRowX(); v4 = v2.getVacantRowY(); var v10; var v12; var v11; v10 = 2; v12 = PlaneConfig.getAttrLimitCount(v3, PlaneConfig.C_ATTR_INV_SLOTS); v11 = PlaneConfig.getAttrLimitCount(v3, PlaneConfig.C_ATTR_GUN_GROUP_LIMIT); var v9; v9 = PlaneConfig.getDefaultWpnList(v3); var v7; v7 = new gamemenu.components.PlaneInventory(v5, v4, v10, v12, gamemenu.components.ItemMatrix.C_SHOP_TYPE_SELL, false, undefined, v9, v11); v7.setIsActionButtonHidden(true); v2.AddItem(v7); v2.setVacantRowX(600); v2.setVacantRowY(v14); this.AddDesc(v2, v6, ''); this.__pagesArray.push(v2); ++v3; } this.__pagesCount = this.__pagesArray.length; var v15 = 0; var v18 = 40; var v20 = 776; var v19 = 490; v15 = v15 + this.C_DEF_PAGE_WIDTH - 160; var v16 = 15; var v17 = 0; this.__bPrev = new MenuButton(MenuButton.C_RECT_BTN, '', v15 + 10, v18 + v19 - 40, 70, 30, v16, 0, 'Prev', v17, false, gamemenu.ChoosePlaneMenu.C_DEPTH_TYPE, gamemenu.ChoosePlaneMenu.C_HINT_DEPTH_TYPE); this.__bPrev.SetMaxAlpha(100); this.__bPrev.SetLabelFormat(this.C_BTN_FONT_SIZE, false, 'center'); this.__bPrev.AllowFadeOutAfterClick(false); this.__bPrev.addEventListener('click', mx.utils.Delegate.create(this, this.PrevPage)); this.__bPrev.SetHint('Go to previous aircraft'); this.__bNext = new MenuButton(MenuButton.C_RECT_BTN, '', v15 + 15 + this.__bPrev.getWidth(), v18 + v19 - 40, 70, 30, v16, 0, 'Next', v17, false, gamemenu.ChoosePlaneMenu.C_DEPTH_TYPE, gamemenu.ChoosePlaneMenu.C_HINT_DEPTH_TYPE); this.__bNext.SetMaxAlpha(100); this.__bNext.SetLabelFormat(this.C_BTN_FONT_SIZE, false, 'center'); this.__bNext.AllowFadeOutAfterClick(false); this.__bNext.addEventListener('click', mx.utils.Delegate.create(this, this.NextPage)); this.__bNext.SetHint('Go to next aircraft'); this.__bLockedText = new MenuButton(MenuButton.C_CLIP_BTN, 'S_PLANE_LOCKED', Const.C_SCENE_WIDTH / 2, Const.C_SCENE_HEIGHT / 2 - 50, 100, 100, v16, 0, '', v17, false, gamemenu.ChoosePlaneMenu.C_DEPTH_TYPE, gamemenu.ChoosePlaneMenu.C_HINT_DEPTH_TYPE); this.__bLockedText.SetMaxAlpha(100); this.__bLockedText.AllowFadeOutAfterClick(false); this.__bUnlock.addEventListener('click', mx.utils.Delegate.create(this, this.BuyItemPlane)); }; v2.FadeIn = function () { this.__curPageIdx = this.__gameConfig.getChosenPlaneIdx(); this.__pagesArray[this.__curPageIdx].FadeIn(); this.__bPrev.FadeIn(); this.__bNext.FadeIn(); this.ManageButtonsWhenPlaneLocked(); }; v2.FadeOut = function (destroyAfterFadeOut) { if (destroyAfterFadeOut) { var v2; v2 = 0; while (v2 < this.__pagesCount) { this.__pagesArray[v2].FadeOut(true); this.__bPrev.FadeOut(true); this.__bNext.FadeOut(true); this.__bLockedText.FadeOut(true); ++v2; } } else { this.__pagesArray[this.__curPageIdx].FadeOut(); this.__bPrev.FadeOut(); this.__bNext.FadeOut(); this.__bLockedText.FadeOut(); } }; v2.NextPage = function () { this.__pagesArray[this.__curPageIdx].FadeOut(); this.__curPageIdx = (this.__curPageIdx + 1) % this.__pagesCount; this.__pagesArray[this.__curPageIdx].FadeIn(); this.__gameConfig.setChosenPlaneIdx(this.__curPageIdx); this.ManageButtonsWhenPlaneLocked(); }; v2.PrevPage = function () { this.__pagesArray[this.__curPageIdx].FadeOut(); --this.__curPageIdx; if (this.__curPageIdx < 0) { this.__curPageIdx = this.__pagesCount - 1; } this.__pagesArray[this.__curPageIdx].FadeIn(); this.__gameConfig.setChosenPlaneIdx(this.__curPageIdx); this.ManageButtonsWhenPlaneLocked(); }; v2.Destroy = function () { var v2; v2 = 0; while (v2 < this.__pagesCount) { this.__pagesArray[v2].Destroy(); ++v2; } this.__bPrev.Destroy(); this.__bNext.Destroy(); this.__bLockedText.Destroy(); LayMan.RemoveClip(this.__clipMask100); LayMan.ResetMenuDepths(); }; v2.AddAttrStar = function (thisPage, attrId, planeType) { var v1; var v9; var v7; var v3 = 3; var v8; v9 = thisPage.getVacantRowX(); v7 = thisPage.getVacantRowY(); v1 = new MenuButton(MenuButton.C_CLIP_BTN, 'S_PLANE_ATTR_SHOW', v9, v7, 70, 30, 0, 0, '', 0, false, gamemenu.ChoosePlaneMenu.C_DEPTH_TYPE, gamemenu.ChoosePlaneMenu.C_HINT_DEPTH_TYPE); v1.AllowFadeOutAfterClick(false); var v6; var v4; v6 = PlaneConfig.getAttrInfo(attrId, PlaneConfig.C_ATTR_INFO_NAME); v4 = PlaneConfig.getAttrInfo(attrId, PlaneConfig.C_ATTR_INFO_HINT); v1.__skin.onText = String(v6); var v10; v10 = PlaneConfig.getAttrLimitCount(planeType, attrId); v1.__skin.gotoAndStop(v10); v1.SetHint(v4); v1.setIsSkinStatic(true); v8 = v1.__skin._height; thisPage.AddItem(v1); thisPage.incVacantRowY(v8 + v3); }; v2.AddAttrStatistics = function (thisPage, planeType) { this.AddAttrStar(thisPage, PlaneConfig.C_ATTR_FIREPOWER, planeType); this.AddAttrStar(thisPage, PlaneConfig.C_ATTR_SPEED, planeType); this.AddAttrStar(thisPage, PlaneConfig.C_ATTR_AGILITY, planeType); this.AddAttrStar(thisPage, PlaneConfig.C_ATTR_THRUST, planeType); this.AddAttrStar(thisPage, PlaneConfig.C_ATTR_ARMOUR, planeType); }; v2.AddDesc = function (thisPage, SubTitle, Desc) { var v2; var v6; var v5; var v7; var v10; v6 = thisPage.getVacantRowX() + this.C_DEF_PADDING; v5 = thisPage.getVacantRowY(); v7 = this.C_DEF_PAGE_WIDTH; v10 = this.C_DEF_PAGE_HEIGHT; if (SubTitle != undefined && SubTitle != '') { var v3; v3 = new MenuButton(MenuButton.C_CLIP_BTN, '', v6, v5, v7 - 2 * this.C_DEF_PADDING, 30, MainMenu.C_BTN_FEATHER, 0, SubTitle, 0, true, gamemenu.ChoosePlaneMenu.C_DEPTH_TYPE, gamemenu.ChoosePlaneMenu.C_HINT_DEPTH_TYPE); v3.AllowFadeOutAfterClick(false); v3.SetLabelColor(Const.C_COLOR_ORANGE); v3.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v3.setAutoSize('center'); v3.SetMaxAlpha(100); thisPage.AddItem(v3); thisPage.incVacantRowY(this.C_DESC_FONT_SIZE + 5); v5 = thisPage.getVacantRowY(); } v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', v6, v5, v7 - 3 * this.C_DEF_PADDING, 50, MainMenu.C_BTN_FEATHER, 0, Desc, 0, true, gamemenu.ChoosePlaneMenu.C_DEPTH_TYPE, gamemenu.ChoosePlaneMenu.C_HINT_DEPTH_TYPE); v2.AllowFadeOutAfterClick(false); v2.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v2.setAutoSize('center'); v2.SetMaxAlpha(100); thisPage.AddItem(v2); var v8; v8 = v2.__txtField._height; thisPage.incVacantRowY(v8 + this.C_DEF_PADDING); }; v2.AddClipDesc = function (thisPage, SubTitle, clipName, clipMask, Desc) { var v8; var v6; var v10; var v14; v8 = thisPage.getVacantRowX() + this.C_DEF_PADDING; v6 = thisPage.getVacantRowY(); v10 = this.C_DEF_PAGE_WIDTH; v14 = this.C_DEF_PAGE_HEIGHT; if (SubTitle != undefined && SubTitle != '') { var v5; v5 = new MenuButton(MenuButton.C_CLIP_BTN, '', v8, v6, v10 - 2 * this.C_DEF_PADDING, 30, MainMenu.C_BTN_FEATHER, 0, SubTitle, 0, true, gamemenu.ChoosePlaneMenu.C_DEPTH_TYPE, gamemenu.ChoosePlaneMenu.C_HINT_DEPTH_TYPE); v5.AllowFadeOutAfterClick(false); v5.SetLabelColor(Const.C_COLOR_ORANGE); v5.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v5.setAutoSize('center'); v5.SetMaxAlpha(100); thisPage.AddItem(v5); thisPage.incVacantRowY(this.C_DESC_FONT_SIZE + this.C_DEF_PADDING); v6 = thisPage.getVacantRowY(); } var v3; v3 = new MenuButton(MenuButton.C_CLIP_BTN, clipName, v8, v6, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, gamemenu.ChoosePlaneMenu.C_DEPTH_TYPE, gamemenu.ChoosePlaneMenu.C_HINT_DEPTH_TYPE); v3.AllowFadeOutAfterClick(false); v3.SetMaxAlpha(100); v3.setIsSkinStatic(true); thisPage.AddItem(v3); var v9; var v7; v9 = this.getWidth(v3.__skin, clipMask); v7 = this.getHeight(v3.__skin, clipMask); var v2; v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', v8 + v9 + this.C_DEF_PADDING, v6, v10 - (v9 + 4 * this.C_DEF_PADDING), v7, MainMenu.C_BTN_FEATHER, 0, Desc, MainMenu.C_LARGE_FONT_BORDER, true, gamemenu.ChoosePlaneMenu.C_DEPTH_TYPE, gamemenu.ChoosePlaneMenu.C_HINT_DEPTH_TYPE); v2.AllowFadeOutAfterClick(false); v2.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v2.SetMaxAlpha(100); thisPage.AddItem(v2); var v11; v11 = v2.__txtField._height > v7 ? v2.__txtField._height : v7; thisPage.incVacantRowY(v11 + this.C_DEF_PADDING); }; v2.AddClipClipDesc = function (thisPage, SubTitle, clip1Name, clip1Mask, clip2Name, clip2Mask, Desc) { var v8; var v6; var v16; var v19; v8 = thisPage.getVacantRowX() + this.C_DEF_PADDING; v6 = thisPage.getVacantRowY(); v16 = this.C_DEF_PAGE_WIDTH; v19 = this.C_DEF_PAGE_HEIGHT; if (SubTitle != undefined && SubTitle != '') { var v5; v5 = new MenuButton(MenuButton.C_CLIP_BTN, '', v8, v6, v16 - 2 * this.C_DEF_PADDING, 30, MainMenu.C_BTN_FEATHER, 0, SubTitle, 0, true, gamemenu.ChoosePlaneMenu.C_DEPTH_TYPE, gamemenu.ChoosePlaneMenu.C_HINT_DEPTH_TYPE); v5.AllowFadeOutAfterClick(false); v5.SetLabelColor(Const.C_COLOR_ORANGE); v5.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v5.setAutoSize('center'); v5.SetMaxAlpha(100); thisPage.AddItem(v5); thisPage.incVacantRowY(this.C_DESC_FONT_SIZE + this.C_DEF_PADDING); v6 = thisPage.getVacantRowY(); } var v2; v2 = new MenuButton(MenuButton.C_CLIP_BTN, clip1Name, v8, v6, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, gamemenu.ChoosePlaneMenu.C_DEPTH_TYPE, gamemenu.ChoosePlaneMenu.C_HINT_DEPTH_TYPE); v2.AllowFadeOutAfterClick(false); v2.SetMaxAlpha(100); v2.setIsSkinStatic(true); thisPage.AddItem(v2); var v9; var v13; v9 = this.getWidth(v2.__skin, clip1Mask); v13 = this.getHeight(v2.__skin, clip1Mask); var v7; v7 = new MenuButton(MenuButton.C_CLIP_BTN, clip2Name, v8 + v9 + this.C_DEF_PADDING, v6, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, gamemenu.ChoosePlaneMenu.C_DEPTH_TYPE, gamemenu.ChoosePlaneMenu.C_HINT_DEPTH_TYPE); v7.AllowFadeOutAfterClick(false); v7.SetMaxAlpha(100); v7.setIsSkinStatic(true); thisPage.AddItem(v7); var v11; var v12; v11 = this.getWidth(v2.__skin, clip2Mask); v12 = this.getHeight(v2.__skin, clip2Mask); var v4; var v10; v10 = v13 > v12 ? v13 : v12; v4 = new MenuButton(MenuButton.C_CLIP_BTN, '', v8 + v9 + v11 + 3 * this.C_DEF_PADDING, v6, this.C_DEF_PAGE_WIDTH - (v9 + v11 + 5 * this.C_DEF_PADDING), v10, MainMenu.C_BTN_FEATHER, 0, Desc, MainMenu.C_LARGE_FONT_BORDER, true, gamemenu.ChoosePlaneMenu.C_DEPTH_TYPE, gamemenu.ChoosePlaneMenu.C_HINT_DEPTH_TYPE); v4.AllowFadeOutAfterClick(false); v4.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v4.SetMaxAlpha(100); thisPage.AddItem(v4); var v14; v14 = v10 > v4.__txtField._height ? v10 : v4.__txtField._height; thisPage.incVacantRowY(v14 + this.C_DEF_PADDING); }; v2.AddClipClipClipDesc = function (thisPage, SubTitle, clip1Name, clip1Mask, clip2Name, clip2Mask, clip3Name, clip3Mask, Desc) { var v10; var v8; var v19; var v23; v10 = thisPage.getVacantRowX() + this.C_DEF_PADDING; v8 = thisPage.getVacantRowY(); v19 = this.C_DEF_PAGE_WIDTH; v23 = this.C_DEF_PAGE_HEIGHT; if (SubTitle != undefined && SubTitle != '') { var v7; v7 = new MenuButton(MenuButton.C_CLIP_BTN, '', v10, v8, v19 - 2 * this.C_DEF_PADDING, 30, MainMenu.C_BTN_FEATHER, 0, SubTitle, 0, true, gamemenu.ChoosePlaneMenu.C_DEPTH_TYPE, gamemenu.ChoosePlaneMenu.C_HINT_DEPTH_TYPE); v7.AllowFadeOutAfterClick(false); v7.SetLabelColor(Const.C_COLOR_ORANGE); v7.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v7.setAutoSize('center'); v7.SetMaxAlpha(100); thisPage.AddItem(v7); thisPage.incVacantRowY(this.C_DESC_FONT_SIZE + 5); v8 = thisPage.getVacantRowY(); } var v6; v6 = new MenuButton(MenuButton.C_CLIP_BTN, clip1Name, v10, v8, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, gamemenu.ChoosePlaneMenu.C_DEPTH_TYPE, gamemenu.ChoosePlaneMenu.C_HINT_DEPTH_TYPE); v6.AllowFadeOutAfterClick(false); v6.SetMaxAlpha(100); v6.setIsSkinStatic(true); thisPage.AddItem(v6); var v11; var v16; v11 = this.getWidth(v6.__skin, clip1Mask); v16 = this.getHeight(v6.__skin, clip1Mask); var v5; v5 = new MenuButton(MenuButton.C_CLIP_BTN, clip2Name, v10 + v11 + 2 * this.C_DEF_PADDING, v8, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, gamemenu.ChoosePlaneMenu.C_DEPTH_TYPE, gamemenu.ChoosePlaneMenu.C_HINT_DEPTH_TYPE); v5.AllowFadeOutAfterClick(false); v5.SetMaxAlpha(100); v5.setIsSkinStatic(true); thisPage.AddItem(v5); var v12; var v15; v12 = this.getWidth(v5.__skin, clip2Mask); v15 = this.getHeight(v5.__skin, clip2Mask); var v4; v4 = new MenuButton(MenuButton.C_CLIP_BTN, clip3Name, v10 + v11 + v12 + 3 * this.C_DEF_PADDING, v8, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, gamemenu.ChoosePlaneMenu.C_DEPTH_TYPE, gamemenu.ChoosePlaneMenu.C_HINT_DEPTH_TYPE); v4.AllowFadeOutAfterClick(false); v4.SetMaxAlpha(100); v4.setIsSkinStatic(true); thisPage.AddItem(v4); var v13; var v14; v13 = this.getWidth(v4.__skin, clip3Mask); v14 = this.getHeight(v4.__skin, clip3Mask); var v3; var v9; v9 = v16 > v15 ? v16 : v15; v9 = v9 > v14 ? v9 : v14; v3 = new MenuButton(MenuButton.C_CLIP_BTN, '', v10 + v11 + v12 + v13 + 4 * this.C_DEF_PADDING, v8, this.C_DEF_PAGE_WIDTH - (v11 + v12 + v13 + 7 * this.C_DEF_PADDING), v9, MainMenu.C_BTN_FEATHER, 0, Desc, MainMenu.C_LARGE_FONT_BORDER, true, gamemenu.ChoosePlaneMenu.C_DEPTH_TYPE, gamemenu.ChoosePlaneMenu.C_HINT_DEPTH_TYPE); v3.AllowFadeOutAfterClick(false); v3.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v3.SetMaxAlpha(100); thisPage.AddItem(v3); var v17; v17 = v9 > v3.__txtField._height ? v9 : v3.__txtField._height; thisPage.incVacantRowY(v17 + this.C_DEF_PADDING); }; v2.getWidth = function (mc, mask) { if (mask == undefined) { return mc._width; } else { return mask._width; } }; v2.getHeight = function (mc, mask) { if (mask == undefined) { return mc._height; } else { return mask._height; } }; v2.CreateBlankPage = function (thisPage, pageTitle) { var v5; var v4; var v7; var v6; v5 = this.C_DEF_PAGE_POS_X; v4 = this.C_DEF_PAGE_POS_Y; v7 = this.C_DEF_PAGE_WIDTH; v6 = this.C_DEF_PAGE_HEIGHT; thisPage.setVacantRowX(v5 + this.C_DEF_PADDING); thisPage.setVacantRowY(v4); var v2; v2 = new MenuButton(MenuButton.C_RECT_BTN, '', v5, v4, v7, v6, MainMenu.C_BTN_FEATHER, 0, pageTitle, MainMenu.C_SMALL_FONT_BORDER, true, gamemenu.ChoosePlaneMenu.C_DEPTH_TYPE); v2.SetLabelColor(Const.C_COLOR_ORANGE); v2.SetLabelFormat(this.C_TITLE_FONT_SIZE, false, 'left'); v2.AllowFadeOutAfterClick(false); thisPage.AddItem(v2); thisPage.incVacantRowY(this.C_TITLE_FONT_SIZE); thisPage.incVacantRowY(this.C_TITLE_FONT_SIZE + this.C_DEF_PADDING - 5); }; v2.isPlaneLocked = function (idx) { var v2; var v5; v5 = this.__gameConfig.isCampaignCompleted(); if (WebApi.isInWebNetwork()) { if (WebApi.isUserLoggedIn()) { var v3; switch (idx) { case enums.PlaneTypes.SPAD_7: v3 = WebApi.C_TG_ITEM_PILOT_FONCK; break; case enums.PlaneTypes.SPAD_13: v3 = WebApi.C_TG_ITEM_PILOT_RICKENBACKER; break; case enums.PlaneTypes.FOKKER: v3 = WebApi.C_TG_ITEM_PILOT_REDBARON; break; default: v3 = -1; } if (v3 >= 0) { v2 = WebApi.isItemBought(v3); WebApi.DebugTxt('isPlaneLocked:itemId:' + v3 + 'isBought:' + v2); v2 = !v2; WebApi.DebugTxt('isPlaneLocked:itemId:' + v3 + 'isLocked:' + v2); if (v2 == undefined) { } if (v5) { v2 = false; } return v2; } else { v2 = enums.PlaneTypes.isPlaneDefaultlyLocked(idx); if (v5) { v2 = false; } return v2; } } else { v2 = enums.PlaneTypes.isPlaneDefaultlyLocked(idx); return v2; } } else { v2 = enums.PlaneTypes.isPlaneDefaultlyLocked(idx); if (v5) { v2 = false; } return v2; } }; v2.ManageButtonsWhenPlaneLocked = function () { if (this.isPlaneLocked(this.__curPageIdx)) { var v3; var v2 = ''; var v4; v4 = WebApi.isInWebNetwork(); v2 = 'Complete the campaign'; switch (this.__curPageIdx) { case enums.PlaneTypes.SPAD_7: if (v4) { v3 = v2 + '\nOR\n' + 'Click To Spend 10 Tremor Coins To Unlock Rene Fonck\'s airplane'; } else { v3 = v2; } break; case enums.PlaneTypes.SPAD_13: if (v4) { v3 = v2 + '\nOR\n' + 'Click To Spend 10 Tremor Coins To Unlock Edward Rickenbacker\'s airplane'; } else { v3 = v2; } break; case enums.PlaneTypes.FOKKER: if (v4) { v3 = v2 + '\nOR\n' + 'Click To Spend 15 Tremor Coins To Unlock Manfred von Richthoffen\'s airplane'; } else { v3 = v2; } break; default: v3 = ''; } this.__bUnlock.SetHint(v3); this.__bPlay.FadeOut(); this.__bUnlock.FadeIn(); this.__bLockedText.FadeIn(); } else { this.__bUnlock.FadeOut(); this.__bLockedText.FadeOut(); this.__bPlay.FadeIn(); } }; v2.FadeOutLockedTxt = function (idx, isForced) { var v3; v3 = (idx == undefined) ? this.__curPageIdx : idx; isForced = (isForced == undefined) ? false : isForced; WebApi.DebugTxt('CPM:FadeOutLockedTxt:pidx:' + v3 + ', isForced:' + isForced); if (!this.isPlaneLocked(v3) || isForced) { this.__bLockedText.FadeOut(); this.__bPlay.FadeIn(); this.__bUnlock.FadeOut(); } }; v2.BuyItemPlane = function () { var v2 = -1; switch (this.__curPageIdx) { case enums.PlaneTypes.CAMEL: break; case enums.PlaneTypes.HANRIOT: break; break; case enums.PlaneTypes.PFALZ: break; case enums.PlaneTypes.ALBATROS: case enums.PlaneTypes.SPAD_7: v2 = WebApi.C_TG_ITEM_PILOT_FONCK; break; case enums.PlaneTypes.SPAD_13: v2 = WebApi.C_TG_ITEM_PILOT_RICKENBACKER; break; case enums.PlaneTypes.FOKKER: v2 = WebApi.C_TG_ITEM_PILOT_REDBARON; } if (WebApi.isInWebNetwork()) { if (v2 > 0) { WebApi.BuyItem(v2); } } else { if (v2 > 0) { this.RedirectToPlaneItemURL(v2); } } }; v2.RedirectToPlaneItemURL = function (itemId) { var v1; v1 = WebApi.getTGItemURL(itemId); getURL(v1, Const.C_SPONSOR_WEBSITE); }; v2.C_DEF_PAGE_POS_X = 12; v2.C_DEF_PAGE_POS_Y = 30; v2.C_DEF_PAGE_WIDTH = 776; v2.C_DEF_PAGE_HEIGHT = 500; v2.C_DEF_PADDING = 10; v2.C_BTN_FONT_SIZE = 18; v2.C_TITLE_FONT_SIZE = 20; v2.C_DESC_FONT_SIZE = 16; v1.C_DEPTH_TYPE = LayMan.C_S_MENU; v1.C_HINT_DEPTH_TYPE = LayMan.C_S_MENU_HINTS; v1.C_BTN_FEATHER = MainMenu.C_BTN_FEATHER; v1.C_LARGE_FONT_BORDER = MainMenu.C_LARGE_FONT_BORDER; v1.C_SMALL_FONT_BORDER = MainMenu.C_SMALL_FONT_BORDER; v2.C_CLIP_MASK_100_100 = 'S_PILOT_PICTURE_MASK'; ASSetPropFlags(gamemenu.ChoosePlaneMenu.prototype, null, 1); } #endinitclip } movieClip 1729 __Packages.gamemenu.MultiplayerMenu { #initclip if (!_global.gamemenu) { _global.gamemenu = new Object(); } if (!_global.gamemenu.MultiplayerMenu) { var v1 = function (parentPage, myPage, parentGame, playBtn) { Mouse.show(); this.__parentPage = parentPage; this.__myPage = myPage; this.__parentGame = parentGame; this.__gameConf = this.__parentGame.getGameConfig(); GameConfig.setGameType(enums.GameTypes.MULTIPLAYER); this.__bPlay = playBtn; this.__pagesArray = new Array(); this.__pagesCount = 0; this.__curPageIdx = 0; this.CreatePages(parentPage); this.__gameConf.setChosenPlaneIdx(this.__curPageIdx); }; gamemenu.MultiplayerMenu = v1; var v2 = v1.prototype; v2.CreatePages = function (parentPage) { var v2; var v3; v2 = new MenuPage('ChoosePlane', parentPage); parentPage = parentPage; this.CreateBlankPage(v2, 'Multiplayer setup'); v2.setVacantRowX(75); var v8; var v7; v8 = v2.getVacantRowX(); v7 = v2.getVacantRowY(); v3 = 0; while (v3 < this.C_PLAYERS_CNT) { v2.setVacantRowY(v7); this.AddDesc(v2, 'PLAYER ' + Number(v3 + 1), ''); v2.incVacantRowX(200); ++v3; } v2.setVacantRowX(20); v2.incVacantRowY(10); var v9 = 200; var v4; this.AddDesc(v2, 'Select aircraft', ''); v8 = v2.getVacantRowX(); v7 = v2.getVacantRowY(); this.__planeChooserArr = new Array(); var v6; var v12; v3 = 0; while (v3 < this.C_PLAYERS_CNT) { v6 = this.__gameConf.getPlaneConfig(v3); v12 = v6.getPlaneType(); v4 = new gamemenu.components.ListChooser(v8 + v9 * v3, v7, this.getAirplaneTypesList(), v12); v2.AddItem(v4); this.__planeChooserArr.push(v4); ++v3; } v2.incVacantRowY(110); this.AddDesc(v2, 'Select controls', ''); v8 = v2.getVacantRowX(); v7 = v2.getVacantRowY(); this.__planeControlsArr = new Array(); var v10; v3 = 0; while (v3 < this.C_PLAYERS_CNT) { v6 = this.__gameConf.getPlaneConfig(v3); v10 = v6.getDefaultKeyType(); v4 = new gamemenu.components.ListChooser(v8 + v9 * v3, v7, this.getControlTypesList(), v10); v2.AddItem(v4); this.__planeControlsArr.push(v4); ++v3; } v2.incVacantRowY(110); this.AddDesc(v2, 'Setup weapons', ''); this.__planeShopBtnArr = new Array(); this.__planeShopMenuArr = new Array(); var v5; var v11; v8 = v2.getVacantRowX(); v7 = v2.getVacantRowY(); v8 += 30; v3 = 0; while (v3 < this.C_PLAYERS_CNT) { v5 = new MenuButton(MenuButton.C_RECT_BTN, undefined, v8 + v9 * v3, v7, 100, 40, MainMenu.C_BTN_FEATHER, 0, 'Shop', MainMenu.C_LARGE_FONT_BORDER, false, gamemenu.MultiplayerMenu.C_DEPTH_TYPE, gamemenu.MultiplayerMenu.C_HINT_DEPTH_TYPE); v5.SetHint('Goto shop to setup weapons.'); v5.addEventListener('click', DelegatePlus.create(this, this.ShowShop, this.__myPage, v3)); v2.AddItem(v5); this.__planeShopBtnArr.push(v5); ++v3; } v3 = 0; while (v3 < this.C_PLAYERS_CNT) { v11 = new gamemenu.ShopMenu(this.__parentGame, v3, v2); this.__planeShopMenuArr.push(v11); ++v3; } this.__pagesArray.push(v2); this.__pagesCount = this.__pagesArray.length; }; v2.FadeIn = function () { this.LoadData(); this.__curPageIdx = 0; this.__pagesArray[this.__curPageIdx].FadeIn(); }; v2.FadeOut = function (destroyAfterFadeOut) { this.SaveData(); if (destroyAfterFadeOut) { var v2; v2 = 0; while (v2 < this.__pagesCount) { this.__pagesArray[v2].FadeOut(true); ++v2; } } else { this.__pagesArray[this.__curPageIdx].FadeOut(); } }; v2.Destroy = function () { var v2; v2 = 0; while (v2 < this.__pagesCount) { this.__pagesArray[v2].Destroy(); ++v2; } LayMan.ResetMenuDepths(); }; v2.AddDesc = function (thisPage, SubTitle, Desc) { var v2; var v6; var v5; var v7; var v10; v6 = thisPage.getVacantRowX() + this.C_DEF_PADDING; v5 = thisPage.getVacantRowY(); v7 = this.C_DEF_PAGE_WIDTH; v10 = this.C_DEF_PAGE_HEIGHT; if (SubTitle != undefined && SubTitle != '') { var v3; v3 = new MenuButton(MenuButton.C_CLIP_BTN, '', v6, v5, v7 - 2 * this.C_DEF_PADDING, 30, MainMenu.C_BTN_FEATHER, 0, SubTitle, 0, true, gamemenu.MultiplayerMenu.C_DEPTH_TYPE, gamemenu.MultiplayerMenu.C_HINT_DEPTH_TYPE); v3.AllowFadeOutAfterClick(false); v3.SetLabelColor(Const.C_COLOR_ORANGE); v3.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v3.setAutoSize('center'); v3.SetMaxAlpha(100); thisPage.AddItem(v3); thisPage.incVacantRowY(this.C_DESC_FONT_SIZE + 5); v5 = thisPage.getVacantRowY(); } v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', v6, v5, v7 - 3 * this.C_DEF_PADDING, 50, MainMenu.C_BTN_FEATHER, 0, Desc, 0, true, gamemenu.MultiplayerMenu.C_DEPTH_TYPE, gamemenu.MultiplayerMenu.C_HINT_DEPTH_TYPE); v2.AllowFadeOutAfterClick(false); v2.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v2.setAutoSize('center'); v2.SetMaxAlpha(100); thisPage.AddItem(v2); var v8; v8 = v2.__txtField._height; thisPage.incVacantRowY(v8 + this.C_DEF_PADDING); }; v2.AddClipDesc = function (thisPage, SubTitle, clipName, clipMask, Desc) { var v8; var v6; var v10; var v14; v8 = thisPage.getVacantRowX() + this.C_DEF_PADDING; v6 = thisPage.getVacantRowY(); v10 = this.C_DEF_PAGE_WIDTH; v14 = this.C_DEF_PAGE_HEIGHT; if (SubTitle != undefined && SubTitle != '') { var v5; v5 = new MenuButton(MenuButton.C_CLIP_BTN, '', v8, v6, v10 - 2 * this.C_DEF_PADDING, 30, MainMenu.C_BTN_FEATHER, 0, SubTitle, 0, true, gamemenu.MultiplayerMenu.C_DEPTH_TYPE, gamemenu.MultiplayerMenu.C_HINT_DEPTH_TYPE); v5.AllowFadeOutAfterClick(false); v5.SetLabelColor(Const.C_COLOR_ORANGE); v5.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v5.setAutoSize('center'); v5.SetMaxAlpha(100); thisPage.AddItem(v5); thisPage.incVacantRowY(this.C_DESC_FONT_SIZE + this.C_DEF_PADDING); v6 = thisPage.getVacantRowY(); } var v3; v3 = new MenuButton(MenuButton.C_CLIP_BTN, clipName, v8, v6, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, gamemenu.MultiplayerMenu.C_DEPTH_TYPE, gamemenu.MultiplayerMenu.C_HINT_DEPTH_TYPE); v3.AllowFadeOutAfterClick(false); v3.SetMaxAlpha(100); v3.setIsSkinStatic(true); thisPage.AddItem(v3); var v9; var v7; v9 = this.getWidth(v3.__skin, clipMask); v7 = this.getHeight(v3.__skin, clipMask); var v2; v2 = new MenuButton(MenuButton.C_CLIP_BTN, '', v8 + v9 + this.C_DEF_PADDING, v6, v10 - (v9 + 4 * this.C_DEF_PADDING), v7, MainMenu.C_BTN_FEATHER, 0, Desc, MainMenu.C_LARGE_FONT_BORDER, true, gamemenu.MultiplayerMenu.C_DEPTH_TYPE, gamemenu.MultiplayerMenu.C_HINT_DEPTH_TYPE); v2.AllowFadeOutAfterClick(false); v2.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v2.SetMaxAlpha(100); thisPage.AddItem(v2); var v11; v11 = v2.__txtField._height > v7 ? v2.__txtField._height : v7; thisPage.incVacantRowY(v11 + this.C_DEF_PADDING); }; v2.AddClipClipDesc = function (thisPage, SubTitle, clip1Name, clip1Mask, clip2Name, clip2Mask, Desc) { var v8; var v6; var v16; var v19; v8 = thisPage.getVacantRowX() + this.C_DEF_PADDING; v6 = thisPage.getVacantRowY(); v16 = this.C_DEF_PAGE_WIDTH; v19 = this.C_DEF_PAGE_HEIGHT; if (SubTitle != undefined && SubTitle != '') { var v5; v5 = new MenuButton(MenuButton.C_CLIP_BTN, '', v8, v6, v16 - 2 * this.C_DEF_PADDING, 30, MainMenu.C_BTN_FEATHER, 0, SubTitle, 0, true, gamemenu.MultiplayerMenu.C_DEPTH_TYPE, gamemenu.MultiplayerMenu.C_HINT_DEPTH_TYPE); v5.AllowFadeOutAfterClick(false); v5.SetLabelColor(Const.C_COLOR_ORANGE); v5.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v5.setAutoSize('center'); v5.SetMaxAlpha(100); thisPage.AddItem(v5); thisPage.incVacantRowY(this.C_DESC_FONT_SIZE + this.C_DEF_PADDING); v6 = thisPage.getVacantRowY(); } var v2; v2 = new MenuButton(MenuButton.C_CLIP_BTN, clip1Name, v8, v6, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, gamemenu.MultiplayerMenu.C_DEPTH_TYPE, gamemenu.MultiplayerMenu.C_HINT_DEPTH_TYPE); v2.AllowFadeOutAfterClick(false); v2.SetMaxAlpha(100); v2.setIsSkinStatic(true); thisPage.AddItem(v2); var v9; var v13; v9 = this.getWidth(v2.__skin, clip1Mask); v13 = this.getHeight(v2.__skin, clip1Mask); var v7; v7 = new MenuButton(MenuButton.C_CLIP_BTN, clip2Name, v8 + v9 + this.C_DEF_PADDING, v6, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, gamemenu.MultiplayerMenu.C_DEPTH_TYPE, gamemenu.MultiplayerMenu.C_HINT_DEPTH_TYPE); v7.AllowFadeOutAfterClick(false); v7.SetMaxAlpha(100); v7.setIsSkinStatic(true); thisPage.AddItem(v7); var v11; var v12; v11 = this.getWidth(v2.__skin, clip2Mask); v12 = this.getHeight(v2.__skin, clip2Mask); var v4; var v10; v10 = v13 > v12 ? v13 : v12; v4 = new MenuButton(MenuButton.C_CLIP_BTN, '', v8 + v9 + v11 + 3 * this.C_DEF_PADDING, v6, this.C_DEF_PAGE_WIDTH - (v9 + v11 + 5 * this.C_DEF_PADDING), v10, MainMenu.C_BTN_FEATHER, 0, Desc, MainMenu.C_LARGE_FONT_BORDER, true, gamemenu.MultiplayerMenu.C_DEPTH_TYPE, gamemenu.MultiplayerMenu.C_HINT_DEPTH_TYPE); v4.AllowFadeOutAfterClick(false); v4.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v4.SetMaxAlpha(100); thisPage.AddItem(v4); var v14; v14 = v10 > v4.__txtField._height ? v10 : v4.__txtField._height; thisPage.incVacantRowY(v14 + this.C_DEF_PADDING); }; v2.AddClipClipClipDesc = function (thisPage, SubTitle, clip1Name, clip1Mask, clip2Name, clip2Mask, clip3Name, clip3Mask, Desc) { var v10; var v8; var v19; var v23; v10 = thisPage.getVacantRowX() + this.C_DEF_PADDING; v8 = thisPage.getVacantRowY(); v19 = this.C_DEF_PAGE_WIDTH; v23 = this.C_DEF_PAGE_HEIGHT; if (SubTitle != undefined && SubTitle != '') { var v7; v7 = new MenuButton(MenuButton.C_CLIP_BTN, '', v10, v8, v19 - 2 * this.C_DEF_PADDING, 30, MainMenu.C_BTN_FEATHER, 0, SubTitle, 0, true, gamemenu.MultiplayerMenu.C_DEPTH_TYPE, gamemenu.MultiplayerMenu.C_HINT_DEPTH_TYPE); v7.AllowFadeOutAfterClick(false); v7.SetLabelColor(Const.C_COLOR_ORANGE); v7.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v7.setAutoSize('center'); v7.SetMaxAlpha(100); thisPage.AddItem(v7); thisPage.incVacantRowY(this.C_DESC_FONT_SIZE + 5); v8 = thisPage.getVacantRowY(); } var v6; v6 = new MenuButton(MenuButton.C_CLIP_BTN, clip1Name, v10, v8, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, gamemenu.MultiplayerMenu.C_DEPTH_TYPE, gamemenu.MultiplayerMenu.C_HINT_DEPTH_TYPE); v6.AllowFadeOutAfterClick(false); v6.SetMaxAlpha(100); v6.setIsSkinStatic(true); thisPage.AddItem(v6); var v11; var v16; v11 = this.getWidth(v6.__skin, clip1Mask); v16 = this.getHeight(v6.__skin, clip1Mask); var v5; v5 = new MenuButton(MenuButton.C_CLIP_BTN, clip2Name, v10 + v11 + 2 * this.C_DEF_PADDING, v8, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, gamemenu.MultiplayerMenu.C_DEPTH_TYPE, gamemenu.MultiplayerMenu.C_HINT_DEPTH_TYPE); v5.AllowFadeOutAfterClick(false); v5.SetMaxAlpha(100); v5.setIsSkinStatic(true); thisPage.AddItem(v5); var v12; var v15; v12 = this.getWidth(v5.__skin, clip2Mask); v15 = this.getHeight(v5.__skin, clip2Mask); var v4; v4 = new MenuButton(MenuButton.C_CLIP_BTN, clip3Name, v10 + v11 + v12 + 3 * this.C_DEF_PADDING, v8, 100, 100, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, true, gamemenu.MultiplayerMenu.C_DEPTH_TYPE, gamemenu.MultiplayerMenu.C_HINT_DEPTH_TYPE); v4.AllowFadeOutAfterClick(false); v4.SetMaxAlpha(100); v4.setIsSkinStatic(true); thisPage.AddItem(v4); var v13; var v14; v13 = this.getWidth(v4.__skin, clip3Mask); v14 = this.getHeight(v4.__skin, clip3Mask); var v3; var v9; v9 = v16 > v15 ? v16 : v15; v9 = v9 > v14 ? v9 : v14; v3 = new MenuButton(MenuButton.C_CLIP_BTN, '', v10 + v11 + v12 + v13 + 4 * this.C_DEF_PADDING, v8, this.C_DEF_PAGE_WIDTH - (v11 + v12 + v13 + 7 * this.C_DEF_PADDING), v9, MainMenu.C_BTN_FEATHER, 0, Desc, MainMenu.C_LARGE_FONT_BORDER, true, gamemenu.MultiplayerMenu.C_DEPTH_TYPE, gamemenu.MultiplayerMenu.C_HINT_DEPTH_TYPE); v3.AllowFadeOutAfterClick(false); v3.SetLabelFormat(this.C_DESC_FONT_SIZE, false, 'left'); v3.SetMaxAlpha(100); thisPage.AddItem(v3); var v17; v17 = v9 > v3.__txtField._height ? v9 : v3.__txtField._height; thisPage.incVacantRowY(v17 + this.C_DEF_PADDING); }; v2.getWidth = function (mc, mask) { if (mask == undefined) { return mc._width; } else { return mask._width; } }; v2.getHeight = function (mc, mask) { if (mask == undefined) { return mc._height; } else { return mask._height; } }; v2.CreateBlankPage = function (thisPage, pageTitle) { var v5; var v4; var v7; var v6; v5 = this.C_DEF_PAGE_POS_X; v4 = this.C_DEF_PAGE_POS_Y; v7 = this.C_DEF_PAGE_WIDTH; v6 = this.C_DEF_PAGE_HEIGHT; thisPage.setVacantRowX(v5 + this.C_DEF_PADDING); thisPage.setVacantRowY(v4); var v2; v2 = new MenuButton(MenuButton.C_RECT_BTN, '', v5, v4, v7, v6, MainMenu.C_BTN_FEATHER, 0, pageTitle, MainMenu.C_SMALL_FONT_BORDER, true, gamemenu.MultiplayerMenu.C_DEPTH_TYPE); v2.SetLabelColor(Const.C_COLOR_ORANGE); v2.SetLabelFormat(this.C_TITLE_FONT_SIZE, false, 'left'); v2.AllowFadeOutAfterClick(false); thisPage.AddItem(v2); thisPage.incVacantRowY(this.C_TITLE_FONT_SIZE); thisPage.incVacantRowY(this.C_TITLE_FONT_SIZE + this.C_DEF_PADDING - 5); }; v2.getAirplaneTypesList = function () { var v3; v3 = new Array(); var v1; var v2; v1 = 0; while (v1 < enums.PlaneTypes.COUNT) { v2 = enums.PlaneTypes.getPlaneInfo(v1, enums.PlaneTypes.C_INFO_PLANE_CLIP); v3.push(v2); ++v1; } return v3; }; v2.getControlTypesList = function () { var v3; v3 = new Array(); var v1; var v2; v1 = 0; while (v1 < enums.DefaultKeyTypes.count) { v2 = enums.DefaultKeyTypes.C_KEY_TYPES_CLIP_NAMES[v1]; v3.push(v2); ++v1; } return v3; }; v2.SaveDataToGameConfig = function () { var v2; var v6; v2 = 0; while (v2 < 4) { var v3; v3 = this.__gameConf.getPlaneConfig(v2); var v5; v5 = this.__planeChooserArr[v2].getCurIdx(); v3.setPlaneType(v5); var v4; v4 = this.__planeControlsArr[v2].getCurIdx(); v3.setDefaultKeyType(v4); ++v2; } }; v2.LoadDataFromGameConfig = function () { var v2; var v6; v2 = 0; while (v2 < 4) { var v3; v3 = this.__gameConf.getPlaneConfig(v2); var v5; v5 = v3.getPlaneType(); this.__planeChooserArr[v2].setCurIdx(v5); var v4; v4 = v3.getDefaultKeyType(); this.__planeControlsArr[v2].setCurIdx(v4); ++v2; } }; v2.SaveData = function () { if (GameConfig.getGameType() == enums.GameTypes.MULTIPLAYER) { this.SaveDataToGameConfig(); this.__gameConf.saveGame(enums.GameTypes.MULTIPLAYER); } }; v2.LoadData = function () { this.__gameConf.loadGame(enums.GameTypes.MULTIPLAYER); this.LoadDataFromGameConfig(); }; v2.ShowShop = function (evt, parentPage, planeIdx) { this.__planeShopMenuArr[planeIdx].FadeIn(); }; v2.C_DEF_PAGE_POS_X = 12; v2.C_DEF_PAGE_POS_Y = 30; v2.C_DEF_PAGE_WIDTH = 776; v2.C_DEF_PAGE_HEIGHT = 500; v2.C_DEF_PADDING = 10; v2.C_BTN_FONT_SIZE = 18; v2.C_TITLE_FONT_SIZE = 20; v2.C_DESC_FONT_SIZE = 16; v1.C_DEPTH_TYPE = LayMan.C_S_MENU; v1.C_HINT_DEPTH_TYPE = LayMan.C_S_MENU_HINTS; v1.C_BTN_FEATHER = MainMenu.C_BTN_FEATHER; v1.C_LARGE_FONT_BORDER = MainMenu.C_LARGE_FONT_BORDER; v1.C_SMALL_FONT_BORDER = MainMenu.C_SMALL_FONT_BORDER; v2.C_PLAYERS_CNT = 4; ASSetPropFlags(gamemenu.MultiplayerMenu.prototype, null, 1); } #endinitclip } movieClip 1730 __Packages.gamemenu.components.ListChooser { #initclip if (!_global.gamemenu) { _global.gamemenu = new Object(); } if (!_global.gamemenu.components) { _global.gamemenu.components = new Object(); } if (!_global.gamemenu.components.ListChooser) { var v1 = function (x, y, clipArr, curIdx) { curIdx = (curIdx == undefined) ? 0 : curIdx; this.__curClipIdx = curIdx; this.__clipArr = clipArr; this.__clipArrCnt = clipArr.length; var v4 = x; var v2 = 40; this.__prevBtn = new MenuButton(MenuButton.C_RECT_BTN, undefined, v4, y + 10, v2, v2, MainMenu.C_BTN_FEATHER, 0, '<', MainMenu.C_LARGE_FONT_BORDER, false, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); this.__prevBtn.addEventListener(MenuButton.EVT_CLICK, mx.utils.Delegate.create(this, this.gotoPrev)); this.__prevBtn.AllowFadeOutAfterClick(false); this.__prevBtn.SetHint('Previous'); this.__nextBtn = new MenuButton(MenuButton.C_RECT_BTN, undefined, v4, y + 10 + v2 + 5, v2, v2, MainMenu.C_BTN_FEATHER, 0, '>', MainMenu.C_LARGE_FONT_BORDER, false, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); this.__nextBtn.addEventListener(MenuButton.EVT_CLICK, mx.utils.Delegate.create(this, this.gotoNext)); this.__nextBtn.AllowFadeOutAfterClick(false); this.__nextBtn.SetHint('Next'); v4 += v2 + this.C_PADDING; this.__curClip = new MenuButton(MenuButton.C_CLIP_BTN, clipArr[curIdx], v4, y, v2, v2, MainMenu.C_BTN_FEATHER, 0, '', MainMenu.C_LARGE_FONT_BORDER, false, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); this.__curClip.SetMaxAlpha(100); }; gamemenu.components.ListChooser = v1; var v2 = v1.prototype; v2.FadeIn = function () { this.__prevBtn.FadeIn(); this.__curClip.FadeIn(); this.__nextBtn.FadeIn(); }; v2.FadeOut = function (destroyAfterFadeOut) { this.__prevBtn.FadeOut(destroyAfterFadeOut); this.__curClip.FadeOut(destroyAfterFadeOut); this.__nextBtn.FadeOut(destroyAfterFadeOut); }; v2.Destroy = function () { this.__prevBtn.Destroy(); this.__curClip.Destroy(); this.__nextBtn.Destroy(); }; v2.gotoPrev = function () { --this.__curClipIdx; if (this.__curClipIdx < 0) { this.__curClipIdx = this.__clipArrCnt - 1; } this.__curClip.SetSkin(this.__clipArr[this.__curClipIdx]); }; v2.gotoNext = function () { this.__curClipIdx = (this.__curClipIdx + 1) % this.__clipArrCnt; this.__curClip.SetSkin(this.__clipArr[this.__curClipIdx]); }; v2.getCurIdx = function () { return this.__curClipIdx; }; v2.setCurIdx = function (idx) { if (idx == undefined) { idx = 0; } if (idx < 0) { idx = 0; } if (idx >= this.__clipArrCnt) { idx = this.__clipArrCnt - 1; } this.__curClipIdx = idx; this.__curClip.SetSkin(this.__clipArr[this.__curClipIdx]); }; v1.EVT_CHANGE = 'EVT_CHANGE'; v2.__clipArrCnt = 0; v2.__curClipIdx = 0; v2.C_DEPTH_TYPE = LayMan.C_S_MENU; v2.C_HINT_DEPTH_TYPE = LayMan.C_S_MENU_HINTS; v2.C_PADDING = 5; ASSetPropFlags(gamemenu.components.ListChooser.prototype, null, 1); } #endinitclip } movieClip 1731 __Packages.Bonus { #initclip if (!_global.Bonus) { var v1 = function (myWorld, skyType, allowedBonusesArr) { this.__obstacleType = enums.ObstacleTypes.BONUS; this.__myWorld = myWorld; this.__myMath = (this.__myWorld.getParent()).getMyMath(); this.__allowedBonusesArray = allowedBonusesArr; this.__allowedBonusesCount = this.__allowedBonusesArray.length; this.__expirationTimer = new Timer(this.__C_EXPIRATION_TIME); this.__spawnTimer = new Timer(this.__C_SPAWN_TIME); this.__isContentRevealed = false; this.LoadClips(skyType); this.InitPlaneStateMachine(); this.UpdateStates(); this.InitPosition(); this.UpdateClipVariables(); this.__clip.onEnterFrame = mx.utils.Delegate.create(this, this.Update); this.__myWorld.addEventListener(World.EVT_GAME_PAUSED, mx.utils.Delegate.create(this, this.Pause)); }; _global.Bonus = v1; var v2 = v1.prototype; v2.LoadClips = function (skyType) { this.__clip = LayMan.RegisterClip(Const.C_BONUS_PARACHUTE_CLIP_NAME, LayMan.C_S_BKG_NEAR); enums.SkyTypes.AdjustTint(this.__clip, skyType, enums.SkyTypes.C_OBJ_COLOR_AMOUNT); this.__crateBBox = LayMan.RegisterClip(Const.C_BONUS_CRATE_BBOX_CLIP_NAME, LayMan.C_S_BKG_NEAR); this.__parachuteBBox = LayMan.RegisterClip(Const.C_BONUS_PARACHUTE_BBOX_CLIP_NAME, LayMan.C_S_BKG_NEAR); this.__clip.stop(); this.__clip._xscale = 25; this.__clip._yscale = 25; this.__crateBBox._xscale = this.__clip._xscale; this.__crateBBox._yscale = this.__clip._yscale; this.__parachuteBBox._xscale = this.__clip._xscale + 12; this.__parachuteBBox._yscale = this.__clip._yscale + 8; this.__crateBBox._visible = false; this.__parachuteBBox._visible = false; }; v2.RandomizeBonusType = function () { if (this.__allowedBonusesCount == 1) { return this.__allowedBonusesArray[0]; } var v2; var v3 = 0; var v4 = 0; var v5; var v6; v5 = new Array(); v6 = new Array(); v2 = 0; while (v2 < this.__allowedBonusesCount) { if (this.__allowedBonusesArray[v2] >= enums.BonusTypes.NUM_OF_GOOD_BONUSES) { ++v3; v6.push(this.__allowedBonusesArray[v2]); } if (this.__allowedBonusesArray[v2] < enums.BonusTypes.NUM_OF_GOOD_BONUSES) { ++v4; v5.push(this.__allowedBonusesArray[v2]); } ++v2; } if (v4 > 0 && v3 > 0) { if (Math.random() <= 1 - this.C_GET_BAD_BONUS_PROBABILITY) { return this.getRandomElementFromArray(v5, v4); } else { return this.getRandomElementFromArray(v6, v3); } } if (v4 > 0 && v3 == 0) { if (v4 == 1) { return v5[0]; } return this.getRandomElementFromArray(v5, v4); } if (v4 == 0 && v3 > 0) { if (v3 == 1) { return v6[0]; } return this.getRandomElementFromArray(v6, v3); } false; false; }; v2.getRandomElementFromArray = function (a, len) { var v1; v1 = UtilMath.getRandomNaturalNumber(0, len - 1); return a[v1]; }; v2.InitPosition = function () { this.__x = Const.C_SCENE_WIDTH * Math.random(); this.__y = -100 - 100 * Math.random(); this.__xc = this.__x; this.__yc = this.__y + this.__C_CLIP_YPOS_ADJUST; this.__rotation = 0; this.__circularAngle = 0; this.__currentBonusType = this.RandomizeBonusType(); if (this.__isContentRevealed) { this.__xRayHintTxtField._visible = true; this.SetBonusNameAndColor(this.__currentBonusType); } this.__fallingSpeed = 1; this.__active = false; this.__expired = false; this.__aborted = false; this.__boolFallingDown = false; this.__clip._visible = true; this.__clip.gotoAndStop('F_BEGIN'); this.UpdateClipVariables(); }; v2.InitPlaneStateMachine = function () { this.__TransitionCount = 0; this.__StateTransitions = new Array(); this.__StateTransitions.push(new Array()); this.__StateTransitions[this.__TransitionCount].push(enums.BonusStates.INIT); this.__StateTransitions[this.__TransitionCount].push(enums.BonusStates.PARACHUTING); ++this.__TransitionCount; this.__StateTransitions.push(new Array()); this.__StateTransitions[this.__TransitionCount].push(enums.BonusStates.PARACHUTING); this.__StateTransitions[this.__TransitionCount].push(enums.BonusStates.GROUNDTOUCH); ++this.__TransitionCount; this.__StateTransitions.push(new Array()); this.__StateTransitions[this.__TransitionCount].push(enums.BonusStates.PARACHUTING); this.__StateTransitions[this.__TransitionCount].push(enums.BonusStates.FREEFALL); ++this.__TransitionCount; this.__StateTransitions.push(new Array()); this.__StateTransitions[this.__TransitionCount].push(enums.BonusStates.PARACHUTING); this.__StateTransitions[this.__TransitionCount].push(enums.BonusStates.ACTIVATED); ++this.__TransitionCount; this.__StateTransitions.push(new Array()); this.__StateTransitions[this.__TransitionCount].push(enums.BonusStates.FREEFALL); this.__StateTransitions[this.__TransitionCount].push(enums.BonusStates.GROUNDTOUCH); ++this.__TransitionCount; this.__StateTransitions.push(new Array()); this.__StateTransitions[this.__TransitionCount].push(enums.BonusStates.FREEFALL); this.__StateTransitions[this.__TransitionCount].push(enums.BonusStates.ACTIVATED); ++this.__TransitionCount; this.__StateTransitions.push(new Array()); this.__StateTransitions[this.__TransitionCount].push(enums.BonusStates.ACTIVATED); this.__StateTransitions[this.__TransitionCount].push(enums.BonusStates.EXPIRED); ++this.__TransitionCount; this.__StateTransitions.push(new Array()); this.__StateTransitions[this.__TransitionCount].push(enums.BonusStates.EXPIRED); this.__StateTransitions[this.__TransitionCount].push(enums.BonusStates.GROUNDTOUCH); ++this.__TransitionCount; this.__StateTransitions.push(new Array()); this.__StateTransitions[this.__TransitionCount].push(enums.BonusStates.GROUNDTOUCH); this.__StateTransitions[this.__TransitionCount].push(enums.BonusStates.INIT); ++this.__TransitionCount; this.__CurrentState = enums.BonusStates.INIT; this.__PreviousState = -1; }; v2.isStateTransitionAllowed = function (oldState, newState) { var v2; v2 = 0; while (v2 < this.__TransitionCount) { if (this.__StateTransitions[v2][0] == oldState && this.__StateTransitions[v2][1] == newState) { return true; } ++v2; } return false; }; v2.ChangeState = function (newState) { if (!this.isStateTransitionAllowed(this.__CurrentState, newState)) { return undefined; } this.__PreviousState = this.__CurrentState; this.__CurrentState = newState; this.ExecActionsOfStateTransitions(); }; v2.UpdateStates = function () { switch (this.__CurrentState) { case enums.BonusStates.INIT: this.INIT_State(); break; case enums.BonusStates.PARACHUTING: this.PARACHUTING_State(); break; case enums.BonusStates.FREEFALL: this.FREEFALL_State(); break; case enums.BonusStates.ACTIVATED: this.ACTIVATED_State(); break; case enums.BonusStates.EXPIRED: this.EXPIRED_State(); break; case enums.BonusStates.GROUNDTOUCH: this.GROUNDTOUCH_State(); } }; v2.INIT_State = function () { if (this.__spawnTimer.TimeIntervalElapsed()) { this.ChangeState(enums.BonusStates.PARACHUTING); } }; v2.PARACHUTING_State = function () { this.__y += this.__fallingSpeed; this.PendulumMovement(); this.UpdateClipVariables(); if (this.__y > Const.C_SCENE_WIDTH) { this.ChangeState(enums.BonusStates.GROUNDTOUCH); } }; v2.FREEFALL_State = function () { this.__fallingSpeed += Const.C_G; this.__y += this.__fallingSpeed; if (this.__rotation > 0) { this.__rotation -= 1; } if (this.__rotation < 0) { this.__rotation += 1; } this.UpdateClipVariables(); if (this.__y > Const.C_SCENE_WIDTH) { this.ChangeState(enums.BonusStates.GROUNDTOUCH); } }; v2.ACTIVATED_State = function () { if (this.__expirationTimer.TimeIntervalElapsed()) { this.ChangeState(enums.BonusStates.EXPIRED); } }; v2.EXPIRED_State = function () { this.ChangeState(enums.BonusStates.GROUNDTOUCH); }; v2.GROUNDTOUCH_State = function () { this.ChangeState(enums.BonusStates.INIT); }; v2.ExecActionsOfStateTransitions = function () { if (this.__PreviousState == -1 && this.__CurrentState == enums.BonusStates.INIT) { this.__spawnTimer.StartTimer(); this.InitPosition(); } if (this.__PreviousState == enums.BonusStates.INIT && this.__CurrentState == enums.BonusStates.PARACHUTING) { this.InitPosition(); } if (this.__PreviousState == enums.BonusStates.PARACHUTING && this.__CurrentState == enums.BonusStates.GROUNDTOUCH) { } if (this.__PreviousState == enums.BonusStates.PARACHUTING && this.__CurrentState == enums.BonusStates.FREEFALL) { this.__clip.gotoAndPlay('F_FALL'); } if (this.__PreviousState == enums.BonusStates.PARACHUTING && this.__CurrentState == enums.BonusStates.ACTIVATED) { this.__expirationTimer.StartTimer(); this.__clip._visible = false; if (this.__isContentRevealed) { this.__crateGoodContentClip._visible = false; this.__crateBadContentClip._visible = false; this.__xRayHintTxtField._visible = false; } this.__buffedPlane.BuffMe(this.__currentBonusType); this.BuffPlaneWithBonus(); } if (this.__PreviousState == enums.BonusStates.FREEFALL && this.__CurrentState == enums.BonusStates.GROUNDTOUCH) { } if (this.__PreviousState == enums.BonusStates.FREEFALL && this.__CurrentState == enums.BonusStates.ACTIVATED) { this.__expirationTimer.StartTimer(); this.__clip._visible = false; if (this.__isContentRevealed) { this.__crateGoodContentClip._visible = false; this.__crateBadContentClip._visible = false; this.__xRayHintTxtField._visible = false; } this.__buffedPlane.BuffMe(this.__currentBonusType); this.BuffPlaneWithBonus(); } if (this.__PreviousState == enums.BonusStates.ACTIVATED && this.__CurrentState == enums.BonusStates.EXPIRED) { this.__expirationTimer.StopTimer(); this.RemoveBonusBuffFromPlane(); this.__buffedPlane.DebuffMe(); this.__buffedPlane = null; } if (this.__PreviousState == enums.BonusStates.EXPIRED && this.__CurrentState == enums.BonusStates.GROUNDTOUCH) { this.__spawnTimer.StopTimer(); } if (this.__PreviousState == enums.BonusStates.GROUNDTOUCH && this.__CurrentState == enums.BonusStates.INIT) { this.__spawnTimer.StartTimer(); this.InitPosition(); } }; v2.PendulumMovement = function () { var v3; var v2; var v4; var v5; this.__circularAngle = this.__circularAngle + 3 + 2 * Math.random(); if (this.__circularAngle >= 360) { this.__circularAngle = 0; } v2 = 0.0174532925199433 * this.__circularAngle; v3 = Math.cos(v2); this.__rotation = this.__C_MAX_ANGLE_DEVIATION * v3; }; v2.UpdateClipVariables = function () { var v2; var v3; v2 = Math.sin(0.0174532925199433 * this.__rotation); v3 = Math.cos(0.0174532925199433 * this.__rotation); this.__xc = this.__x - this.__C_CLIP_YPOS_ADJUST * v2; this.__yc = this.__y + this.__C_CLIP_YPOS_ADJUST * v3; this.__clip._x = this.__xc; this.__clip._y = this.__yc; this.__crateBBox._visible = false; this.__parachuteBBox._visible = false; this.__crateBBox._x = this.__xc - this.__C_CRATE_BBOX_YPOS_ADJUST * v2; this.__crateBBox._y = this.__yc + this.__C_CRATE_BBOX_YPOS_ADJUST * v3; this.__parachuteBBox._x = this.__xc - this.__C_PARACHUTE_BBOX_YPOS_ADJUST * v2; this.__parachuteBBox._y = this.__yc + this.__C_PARACHUTE_BBOX_YPOS_ADJUST * v3; this.__clip._rotation = this.__rotation; this.__crateBBox._rotation = this.__rotation; this.__parachuteBBox._rotation = this.__rotation; if (this.__isContentRevealed) { if (this.__isGoodContent) { this.__crateGoodContentClip._x = this.__crateBBox._x; this.__crateGoodContentClip._y = this.__crateBBox._y; this.__crateGoodContentClip._rotation = this.__crateBBox._rotation; } else { this.__crateBadContentClip._x = this.__crateBBox._x; this.__crateBadContentClip._y = this.__crateBBox._y; this.__crateBadContentClip._rotation = this.__crateBBox._rotation; } } if (this.__xRayHintTxtField != undefined) { this.__xRayHintTxtField._x = this.__x - this.__xRayHintTxtField._width * 0.5; this.__xRayHintTxtField._y = this.__y + this.C_XRAY_HINT_Y_OFFSET; } }; v2.ShowTextBonusInfo = function () { var v2; var v3; switch (this.__currentBonusType) { case enums.BonusTypes.GUN_BERSERK: v2 = 'Gun berserk'; v3 = Const.C_COLOR_GREEN; break; case enums.BonusTypes.GUN_JAM: v2 = 'Gun jam'; v3 = Const.C_COLOR_RED; break; case enums.BonusTypes.AFTERBURNER: v2 = 'Afterburner'; v3 = Const.C_COLOR_GREEN; break; case enums.BonusTypes.EXTRA_LIFE: v2 = '+1 Extra life'; v3 = Const.C_COLOR_GREEN; break; case enums.BonusTypes.ENGINE_FAILURE: v2 = 'Engine failure'; v3 = Const.C_COLOR_RED; break; case enums.BonusTypes.ENGINE_JAM: v2 = 'Engine jam'; v3 = Const.C_COLOR_RED; break; case enums.BonusTypes.SCREWCUTTER: v2 = 'Screw cutter'; v3 = Const.C_COLOR_GREEN; break; case enums.BonusTypes.DRUNKEN_PILOT: v2 = 'Drunken pilot'; v3 = Const.C_COLOR_RED; } this.PlaceBonusLabel(v2, v3); }; v2.BuffPlaneWithBonus = function () { if (this.__buffedPlane.isDamaged() && this.__currentBonusType < enums.BonusTypes.NUM_OF_GOOD_BONUSES) { this.__buffedPlane.RemoveAllDamageFromPhysicalModel(); } switch (this.__currentBonusType) { case enums.BonusTypes.GUN_BERSERK: this.__buffedPlane.SetCooldownOnWeapon(entities.weapons.Weapon.C_LOW_COOLDOWN); this.__buffedPlane.SFXPlayGoodBonus(); break; case enums.BonusTypes.GUN_JAM: this.__buffedPlane.SetCooldownOnWeapon(entities.weapons.Weapon.C_HIGH_COOLDOWN); this.__buffedPlane.SFXPlayBadBonus(); break; case enums.BonusTypes.AFTERBURNER: this.__planeVelocityBeforeAfterburner = this.__buffedPlane.getVelocity(); this.__buffedPlane.SetVelocity(this.C_AFTERBURNER_SPEED); this.__planeAgilityBeforeAfterburner = this.__buffedPlane.getRotationStep(); this.__buffedPlane.setRotationStep(this.C_AFTERBURNER_AGILITY); this.__buffedPlane.SetCollisionWithBullets(false); this.__buffedPlane.SFXPlayGoodBonus(); break; case enums.BonusTypes.EXTRA_LIFE: this.__buffedPlane.AddExtraLife(); this.__buffedPlane.SFXPlayGoodBonus(); break; case enums.BonusTypes.ENGINE_FAILURE: this.__buffedPlane.SetVelocity(this.__buffedPlane.getCMinVelocity() + 0.5); this.__buffedPlane.SFXPlayBadBonus(); break; case enums.BonusTypes.ENGINE_JAM: this.__buffedPlane.SetVelocity(this.__buffedPlane.getCMinVelocity()); this.__buffedPlane.SFXPlayBadBonus(); break; case enums.BonusTypes.SCREWCUTTER: this.__buffedPlane.SetScrewCutterMode(true); this.__buffedPlane.SFXPlayGoodBonus(); break; case enums.BonusTypes.DRUNKEN_PILOT: this.__buffedPlane.SetDrunkenPilotMode(true); this.__buffedPlane.SFXPlayBadBonus(); } this.ShowTextBonusInfo(); }; v2.RemoveBonusBuffFromPlane = function () { switch (this.__currentBonusType) { case enums.BonusTypes.GUN_BERSERK: this.__buffedPlane.SetCooldownOnWeapon(entities.weapons.Weapon.C_ADJUST_TO_CURRENT_DAMAGE); break; case enums.BonusTypes.GUN_JAM: this.__buffedPlane.SetCooldownOnWeapon(entities.weapons.Weapon.C_ADJUST_TO_CURRENT_DAMAGE); break; case enums.BonusTypes.AFTERBURNER: this.__buffedPlane.SetVelocity(this.__buffedPlane.getCNormalVelocity()); this.__buffedPlane.SetCollisionWithBullets(true); this.__buffedPlane.setVelocity(this.__planeVelocityBeforeAfterburner); this.__buffedPlane.setRotationStep(this.__planeAgilityBeforeAfterburner); break; case enums.BonusTypes.SCREWCUTTER: this.__buffedPlane.SetScrewCutterMode(false); break; case enums.BonusTypes.DRUNKEN_PILOT: this.__buffedPlane.SetDrunkenPilotMode(false); } }; v2.GetBonusCrateBBoxClip = function () { return this.__crateBBox; }; v2.GetBonusParachuteBBoxClip = function () { return this.__parachuteBBox; }; v2.Update = function () { this.UpdateStates(); }; v2.isBonusActive = function () { return this.__active; }; v2.isBonusExpired = function () { return this.__expired; }; v2.GetBonusType = function () { return this.__currentBonusType; }; v2.ChangeToFreeFall = function () { if (this.__CurrentState == enums.BonusStates.PARACHUTING) { this.ChangeState(enums.BonusStates.FREEFALL); } }; v2.ChangeToActivated = function (planeWithBonus) { if (this.__CurrentState == enums.BonusStates.PARACHUTING || this.__CurrentState == enums.BonusStates.FREEFALL) { this.__buffedPlane = planeWithBonus; this.ChangeState(enums.BonusStates.ACTIVATED); } }; v2.ChangeToExpired = function () { if (this.__CurrentState == enums.BonusStates.ACTIVATED) { this.ChangeState(enums.BonusStates.EXPIRED); } }; v2.GetBonusCurrentState = function () { return this.__CurrentState; }; v2.GetPosX = function () { return this.__xc; }; v2.GetPosY = function () { return this.__yc; }; v2.GetCratePosX = function () { return this.__crateBBox._x; }; v2.getInArenaCratePosX = function () { return this.__crateBBox._x; }; v2.GetCratePosY = function () { return this.__crateBBox._y; }; v2.PlaceBonusLabel = function (txt, color) { var v2; v2 = this.__myWorld.__flyLabels.PlaceLabel(this.__buffedPlane.getXPos(), this.__buffedPlane.getYPos() - 70 * Math.random(), txt); FlyLabels.SetLabelColor(v2, color); FlyLabels.SetLabelFormat(v2, FlyLabels.C_FNT_SIZE_BONUS_INFO, undefined, undefined); }; v2.Destroy = function () { LayMan.RemoveClip(this.__clip); LayMan.RemoveClip(this.__crateBBox); LayMan.RemoveClip(this.__parachuteBBox); LayMan.RemoveClip(this.__crateGoodContentClip); LayMan.RemoveClip(this.__crateBadContentClip); LayMan.RemoveTextField(this.__xRayHintTxtField); }; v2.Scroll = function (scrollCoef, xDiff, yDiff) { this.__x += Math.round(scrollCoef * xDiff, 2); this.__y += Math.round(scrollCoef * yDiff, 2); this.__xc += Math.round(scrollCoef * xDiff, 2); this.__yc += Math.round(scrollCoef * yDiff, 2); LayMan.ScrollClip(this.__clip, scrollCoef, xDiff, yDiff); LayMan.ScrollClip(this.__crateBBox, scrollCoef, xDiff, yDiff); LayMan.ScrollClip(this.__parachuteBBox, scrollCoef, xDiff, yDiff); }; v2.ShowBonusContentXRay = function () { this.__isContentRevealed = true; if (this.__xRayHintTxtField == undefined) { this.__xRayHintTxtField = LayMan.CreateTextField(this.__x, this.__y, 80, 30, LayMan.C_S_OTHER); this.__xRayHintTxtField.selectable = false; this.__xRayHintTxtField.multiline = false; this.__xRayHintTxtField.autoSize = true; this.__xRayHintFormat = new TextFormat(); this.__xRayHintFormat.bold = true; this.__xRayHintFormat.size = 15; this.__xRayHintFormat.color = 0; this.__xRayHintFormat.align = 'center'; this.__xRayHintFormat.font = 'fntFrutiger'; this.__xRayHintTxtField.setTextFormat(this.__xRayHintFormat); this.__crateGoodContentClip = LayMan.RegisterClip(Const.C_BONUS_CRATE_GOOD_CLIP_NAME, LayMan.C_S_BKG_NEAR); this.__crateGoodContentClip._xscale = this.__clip._xscale; this.__crateGoodContentClip._yscale = this.__clip._yscale; this.__crateGoodContentClip._visible = false; this.__crateBadContentClip = LayMan.RegisterClip(Const.C_BONUS_CRATE_BAD_CLIP_NAME, LayMan.C_S_BKG_NEAR); this.__crateBadContentClip._xscale = this.__clip._xscale; this.__crateBadContentClip._yscale = this.__clip._yscale; this.__crateBadContentClip._visible = false; this.SetBonusNameAndColor(this.__currentBonusType); } }; v2.SetXRayHintColor = function (color) { if (this.__xRayHintTxtField == undefined) { return undefined; } this.__xRayHintFormat.color = color; this.__xRayHintTxtField.setTextFormat(this.__xRayHintFormat); }; v2.SetXRayHintLabel = function (txt) { if (this.__xRayHintTxtField == undefined) { return undefined; } this.__xRayHintTxtField.text = txt; this.__xRayHintTxtField.setTextFormat(this.__xRayHintFormat); }; v2.SetBonusNameAndColor = function (bonusTypeId) { var v3; v3 = String(enums.BonusTypes.getInfo(bonusTypeId, enums.BonusTypes.C_INFO_NAME)); this.SetXRayHintLabel(v3); var v2; v2 = Boolean(enums.BonusTypes.getInfo(bonusTypeId, enums.BonusTypes.C_INFO_IS_GOOD)); this.__isGoodContent = v2; if (v2) { this.__crateGoodContentClip._visible = true; this.__crateBadContentClip._visible = false; this.SetXRayHintColor(this.C_COLOR_GOOD); } else { this.__crateGoodContentClip._visible = false; this.__crateBadContentClip._visible = true; this.SetXRayHintColor(this.C_COLOR_BAD); } }; v2.Pause = function (evtObj) { if (evtObj.state == true) { if (this.__clip._visible) { this.__clip.onEnterFrame = undefined; } } else { if (this.__clip._visible) { this.__clip.onEnterFrame = mx.utils.Delegate.create(this, this.Update); } } }; v2.isCatchable = function () { if (this.__CurrentState == enums.BonusStates.PARACHUTING || this.__CurrentState == enums.BonusStates.FREEFALL) { return true; } else { return false; } }; v2.getObstacleType = function () { return this.__obstacleType; }; v2.C_AFTERBURNER_SPEED = 6; v2.C_AFTERBURNER_AGILITY = 5; v2.C_GET_BAD_BONUS_PROBABILITY = 0.2; v2.__C_MAX_ANGLE_DEVIATION = 30; v2.__C_CLIP_YPOS_ADJUST = 40; v2.__C_CRATE_BBOX_YPOS_ADJUST = 22; v2.__C_PARACHUTE_BBOX_YPOS_ADJUST = -15; v2.__C_EXPIRATION_TIME = 10000; v2.__C_SPAWN_TIME = 10000; v2.C_XRAY_HINT_Y_OFFSET = -20; v2.C_COLOR_GOOD = Const.C_COLOR_GREEN; v2.C_COLOR_BAD = Const.C_COLOR_RED; ASSetPropFlags(_global.Bonus.prototype, null, 1); } #endinitclip } movieClip 1732 __Packages.enums.BonusStates { #initclip if (!_global.enums) { _global.enums = new Object(); } if (!_global.enums.BonusStates) { var v1 = function () {}; enums.BonusStates = v1; var v2 = v1.prototype; v1.INIT = 0; v1.PARACHUTING = 1; v1.FREEFALL = 2; v1.ACTIVATED = 3; v1.EXPIRED = 4; v1.GROUNDTOUCH = 5; v1.END = 6; ASSetPropFlags(enums.BonusStates.prototype, null, 1); } #endinitclip } movieClip 1733 __Packages.entities.projectiles.ProjectileInterface { #initclip if (!_global.entities) { _global.entities = new Object(); } if (!_global.entities.projectiles) { _global.entities.projectiles = new Object(); } if (!_global.entities.projectiles.ProjectileInterface) { _global.entities.projectiles.ProjectileInterface = function () {}; } #endinitclip } movieClip 1734 __Packages.entities.weapons.Weapon { #initclip if (!_global.entities) { _global.entities = new Object(); } if (!_global.entities.weapons) { _global.entities.weapons = new Object(); } if (!_global.entities.weapons.Weapon) { var v1 = function (itemId, order, parentPlane, myWorld, firepowerCoefAttribute, skyType) { this.__itemId = itemId; this.__wpnOrder = order; var v3; var v4; v3 = String(enums.ItemTypes.getItemInfo(itemId, enums.ItemTypes.CLASS)); v4 = String(enums.ItemTypes.getItemInfo(itemId, enums.ItemTypes.NAME)); this.__parentPlane = parentPlane; this.__semaphorePosOffsetY = (this.__parentPlane.getClip())._height / 2; this.__semaphoreMaxPosOffsetY = (this.__parentPlane.getClip())._width / 2; this.__SFX = this.__parentPlane.getSFXObject(); this.__myWorld = myWorld; if (!(v3 == enums.ItemTypes.CLASS_PRIMARY_WEAPON || v3 == enums.ItemTypes.CLASS_SECONDARY_WEAPON)) { return undefined; } if (v3 == enums.ItemTypes.CLASS_PRIMARY_WEAPON) { this.__weaponType = entities.weapons.Weapon.C_PRIMARY; } if (v3 == enums.ItemTypes.CLASS_SECONDARY_WEAPON) { this.__weaponType = entities.weapons.Weapon.C_SECONDARY; } this.__firepowerCoefAttribute = firepowerCoefAttribute; this.__minDamage = Number(enums.ItemTypes.getItemInfo(itemId, enums.ItemTypes.MIN_DAMAGE)); this.__maxDamage = Number(enums.ItemTypes.getItemInfo(itemId, enums.ItemTypes.MAX_DAMAGE)); this.__defaultCooldown = Number(enums.ItemTypes.getItemInfo(itemId, enums.ItemTypes.COOLDOWN)) * 1000; this.InitCooldown(this.__itemId); this.__cooldownTimer = new Timer(this.__cooldown); this.__maxProjectilesCount = Number(enums.ItemTypes.getItemInfo(itemId, enums.ItemTypes.MAX_PROJ_CNT)); this.CreateProjectilesArray(itemId, parentPlane, myWorld, skyType); this.InitCooldownSemaphore(); this.__syncEmptyClip = LayMan.RegisterEmptyClip('', LayMan.C_S_OTHER); this.__syncEmptyClip.onEnterFrame = mx.utils.Delegate.create(this, this.Update); this.Init(); }; entities.weapons.Weapon = v1; var v2 = v1.prototype; _global.entities.weapons.Weapon implements _global.entities.projectiles.ProjectileInterface; v2.Init = function () { this.__curProjectileIdx = 0; this.__collidingProjectileIdx = -1; this.InitCooldown(this.__itemId); this.__cooldownTimer.StartTimer(); }; v2.Fire = function (planePosX, planePosY, planeDir, planeVelocity) { if (!this.__parentPlane.isFireControlEnabled()) { return false; } if (this.__projectilesArray[this.__curProjectileIdx].isMoving()) { return false; } if (this.__cooldownTimer.TimeIntervalElapsed()) { this.__cooldownTimer.StartTimer(); this.__projectilesArray[this.__curProjectileIdx].Fire(planePosX, planePosY, planeDir, planeVelocity); this.__curProjectileIdx = (this.__curProjectileIdx + 1) % this.__maxProjectilesCount; this.UpdateCDSemColor(); return true; } return false; }; v2.Move = function () {}; v2.isCollision = function (clipToCollideWith) { var v2; v2 = 0; while (v2 < this.__maxProjectilesCount) { var v3; v3 = this.__projectilesArray[v2]; if (v3.isMoving()) { if (v3.isCollision(clipToCollideWith)) { this.__collidingProjectileIdx = v2; return true; } } ++v2; } return false; }; v2.getDamageTypeCausedArray = function (planeX, planeY, planeDir) { var v2; v2 = this.__projectilesArray[this.__collidingProjectileIdx].getDamageTypeCausedArray(planeX, planeY, planeDir); this.__collidingProjectileIdx = -1; return v2; }; v2.Destroy = function () { var v2; v2 = 0; while (v2 < this.__maxProjectilesCount) { this.__projectilesArray[v2].Destroy(); ++v2; } LayMan.RemoveClip(this.__coolDownSemaphore); LayMan.RemoveClip(this.__syncEmptyClip); }; v2.Scroll = function (scrollCoef, xDiff, yDiff) { var v2; v2 = 0; while (v2 < this.__maxProjectilesCount) { this.__projectilesArray[v2].Scroll(scrollCoef, xDiff, yDiff); ++v2; } }; v2.isPrimary = function () { if (this.__weaponType == entities.weapons.Weapon.C_PRIMARY) { return true; } else { return false; } }; v2.isSecondary = function () { if (this.__weaponType == entities.weapons.Weapon.C_SECONDARY) { return true; } else { return false; } }; v2.SetCooldownOnWeapon = function (cooldownType, howMany) { switch (cooldownType) { case entities.weapons.Weapon.C_NORMAL_COOLDOWN: if (this.__itemId == enums.ItemTypes.ACOUSTIC_RIFLE || this.__itemId == enums.ItemTypes.NUKE) { this.__cooldown = this.__defaultCooldown; } else { this.__cooldown = this.__defaultCooldown * this.__firepowerCoefAttribute; } break; case entities.weapons.Weapon.C_LOW_COOLDOWN: this.__cooldown = this.__defaultCooldown * PlaneConfig.C_COOLDOWN_COEF_STEPS[0] * entities.weapons.Weapon.C_COOLDOWN_LOWERING_COEF; break; case entities.weapons.Weapon.C_HIGH_COOLDOWN: this.__cooldown = this.__defaultCooldown * PlaneConfig.C_COOLDOWN_COEF_STEPS[0] * entities.weapons.Weapon.C_COOLDOWN_LENGTHEN_COEF; break; case entities.weapons.Weapon.C_INCREASE_COOLDOWN: this.__cooldown = this.__cooldown * entities.weapons.Weapon.C_COOLDOWN_INCREASE_COEF * howMany; break; case entities.weapons.Weapon.C_DECREASE_COOLDOWN: this.__cooldown /= Math.pow(entities.weapons.Weapon.C_COOLDOWN_INCREASE_COEF, howMany); break; case entities.weapons.Weapon.C_ADJUST_TO_CURRENT_DAMAGE: this.__cooldown = this.__defaultCooldown * this.__firepowerCoefAttribute * Math.pow(entities.weapons.Weapon.C_COOLDOWN_INCREASE_COEF, howMany); } this.__cooldownTimer.SetTriggerTime(this.__cooldown); this.UpdateCDSemColor(); }; v2.getItemId = function () { return this.__itemId; }; v2.getCollidedProjectilePosX = function () { if (this.__collidingProjectileIdx == -1) { return 50; } else { return this.__projectilesArray[this.__collidingProjectileIdx].__x; } }; v2.getCollidedProjectilePosY = function () { if (this.__collidingProjectileIdx == -1) { return 50; } else { return this.__projectilesArray[this.__collidingProjectileIdx].__y; } }; v2.getMinDamage = function () { return this.__minDamage; }; v2.getMaxDamage = function () { return this.__maxDamage; }; v2.DeflectProjectiles = function (countToDeflect, radius, planeToDeflectOn) { var v2; var v6 = 0; var v8; var v7; var v9; var v3; v3 = new Vector2D(0, 0); var v4 = this.__projectilesArray; v2 = 0; while (v2 < this.__maxProjectilesCount) { if (v4[v2].__isMoving) { v8 = v4[v2].__x; v7 = v4[v2].__y; if (!(Math.abs(v8 - planeToDeflectOn.__x) < Const.C_HITTEST_COMPUTE_DISTANCE && Math.abs(v7 - planeToDeflectOn.__y) < Const.C_HITTEST_COMPUTE_DISTANCE)) { } else { v3.setXY(v8, v7); v3.SubXY(planeToDeflectOn.getXPos(), planeToDeflectOn.getYPos()); v9 = v3.Length(); if (v9 < radius) { v3.Normalize(); v3.AddXY(v4[v2].getDirX(), v4[v2].getDirY()); v3.Normalize(); v4[v2].setDirXY(v3.__x, v3.__y); v4[v2].Move(); ++v6; if (v6 >= countToDeflect) { return v6; } } } } ++v2; } return v6; }; v2.UpgradeWeapon = function () { switch (this.__itemId) { case enums.ItemTypes.HOMING_MISSILES: var v2; v2 = 0; while (v2 < this.__maxProjectilesCount) { this.__projectilesArray[v2].UpgradeWillToSeek(); ++v2; } break; case enums.ItemTypes.MACHINE_GUN: this.UpgradeProjectileWeapon(); break; case enums.ItemTypes.TWIN_MACHINE_GUN: this.UpgradeProjectileWeapon(); break; case enums.ItemTypes.TAIL_GUN: this.UpgradeProjectileWeapon(); break; case enums.ItemTypes.BURST_GUN: this.UpgradeProjectileWeapon(); break; case enums.ItemTypes.IMPACT_BOMBS: var v2 = 0; while (v2 < this.__maxProjectilesCount) { this.__projectilesArray[v2].UpgradeProximityRange(); ++v2; } } }; v2.UpgradeProjectileWeapon = function () { var v2; v2 = 0; while (v2 < this.__maxProjectilesCount) { this.__projectilesArray[v2].UpgradeRangeAndProjectileSpeed(); ++v2; } }; v2.CreateProjectilesArray = function (itemId, parentPlane, myWorld, skyType) { this.__projectilesArray = new Array(); var v6; var v2; v6 = 0; while (v6 < this.__maxProjectilesCount) { switch (itemId) { case enums.ItemTypes.MACHINE_GUN: v2 = new entities.projectiles.GunBurst(0, 0, 0, undefined, parentPlane, myWorld, this, skyType); this.__projectilesArray.push(entities.projectiles.GunBurst(v2)); break; case enums.ItemTypes.TAIL_GUN: v2 = new entities.projectiles.TailGunBurst(0, 0, 0, undefined, parentPlane, myWorld, this, skyType); this.__projectilesArray.push(entities.projectiles.TailGunBurst(v2)); break; case enums.ItemTypes.TWIN_MACHINE_GUN: v2 = new entities.projectiles.TwinGunBurst(0, 0, 0, undefined, parentPlane, myWorld, this, skyType); this.__projectilesArray.push(entities.projectiles.TwinGunBurst(v2)); break; case enums.ItemTypes.BURST_GUN: v2 = new entities.projectiles.BurstGunBurst(0, 0, 0, undefined, parentPlane, myWorld, this, skyType); this.__projectilesArray.push(entities.projectiles.BurstGunBurst(v2)); break; case enums.ItemTypes.ACOUSTIC_RIFLE: v2 = new entities.projectiles.AcousticRifle(0, 0, 0, undefined, parentPlane, myWorld, this, skyType); this.__projectilesArray.push(entities.projectiles.AcousticRifle(v2)); break; case enums.ItemTypes.MALICIOUS_PARACHUTE: v2 = new entities.projectiles.MaliciousParachute(0, 0, 0, undefined, parentPlane, myWorld, this, skyType); this.__projectilesArray.push(entities.projectiles.MaliciousParachute(v2)); break; case enums.ItemTypes.IMPACT_BOMBS: v2 = new entities.projectiles.ImpactBomb(0, 0, 0, undefined, parentPlane, myWorld, this, skyType); this.__projectilesArray.push(entities.projectiles.ImpactBomb(v2)); break; case enums.ItemTypes.HOMING_MISSILES: v2 = new entities.projectiles.HomingMissile(0, 0, 0, undefined, parentPlane, myWorld, this, skyType); this.__projectilesArray.push(entities.projectiles.HomingMissile(v2)); break; case enums.ItemTypes.EMP_DISRUPTOR: v2 = new entities.projectiles.EmpDisruptor(0, 0, 0, undefined, parentPlane, myWorld, this, skyType); this.__projectilesArray.push(entities.projectiles.EmpDisruptor(v2)); break; case enums.ItemTypes.NUKE: v2 = new entities.projectiles.Nuke(0, 0, 0, undefined, parentPlane, myWorld, this, skyType); this.__projectilesArray.push(entities.projectiles.Nuke(v2)); } ++v6; } }; v2.PlayFireSound = function () { this.__SFX.PlayMachineGun(); }; v2.InitCooldownSemaphore = function () { if (this.__parentPlane.isAIControlled()) { return undefined; } this.__coolDownSemaphore = LayMan.RegisterClip('S_WPN_COOLDOWN_SEMAPHORE', LayMan.C_S_COLLIDE_NEAR); this.__coolDownSemaphore.gotoAndStop(this.C_SEM_RED); var v2; if (this.__weaponType == entities.weapons.Weapon.C_PRIMARY) { this.__semaphorePosOffsetX += 0; } else { this.__semaphorePosOffsetX += this.__coolDownSemaphore._width + 1; } this.__semaphorePosOffsetY += this.__wpnOrder * (1 + this.__coolDownSemaphore._height); }; v2.SetSemaphoreColor = function (colorFrame) { this.__coolDownSemaphore.gotoAndStop(colorFrame); }; v2.Update = function () { this.__coolDownSemaphore._x = this.__parentPlane.__x; this.__coolDownSemaphore._x += this.__semaphorePosOffsetX; this.__coolDownSemaphore._y = this.__parentPlane.__y - 20; this.__coolDownSemaphore._y += this.__semaphorePosOffsetY; this.__coolDownSemaphore._y += this.__semaphoreMaxPosOffsetY * Math.abs(this.__parentPlane.getDirectionY()); if (FrameMan.__frm % 10 == 0) { this.UpdateCDSemColor(); } }; v2.UpdateCDSemColor = function () { var v2; v2 = this.__cooldownTimer.GetTimerRelativePosition(); if (this.__coolDownSemaphore._currentframe != this.C_SEM_RED && v2 < 0.6) { this.SetSemaphoreColor(this.C_SEM_RED); } if (this.__coolDownSemaphore._currentframe != this.C_SEM_ORANGE && v2 >= 0.6 && v2 < 1) { this.SetSemaphoreColor(this.C_SEM_ORANGE); } if (this.__coolDownSemaphore._currentframe != this.C_SEM_GREEN && v2 >= 1) { this.SetSemaphoreColor(this.C_SEM_GREEN); } }; v2.ShowHideSemaphore = function (isShowed) { this.__coolDownSemaphore._visible = isShowed; }; v2.isReadyToFire = function () { if (this.__cooldownTimer.TimeIntervalElapsed()) { return true; } else { return false; } }; v2.InitCooldown = function (itemId) { if (itemId == enums.ItemTypes.ACOUSTIC_RIFLE || itemId == enums.ItemTypes.NUKE) { this.__cooldown = this.__defaultCooldown; return undefined; } else { this.__cooldown = this.__defaultCooldown * this.__firepowerCoefAttribute; } }; v2.getParentPlane = function () { return this.__parentPlane; }; v1.C_DONT_WRAP_PROJECTILES = true; v1.C_PRIMARY = 1; v1.C_SECONDARY = 2; v1.C_NORMAL_COOLDOWN = 0; v1.C_LOW_COOLDOWN = 1; v1.C_HIGH_COOLDOWN = 2; v1.C_INCREASE_COOLDOWN = 3; v1.C_DECREASE_COOLDOWN = 4; v1.C_ADJUST_TO_CURRENT_DAMAGE = 5; v1.C_COOLDOWN_INCREASE_COEF = 1.1; v1.C_COOLDOWN_LOWERING_COEF = 0.1; v1.C_COOLDOWN_LENGTHEN_COEF = 5; v2.C_SEM_RED = 'F_RED'; v2.C_SEM_ORANGE = 'F_ORANGE'; v2.C_SEM_GREEN = 'F_GREEN'; v2.__maxProjectilesCount = 20; v2.__curProjectileIdx = 0; v2.__collidingProjectileIdx = -1; v2.C_DEF_SEMAPHORE_POS_Y = 500; v2.__semaphorePosOffsetX = -5; v2.__semaphorePosOffsetY = 15; v2.__semaphoreMaxPosOffsetY = 20; v2.__oldTimerRelPos = 0; ASSetPropFlags(entities.weapons.Weapon.prototype, null, 1); } #endinitclip } movieClip 1735 __Packages.SoundFX { #initclip if (!_global.SoundFX) { var v1 = function () { this.__emptyClips = new Array(); this.refreshCounter = 0; this.refreshModReached = true; this.LoadAllSounds(); }; _global.SoundFX = v1; var v2 = v1.prototype; v2.LoadAllSounds = function () { this.__sndDopplerDown = this.RegisterSound(Const.C_DOPPLER_DOWN_SND); this.__sndDopplerUp = this.RegisterSound(Const.C_DOPPLER_UP_SND); this.__sndEngineBreakdown = this.RegisterSound(Const.C_ENGINE_BREAKDOWN_SND); this.__sndEngineStart = this.RegisterSound(Const.C_ENGINE_START_SND); this.__sndEngineRestart = this.RegisterSound(Const.C_ENGINE_RESTART_SND); this.__sndExplosion_1 = this.RegisterSound(Const.C_EXPLOSION_1_SND); this.__sndExplosion_2 = this.RegisterSound(Const.C_EXPLOSION_2_SND); this.__sndExplosion_3 = this.RegisterSound(Const.C_EXPLOSION_3_SND); this.__sndExplosion_4 = this.RegisterSound(Const.C_EXPLOSION_4_SND); this.__sndFallingDopplerParabolic = this.RegisterSound(Const.C_FALLING_DOPPLER_SND); this.__sndBadBonus = this.RegisterSound(Const.C_BAD_BONUS_SND); this.__sndGoodBonus = this.RegisterSound(Const.C_GOOD_BONUS_SND); this.__sndMachineGun = this.RegisterSound(Const.C_MACHINE_GUN_SND); this.__sndBulletHitDamage = this.RegisterSound(Const.C_BULLET_HIT_DAMAGE_SND); this.__sndBulletHitDamage2 = this.RegisterSound(Const.C_BULLET_HIT_DAMAGE_2_SND); this.__sndBulletHitDamage3 = this.RegisterSound(Const.C_BULLET_HIT_DAMAGE_3_SND); this.__sndAfterburnerWindBlow = this.RegisterSound(Const.C_AFTERBURNER_WIND_BLOW_SND); this.__sndDivePlane = this.RegisterSound(Const.C_DIVE_PLANE_SND); this.__sndDivePlaneOut = this.RegisterSound(Const.C_DIVE_PLANE_OUT_SND); this.__sndFallingDopplerFreefall = this.RegisterSound(Const.C_FALLING_DOPPLER_FREEFALL_SND); this.__sndDoubleKill = this.RegisterSound(Const.C_DOUBLE_KILL_SND); this.__sndTripleKill = this.RegisterSound(Const.C_TRIPLE_KILL_SND); this.__sndBurningScrew = this.RegisterSound(Const.C_BURNING_SCREW_SND); this.__sndMagneticDeflectorOn = this.RegisterSound(Const.C_MAGNETIC_DEFLECTOR_ON_SND); this.__sndMagneticDeflection = this.RegisterSound(Const.C_MEGNETIC_DEFLECTION_SND); this.__sndHomingMissileDrop = this.RegisterSound(Const.C_HOMING_MISSILE_DROP_SND); this.__sndBombDrop = this.RegisterSound(Const.C_BOMB_DROP_SND); this.__sndParachuteDrop = this.RegisterSound(Const.C_PARACHUTE_DROP_SND); this.__sndEMPDisruptorOn = this.RegisterSound(Const.C_EMP_DISRUPTOR_ON_SND); this.__sndEMPDisruptorHit = this.RegisterSound(Const.C_EMP_DISRUPTOR_HIT_SND); this.__sndAcousticRifleOn = this.RegisterSound(Const.C_ACOUSTIC_RIFLE_ON_SND); this.__sndAcousticRifleHit = this.RegisterSound(Const.C_ACOUSTIC_RIFLE_HIT_SND); }; v2.PlayDopplerDown = function () { if (!_global.GameConf.isSoundFXEnabled()) { return undefined; } if (this.refreshModReached && (this.__sndDopplerDown.position == 0 || this.__sndDopplerDown.position == this.__sndDopplerDown.duration)) { this.__sndDopplerDown.start(); } }; v2.PlayDopplerUp = function () { if (!_global.GameConf.isSoundFXEnabled()) { return undefined; } if (this.refreshModReached && (this.__sndDopplerUp.position == 0 || this.__sndDopplerUp.position == this.__sndDopplerUp.duration)) { this.__sndDopplerUp.start(); } }; v2.PlayEngineBreakdown = function () { if (!_global.GameConf.isSoundFXEnabled()) { return undefined; } this.__sndEngineBreakdown.start(); }; v2.PlayEngineStart = function () { if (!_global.GameConf.isSoundFXEnabled()) { return undefined; } this.__sndEngineStart.start(); }; v2.PlayEngineRestart = function () { if (!_global.GameConf.isSoundFXEnabled()) { return undefined; } this.__sndEngineRestart.start(); }; v2.PlayExplosion = function () { if (!_global.GameConf.isSoundFXEnabled()) { return undefined; } var v3; v3 = UtilMath.getRandomNaturalNumber(0, 3); switch (v3) { case 0: this.__sndExplosion_1.start(); break; case 1: this.__sndExplosion_2.start(); break; case 2: this.__sndExplosion_3.start(); break; case 3: this.__sndExplosion_4.start(); } }; v2.PlayFallingDopplerParabolic = function () { if (!_global.GameConf.isSoundFXEnabled()) { return undefined; } if (this.__sndFallingDopplerParabolic.position == 0) { this.__sndFallingDopplerParabolic.start(); } }; v2.StopFallingDopplerParabolic = function () { if (!_global.GameConf.isSoundFXEnabled()) { return undefined; } if (this.__sndFallingDopplerParabolic.position != 0) { this.__sndFallingDopplerParabolic.stop(Const.C_FALLING_DOPPLER_SND); } }; v2.PlayBadBonus = function () { if (!_global.GameConf.isSoundFXEnabled()) { return undefined; } this.__sndBadBonus.start(); }; v2.PlayGoodBonus = function () { if (!_global.GameConf.isSoundFXEnabled()) { return undefined; } this.__sndGoodBonus.start(); }; v2.PlayMachineGun = function () { if (!_global.GameConf.isSoundFXEnabled()) { return undefined; } this.__sndMachineGun.start(); }; v2.PlayBulletHitDamage = function () { if (!_global.GameConf.isSoundFXEnabled()) { return undefined; } var v3; v3 = UtilMath.getRandomNaturalNumber(0, 2); switch (v3) { case 0: this.__sndBulletHitDamage.start(); break; case 1: this.__sndBulletHitDamage2.start(); break; case 2: this.__sndBulletHitDamage3.start(); } }; v2.FrameCounterRefresh = function () { this.refreshCounter += 1; if (this.refreshCounter % this.C_REFRESH_COUNTER_MAX == 0) { this.refreshModReached = true; } if (this.refreshCounter % this.C_REFRESH_COUNTER_MAX == 1) { this.refreshModReached = false; } }; v2.PlayAfterburnerWindBlow = function () { if (!_global.GameConf.isSoundFXEnabled()) { return undefined; } this.__sndAfterburnerWindBlow.start(0, 999); }; v2.StopAfterburnerWindBlow = function () { if (!_global.GameConf.isSoundFXEnabled()) { return undefined; } this.__sndAfterburnerWindBlow.stop(Const.C_AFTERBURNER_WIND_BLOW_SND); }; v2.PlayDivePlane = function () { if (!_global.GameConf.isSoundFXEnabled()) { return undefined; } this.__sndDivePlane.start(); }; v2.StopDivePlane = function () { if (!_global.GameConf.isSoundFXEnabled()) { return undefined; } var v3; v3 = this.__sndDivePlane.position / this.__sndDivePlane.duration; if (v3 >= 0.3) { this.__sndDivePlane.stop(Const.C_DIVE_PLANE_SND); this.__sndDivePlaneOut.start(); } this.__sndDivePlane.stop(Const.C_DIVE_PLANE_SND); }; v2.PlayFallingDopplerFreefall = function () { if (!_global.GameConf.isSoundFXEnabled()) { return undefined; } if (this.__sndFallingDopplerFreefall.position == 0) { this.__sndFallingDopplerFreefall.start(); } }; v2.StopFallingDopplerFreefall = function () { if (!_global.GameConf.isSoundFXEnabled()) { return undefined; } this.__sndFallingDopplerFreefall.stop(Const.C_FALLING_DOPPLER_FREEFALL_SND); }; v2.PlayDoubleKill = function () { if (!_global.GameConf.isSoundFXEnabled()) { return undefined; } this.__sndDoubleKill.start(); }; v2.PlayTripleKill = function () { if (!_global.GameConf.isSoundFXEnabled()) { return undefined; } this.__sndTripleKill.start(); }; v2.PlayBurningScrew = function () { if (!_global.GameConf.isSoundFXEnabled()) { return undefined; } this.__sndBurningScrew.start(0, 999); }; v2.StopBurningScrew = function () { if (!_global.GameConf.isSoundFXEnabled()) { return undefined; } this.__sndBurningScrew.stop(Const.C_BURNING_SCREW_SND); }; v2.StopAllSoundFX = function () { this.__sndBadBonus.stop(Const.C_BAD_BONUS_SND); this.__sndDopplerDown.stop(Const.C_DOPPLER_DOWN_SND); this.__sndDopplerUp.stop(Const.C_DOPPLER_UP_SND); this.__sndEngineBreakdown.stop(Const.C_ENGINE_BREAKDOWN_SND); this.__sndEngineStart.stop(Const.C_ENGINE_START_SND); this.__sndEngineRestart.stop(Const.C_ENGINE_RESTART_SND); this.__sndExplosion_1.stop(Const.C_EXPLOSION_1_SND); this.__sndExplosion_2.stop(Const.C_EXPLOSION_2_SND); this.__sndExplosion_3.stop(Const.C_EXPLOSION_3_SND); this.__sndExplosion_4.stop(Const.C_EXPLOSION_4_SND); this.__sndFallingDopplerParabolic.stop(Const.C_FALLING_DOPPLER_SND); this.__sndGoodBonus.stop(Const.C_GOOD_BONUS_SND); this.__sndMachineGun.stop(Const.C_BAD_BONUS_SND); this.__sndBulletHitDamage.stop(Const.C_BULLET_HIT_DAMAGE_SND); this.__sndBulletHitDamage2.stop(Const.C_BULLET_HIT_DAMAGE_2_SND); this.__sndBulletHitDamage3.stop(Const.C_BULLET_HIT_DAMAGE_3_SND); this.__sndAfterburnerWindBlow.stop(Const.C_AFTERBURNER_WIND_BLOW_SND); this.__sndDivePlane.stop(Const.C_DIVE_PLANE_SND); this.__sndDivePlaneOut.stop(Const.C_DIVE_PLANE_OUT_SND); this.__sndFallingDopplerFreefall.stop(Const.C_FALLING_DOPPLER_FREEFALL_SND); this.__sndDoubleKill.stop(Const.C_DOUBLE_KILL_SND); this.__sndTripleKill.stop(Const.C_TRIPLE_KILL_SND); this.__sndBurningScrew.stop(Const.C_BURNING_SCREW_SND); this.__sndMagneticDeflectorOn.stop(Const.C_MAGNETIC_DEFLECTOR_ON_SND); this.__sndMagneticDeflection.stop(Const.C_MEGNETIC_DEFLECTION_SND); this.__sndHomingMissileDrop.stop(Const.C_HOMING_MISSILE_DROP_SND); this.__sndBombDrop.stop(Const.C_BOMB_DROP_SND); this.__sndParachuteDrop.stop(Const.C_PARACHUTE_DROP_SND); this.__sndEMPDisruptorOn.stop(Const.C_EMP_DISRUPTOR_ON_SND); this.__sndEMPDisruptorHit.stop(Const.C_EMP_DISRUPTOR_HIT_SND); this.__sndAcousticRifleOn.stop(Const.C_ACOUSTIC_RIFLE_ON_SND); this.__sndAcousticRifleHit.stop(Const.C_ACOUSTIC_RIFLE_HIT_SND); }; v2.PlayMagneticDeflectorOn = function () { if (!_global.GameConf.isSoundFXEnabled()) { return undefined; } this.__sndMagneticDeflectorOn.start(); }; v2.PlayMagneticDeflection = function () { if (!_global.GameConf.isSoundFXEnabled()) { return undefined; } this.__sndMagneticDeflection.start(); }; v2.PlayHomingMissileDrop = function () { if (!_global.GameConf.isSoundFXEnabled()) { return undefined; } this.__sndHomingMissileDrop.start(); }; v2.PlayBombDrop = function () { if (!_global.GameConf.isSoundFXEnabled()) { return undefined; } this.__sndBombDrop.start(); }; v2.PlayParachuteDrop = function () { if (!_global.GameConf.isSoundFXEnabled()) { return undefined; } this.__sndParachuteDrop.start(); }; v2.PlayEMPDisruptorOn = function () { if (!_global.GameConf.isSoundFXEnabled()) { return undefined; } this.__sndEMPDisruptorOn.start(); }; v2.PlayEMPDisruptorHit = function () { if (!_global.GameConf.isSoundFXEnabled()) { return undefined; } this.__sndEMPDisruptorHit.start(); }; v2.PlayAcousticRifleOn = function () { if (!_global.GameConf.isSoundFXEnabled()) { return undefined; } this.__sndAcousticRifleOn.start(); }; v2.PlayAcousticRifleHit = function () { if (!_global.GameConf.isSoundFXEnabled()) { return undefined; } this.__sndAcousticRifleHit.start(); }; v2.RegisterSound = function (soundName) { var v2; v2 = LayMan.RegisterEmptyClip('', this.C_EMPTY_CLIP_DEPTH_TYPE); this.__emptyClips.push(v2); var v3; v3 = new Sound(v2); v3.attachSound(soundName); return v3; }; v2.Destroy = function () { this.__sndBadBonus.stop(); this.__sndDopplerDown.stop(); this.__sndDopplerUp.stop(); this.__sndEngineBreakdown.stop(); this.__sndEngineStart.stop(); this.__sndEngineRestart.stop(); this.__sndExplosion_1.stop(); this.__sndExplosion_2.stop(); this.__sndExplosion_3.stop(); this.__sndExplosion_4.stop(); this.__sndFallingDopplerParabolic.stop(); this.__sndGoodBonus.stop(); this.__sndMachineGun.stop(); this.__sndBulletHitDamage.stop(); this.__sndBulletHitDamage2.stop(); this.__sndBulletHitDamage3.stop(); this.__sndAfterburnerWindBlow.stop(); this.__sndDivePlane.stop(); this.__sndDivePlaneOut.stop(); this.__sndFallingDopplerFreefall.stop(); this.__sndDoubleKill.stop(); this.__sndTripleKill.stop(); this.__sndBurningScrew.stop(); this.__sndMagneticDeflectorOn.stop(); this.__sndMagneticDeflection.stop(); this.__sndHomingMissileDrop.stop(); this.__sndBombDrop.stop(); this.__sndParachuteDrop.stop(); this.__sndEMPDisruptorOn.stop(); this.__sndEMPDisruptorHit.stop(); this.__sndAcousticRifleOn.stop(); this.__sndAcousticRifleHit.stop(); var v2; var v3; v3 = this.__emptyClips.length; v2 = 0; while (v2 < v3) { LayMan.RemoveClip(this.__emptyClips[v2]); ++v2; } }; v2.C_REFRESH_COUNTER_MAX = 7; v2.C_EMPTY_CLIP_DEPTH_TYPE = LayMan.C_S_OTHER; ASSetPropFlags(_global.SoundFX.prototype, null, 1); } #endinitclip } movieClip 1736 __Packages.entities.basic.MovingEntity { #initclip if (!_global.entities) { _global.entities = new Object(); } if (!_global.entities.basic) { _global.entities.basic = new Object(); } if (!_global.entities.basic.MovingEntity) { var v1 = function (x, y, velocity, direction) { this.__x = (x == undefined) ? 0 : x; this.__y = (y == undefined) ? 0 : y; this.__velocity = (velocity == undefined) ? 0 : velocity; this.__direction = (direction == undefined) ? new Vector2D(1, 0) : direction; this.__isMoving = (velocity == 0) ? false : true; }; entities.basic.MovingEntity = v1; var v2 = v1.prototype; v2.setXY = function (x, y) { this.__x = x; this.__y = y; }; v2.setX = function (x) { this.__x = x; }; v2.setY = function (y) { this.__y = y; }; v2.getXY = function () { return [this.__x, this.__y]; }; v2.getX = function () { return this.__x; }; v2.getY = function () { return this.__y; }; v2.setDirXY = function (x, y) { this.__direction.setX(x); this.__direction.setY(y); }; v2.setDirX = function (x) { this.__direction.setX(x); }; v2.setDirY = function (y) { this.__direction.setY(y); }; v2.setDirVec = function (vec) { this.__direction.setVec(vec); }; v2.getDirXY = function () { return [this.__direction.getX(), this.__direction.getY()]; }; v2.getDirX = function () { return this.__direction.getX(); }; v2.getDirY = function () { return this.__direction.getY(); }; v2.getDir = function () { return this.__direction; }; v2.setVelocity = function (value) { this.__velocity = value; this.__isMoving = (this.__velocity == 0) ? false : true; }; v2.getVelocity = function () { return this.__velocity; }; v2.isMoving = function () { return this.__isMoving; }; v2.Move = function () { this.__x += this.__direction.getX() * this.__velocity; this.__y += this.__direction.getY() * this.__velocity; }; ASSetPropFlags(entities.basic.MovingEntity.prototype, null, 1); } #endinitclip } movieClip 1737 __Packages.entities.projectiles.GunBurst { #initclip if (!_global.entities) { _global.entities = new Object(); } if (!_global.entities.projectiles) { _global.entities.projectiles = new Object(); } if (!_global.entities.projectiles.GunBurst) { var v1 = function (x, y, velocity, direction, parentPlane, myWorld, parentWeapon, skyType) { super.constructor.apply(this, arguments); this.__parentPlane = parentPlane; this.__myWorld = myWorld; this.__SFX = this.__parentPlane.getSFXObject(); this.__parentWeapon = parentWeapon; this.__clip = LayMan.RegisterClip('S_BULLET', LayMan.C_S_COLLIDE_NEAR); this.__clip.cacheAsBitmap = true; if (this.__parentPlane.getFaceRightOrientation()) { this.__clip._xscale = -1 * this.__clip._xscale; } this.__planeImpactClip = LayMan.RegisterClip('S_BULLET_PLANE_RICOS', LayMan.C_S_COLLIDE_NEAR); if (this.__myWorld.isScrolling()) { this.CheckScreenBordersFunction = this.DontWrap; } else { this.CheckScreenBordersFunction = this.Wrap; } this.Init(); this.__myWorld.addEventListener(World.EVT_GAME_PAUSED, mx.utils.Delegate.create(this, this.Pause)); }; entities.projectiles.GunBurst = v1; entities.projectiles.GunBurst extends entities.basic.MovingEntity; var v2 = v1.prototype; _global.entities.projectiles.GunBurst implements _global.entities.projectiles.ProjectileInterface; v2.Init = function () { this.setXY(0, 0); this.setVelocity(0); this.setDirXY(-1, 0); this.setVisibility(false); this.__travelledDistance = 0; if (this.__myIdx != undefined) { World.UnRegMPArr(this); this.__myIdx = undefined; } }; v2.Fire = function (planePosX, planePosY, planeDir, planeVelocity) { var v3; var v2; v3 = planePosX + 30 * planeDir.getX(); v2 = planePosY + 30 * planeDir.getY(); this.setXY(v3, v2); this.setDirVec(planeDir); this.setVelocity(this.C_BASE_VELOCITY); this.setVisibility(true); this.SyncClipAttributes(v3, v2, this.__parentPlane.getClipRotation()); this.__SFX.PlayMachineGun(); World.RegMPArr(this); return true; }; v2.Update = function (idx) { this.__myIdx = idx; super.Move(); this.SyncClipAttributes(this.__x, this.__y); this.CheckLifeTime(); this.CheckScreenBordersFunction(); }; v2.Destroy = function () { LayMan.RemoveClip(this.__clip); LayMan.RemoveClip(this.__planeImpactClip); }; v2.PlayPlaneImpact = function () { this.__planeImpactClip._x = this.__clip._x; this.__planeImpactClip._y = this.__clip._y; this.__planeImpactClip._rotation = this.__clip._rotation; this.__planeImpactClip._visible = true; this.__planeImpactClip.gotoAndPlay('F_BEGIN', 1); }; v2.setDirX = function (x) { super.setDirX(x); this.__clip._rotation = 180 + 1 * this.__direction.getAlphaDeg(); }; v2.setDirY = function (y) { super.setDirY(y); this.__clip._rotation = 180 + 1 * this.__direction.getAlphaDeg(); }; v2.setDirXY = function (x, y) { super.setDirXY(x, y); this.__clip._rotation = 180 + 1 * this.__direction.getAlphaDeg(); }; v2.isCollision = function (clipToCollideWith) { if (!this.__isMoving) { return false; } if (!(Math.abs(clipToCollideWith._x - this.__x) < Const.C_HITTEST_COMPUTE_DISTANCE && Math.abs(clipToCollideWith._y - this.__y) < Const.C_HITTEST_COMPUTE_DISTANCE)) { return false; } var v2; v2 = clipToCollideWith.hitTest(this.__x, this.__y, false); if (v2) { this.__SFX.PlayBulletHitDamage(); this.PlayPlaneImpact(); } return v2; }; v2.Scroll = function (scrollCoef, xDiff, yDiff) { this.__x += scrollCoef * xDiff; this.__y += scrollCoef * yDiff; LayMan.ScrollClip(this.__clip, scrollCoef, xDiff, yDiff); if (this.__planeImpactClip._visible) { LayMan.ScrollClip(this.__planeImpactClip, scrollCoef, 2 * xDiff, yDiff); } }; v2.getDamageTypeCausedArray = function (planeX, planeY, planeDir) { var v7; v7 = UtilMath.getDirectRatioFncValue(this.__travelledDistance, this.C_MIN_DISTANCE, this.C_MAX_DISTANCE); var v4; v4 = Math.random(); if (v4 < v7) { this.Init(); return [enums.DamageTypes.MINOR, 0]; } var v2; var v6; var v5; v2 = new Vector2D(this.__x - planeX, this.__y - planeY); v6 = v2.Length(); v2.Normalize(); v5 = planeDir.Dot(v2); var v3; v3 = UtilMath.getRandomNaturalNumber(this.__parentWeapon.getMinDamage(), this.__parentWeapon.getMaxDamage()); if (v5 < -0.6 && v6 > 7) { this.Init(); return [enums.DamageTypes.TAIL, v3]; } if (v5 > 0.6 && v6 > 7) { this.Init(); return [enums.DamageTypes.ENGINE, v3]; } v4 = Math.random(); if (v4 < 0.1) { this.Init(); return [enums.DamageTypes.PILOT, v3]; } else { this.Init(); return [enums.DamageTypes.GUN, v3]; } false; }; v2.setVisibility = function (isVisible) { this.__clip._visible = isVisible; }; v2.PlayGroundImpact = function () { this.setDirY(0); this.__SFX.PlayBulletHitDamage(); this.PlayPlaneImpact(); }; v2.getInArenaPositionX = function () { return this.__x - this.__myWorld.getScrollOriginX(); }; v2.DontWrap = function () { var v2; v2 = this.getInArenaPositionX(); if (v2 > Const.C_SCENE_MAX_WIDTH) { this.Init(); } if (v2 < Const.C_SCENE_MIN_WIDTH) { this.Init(); } if (this.__y > Const.C_SCENE_HEIGHT - 15) { this.PlayGroundImpact(); this.Init(); } if (this.__y < -50) { this.Init(); } }; v2.Wrap = function () { if (this.__x > Const.C_SCENE_WIDTH) { this.__x = 0; } if (this.__x < 0) { this.__x = Const.C_SCENE_WIDTH; } if (this.__y > Const.C_SCENE_HEIGHT - 15) { this.Init(); this.PlayGroundImpact(); } if (this.__y < -50) { this.Init(); } }; v2.SyncClipAttributes = function (x, y, rotation) { this.__clip._x = x; this.__clip._y = y; if (rotation != undefined) { this.__clip._rotation = rotation; } }; v2.CheckLifeTime = function () { var v2; this.__travelledDistance += this.__velocity; if (this.__travelledDistance > this.C_MAX_DISTANCE) { this.Init(); } }; v2.UpgradeRangeAndProjectileSpeed = function () { this.C_BASE_VELOCITY *= this.C_UPGRADE_COEF; this.C_MIN_DISTANCE *= this.C_UPGRADE_COEF; this.C_MAX_DISTANCE *= this.C_UPGRADE_COEF; }; v2.Pause = function (evtObj) { if (evtObj.state == true) { if (this.__clip._visible) { this.__clip.stop(); } } else { if (this.__clip._visible) { this.__clip.play(); } } }; v2.getItemId = function () { return this.__parentWeapon.getItemId(); }; v2.getParentPlane = function () { return this.__parentPlane; }; v1.C_PROJECTILE_BASE_VELOCITY = 12; v2.C_BASE_VELOCITY = entities.projectiles.GunBurst.C_PROJECTILE_BASE_VELOCITY; v2.C_MIN_DISTANCE = Const.C_SCENE_WIDTH * 0.5; v2.C_MAX_DISTANCE = Const.C_SCENE_WIDTH; v2.C_UPGRADE_COEF = 1.4; v2.__myIdx = undefined; ASSetPropFlags(entities.projectiles.GunBurst.prototype, null, 1); } #endinitclip } movieClip 1738 __Packages.enums.DamageTypes { #initclip if (!_global.enums) { _global.enums = new Object(); } if (!_global.enums.DamageTypes) { var v1 = function () {}; enums.DamageTypes = v1; var v2 = v1.prototype; v1.COUNT = 3; v1.ENGINE = 0; v1.TAIL = 1; v1.GUN = 2; v1.NONE = 9; v1.MINOR = 10; v1.PILOT = 11; v1.EMP_STALL = 12; v1.MALICIOUS_PARACHUTE_STALL = 13; v1.ACOUSTIC_KNOCKBACK = 14; ASSetPropFlags(enums.DamageTypes.prototype, null, 1); } #endinitclip } movieClip 1739 __Packages.entities.projectiles.TailGunBurst { #initclip if (!_global.entities) { _global.entities = new Object(); } if (!_global.entities.projectiles) { _global.entities.projectiles = new Object(); } if (!_global.entities.projectiles.TailGunBurst) { var v1 = function (x, y, velocity, direction, parentPlane, myWorld, parentWeapon, skyType) { entities.projectiles.TailGunBurst.C_TAIL_FIRE_ANGLE = enums.AIProfiles.getAIWpnSetupInfo(enums.ItemTypes.TAIL_GUN, enums.AIProfiles.C_WPN_INFO_DIRECTION_ANGLE); super.constructor.apply(this, arguments); this.__parentPlane = parentPlane; this.__myWorld = myWorld; this.__SFX = this.__parentPlane.getSFXObject(); this.__parentWeapon = parentWeapon; this.__clip = LayMan.RegisterClip('S_BULLET', LayMan.C_S_COLLIDE_NEAR); this.__clip.cacheAsBitmap = true; if (this.__parentPlane.getFaceRightOrientation()) { this.__clip._xscale = -1 * this.__clip._xscale; } this.__planeImpactClip = LayMan.RegisterClip('S_BULLET_PLANE_RICOS', LayMan.C_S_COLLIDE_NEAR); if (this.__myWorld.isScrolling()) { this.CheckScreenBordersFunction = this.DontWrap; } else { this.CheckScreenBordersFunction = this.Wrap; } this.Init(); this.__myWorld.addEventListener(World.EVT_GAME_PAUSED, mx.utils.Delegate.create(this, this.Pause)); }; entities.projectiles.TailGunBurst = v1; entities.projectiles.TailGunBurst extends entities.basic.MovingEntity; var v2 = v1.prototype; _global.entities.projectiles.TailGunBurst implements _global.entities.projectiles.ProjectileInterface; v2.Init = function () { this.setXY(0, 0); this.setVelocity(0); this.setDirXY(-1, 0); this.setVisibility(false); this.__travelledDistance = 0; if (this.__myIdx != undefined) { World.UnRegMPArr(this); this.__myIdx = undefined; } }; v2.Fire = function (planePosX, planePosY, planeDir, planeVelocity) { var v6; var v5; var v2; v2 = new Vector2D(1, 0); var v8; v8 = this.__parentPlane.getAngleCorrection(); var v3; var v4; v4 = (this.__parentPlane.getClip())._yscale; if (v4 > 0) { v3 = 1; } else { v3 = -1; } if (this.__parentPlane.getFaceRightOrientation()) { v2.Rotate(this.__parentPlane.getClipRotation() + v3 * entities.projectiles.TailGunBurst.C_TAIL_FIRE_ANGLE); v6 = planePosX + v2.getX() * 30 + planeDir.getX() * 15; v5 = planePosY + v2.getY() * 30 + planeDir.getY() * 15; this.setXY(v6, v5); this.setDirVec(v2); this.setVelocity(this.C_BASE_VELOCITY); this.setVisibility(true); this.SyncClipAttributes(v6, v5, v2.getAlphaDeg()); this.__SFX.PlayMachineGun(); World.RegMPArr(this); return true; } v2.Rotate(this.__parentPlane.getClipRotation() - 180 - v3 * entities.projectiles.TailGunBurst.C_TAIL_FIRE_ANGLE); v6 = planePosX + v2.getX() * 30 + planeDir.getX() * 15; v5 = planePosY + v2.getY() * 30 + planeDir.getY() * 15; this.setXY(v6, v5); this.setDirVec(v2); this.setVelocity(this.C_BASE_VELOCITY); this.setVisibility(true); this.SyncClipAttributes(v6, v5, v2.getAlphaDeg()); this.__SFX.PlayMachineGun(); World.RegMPArr(this); return true; }; v2.Update = function (idx) { this.__myIdx = idx; super.Move(); this.SyncClipAttributes(this.__x, this.__y); this.CheckLifeTime(); this.CheckScreenBordersFunction(); }; v2.Destroy = function () { LayMan.RemoveClip(this.__clip); LayMan.RemoveClip(this.__planeImpactClip); }; v2.PlayPlaneImpact = function () { this.__planeImpactClip._x = this.__clip._x; this.__planeImpactClip._y = this.__clip._y; this.__planeImpactClip._rotation = this.__clip._rotation; this.__planeImpactClip._visible = true; this.__planeImpactClip.gotoAndPlay('F_BEGIN', 1); }; v2.setDirX = function (x) { super.setDirX(x); this.__clip._rotation = 180 + 1 * this.__direction.getAlphaDeg(); }; v2.setDirY = function (y) { super.setDirY(y); this.__clip._rotation = 180 + 1 * this.__direction.getAlphaDeg(); }; v2.setDirXY = function (x, y) { super.setDirXY(x, y); this.__clip._rotation = 180 + 1 * this.__direction.getAlphaDeg(); }; v2.isCollision = function (clipToCollideWith) { if (!this.__isMoving) { return false; } if (!(Math.abs(clipToCollideWith._x - this.__x) < Const.C_HITTEST_COMPUTE_DISTANCE && Math.abs(clipToCollideWith._y - this.__y) < Const.C_HITTEST_COMPUTE_DISTANCE)) { return false; } var v2; v2 = clipToCollideWith.hitTest(this.__x, this.__y, false); if (v2) { this.__SFX.PlayBulletHitDamage(); this.PlayPlaneImpact(); } return v2; }; v2.Scroll = function (scrollCoef, xDiff, yDiff) { this.__x += Math.round(scrollCoef * xDiff, 2); this.__y += Math.round(scrollCoef * yDiff, 2); LayMan.ScrollClip(this.__clip, scrollCoef, xDiff, yDiff); if (this.__planeImpactClip._visible) { LayMan.ScrollClip(this.__planeImpactClip, scrollCoef, 2 * xDiff, yDiff); } }; v2.getDamageTypeCausedArray = function (planeX, planeY, planeDir) { var v7; v7 = UtilMath.getDirectRatioFncValue(this.__travelledDistance, this.C_MIN_DISTANCE, this.C_MAX_DISTANCE); var v4; v4 = Math.random(); if (v4 < v7) { this.Init(); return [enums.DamageTypes.MINOR, 0]; } var v2; var v6; var v5; v2 = new Vector2D(this.__x - planeX, this.__y - planeY); v6 = v2.Length(); v2.Normalize(); v5 = planeDir.Dot(v2); var v3; v3 = UtilMath.getRandomNaturalNumber(this.__parentWeapon.getMinDamage(), this.__parentWeapon.getMaxDamage()); if (v5 < -0.6 && v6 > 7) { this.Init(); return [enums.DamageTypes.TAIL, v3]; } if (v5 > 0.6 && v6 > 7) { this.Init(); return [enums.DamageTypes.ENGINE, v3]; } v4 = Math.random(); if (v4 < 0.1) { this.Init(); return [enums.DamageTypes.PILOT, v3]; } else { this.Init(); return [enums.DamageTypes.GUN, v3]; } false; }; v2.setVisibility = function (isVisible) { this.__clip._visible = isVisible; }; v2.PlayGroundImpact = function () { this.setDirY(0); this.__SFX.PlayBulletHitDamage(); this.PlayPlaneImpact(); }; v2.getInArenaPositionX = function () { return this.__x - this.__myWorld.getScrollOriginX(); }; v2.DontWrap = function () { var v2; v2 = this.getInArenaPositionX(); if (v2 > Const.C_SCENE_MAX_WIDTH) { this.Init(); } if (v2 < Const.C_SCENE_MIN_WIDTH) { this.Init(); } if (this.__y > Const.C_SCENE_HEIGHT - 15) { this.PlayGroundImpact(); this.Init(); } if (this.__y < -50) { this.Init(); } }; v2.Wrap = function () { if (this.__x > Const.C_SCENE_WIDTH) { this.__x = 0; } if (this.__x < 0) { this.__x = Const.C_SCENE_WIDTH; } if (this.__y > Const.C_SCENE_HEIGHT - 15) { this.Init(); this.PlayGroundImpact(); } if (this.__y < -50) { this.Init(); } }; v2.SyncClipAttributes = function (x, y, rotation) { this.__clip._x = x; this.__clip._y = y; if (rotation != undefined) { this.__clip._rotation = rotation; } }; v2.CheckLifeTime = function () { this.__travelledDistance += this.__velocity; if (this.__travelledDistance > this.C_MAX_DISTANCE) { this.Init(); } }; v2.UpgradeRangeAndProjectileSpeed = function () { this.C_BASE_VELOCITY *= this.C_UPGRADE_COEF; this.C_MIN_DISTANCE *= this.C_UPGRADE_COEF; this.C_MAX_DISTANCE *= this.C_UPGRADE_COEF; }; v2.Pause = function (evtObj) { if (evtObj.state == true) { if (this.__clip._visible) { this.__clip.stop(); } } else { if (this.__clip._visible) { this.__clip.play(); } } }; v2.getItemId = function () { return this.__parentWeapon.getItemId(); }; v2.getParentPlane = function () { return this.__parentPlane; }; v2.C_BASE_VELOCITY = 12; v2.C_MIN_DISTANCE = Const.C_SCENE_WIDTH / 2; v2.C_MAX_DISTANCE = Const.C_SCENE_WIDTH; v2.C_UPGRADE_COEF = 1.3; v2.__myIdx = undefined; ASSetPropFlags(entities.projectiles.TailGunBurst.prototype, null, 1); } #endinitclip } movieClip 1740 __Packages.entities.projectiles.TwinGunBurst { #initclip if (!_global.entities) { _global.entities = new Object(); } if (!_global.entities.projectiles) { _global.entities.projectiles = new Object(); } if (!_global.entities.projectiles.TwinGunBurst) { var v1 = function (x, y, velocity, direction, parentPlane, myWorld, parentWeapon, skyType) { super.constructor.apply(this, arguments); this.__parentPlane = parentPlane; this.__myWorld = myWorld; this.__SFX = this.__parentPlane.getSFXObject(); this.__parentWeapon = parentWeapon; this.__clip = LayMan.RegisterClip('S_TWIN_BULLET', LayMan.C_S_COLLIDE_NEAR); this.__clip.cacheAsBitmap = true; if (this.__parentPlane.getFaceRightOrientation()) { this.__clip._xscale = -1 * this.__clip._xscale; } this.__planeImpactClip = LayMan.RegisterClip('S_BULLET_PLANE_RICOS', LayMan.C_S_COLLIDE_NEAR); if (this.__myWorld.isScrolling()) { this.CheckScreenBordersFunction = this.DontWrap; } else { this.CheckScreenBordersFunction = this.Wrap; } this.Init(); this.__myWorld.addEventListener(World.EVT_GAME_PAUSED, mx.utils.Delegate.create(this, this.Pause)); }; entities.projectiles.TwinGunBurst = v1; entities.projectiles.TwinGunBurst extends entities.basic.MovingEntity; var v2 = v1.prototype; _global.entities.projectiles.TwinGunBurst implements _global.entities.projectiles.ProjectileInterface; v2.Init = function () { this.setXY(0, 0); this.setVelocity(0); this.setDirXY(-1, 0); this.setVisibility(false); this.__travelledDistance = 0; if (this.__myIdx != undefined) { World.UnRegMPArr(this); this.__myIdx = undefined; } }; v2.Fire = function (planePosX, planePosY, planeDir, planeVelocity) { var v3; var v2; v3 = planePosX + 30 * planeDir.getX(); v2 = planePosY + 30 * planeDir.getY(); this.setXY(v3, v2); this.setDirVec(planeDir); this.setVelocity(this.C_BASE_VELOCITY); this.setVisibility(true); this.SyncClipAttributes(v3, v2, this.__parentPlane.getClipRotation()); this.__SFX.PlayMachineGun(); World.RegMPArr(this); return true; }; v2.Update = function (idx) { this.__myIdx = idx; super.Move(); this.SyncClipAttributes(this.__x, this.__y); this.CheckLifeTime(); this.CheckScreenBordersFunction(); }; v2.Destroy = function () { LayMan.RemoveClip(this.__clip); LayMan.RemoveClip(this.__planeImpactClip); }; v2.PlayPlaneImpact = function () { this.__planeImpactClip._x = this.__clip._x; this.__planeImpactClip._y = this.__clip._y; this.__planeImpactClip._rotation = this.__clip._rotation; this.__planeImpactClip._visible = true; this.__planeImpactClip.gotoAndPlay('F_BEGIN', 1); }; v2.setDirX = function (x) { super.setDirX(x); this.__clip._rotation = 180 + 1 * this.__direction.getAlphaDeg(); }; v2.setDirY = function (y) { super.setDirY(y); this.__clip._rotation = 180 + 1 * this.__direction.getAlphaDeg(); }; v2.setDirXY = function (x, y) { super.setDirXY(x, y); this.__clip._rotation = 180 + 1 * this.__direction.getAlphaDeg(); }; v2.isCollision = function (clipToCollideWith) { if (!this.__isMoving) { return false; } if (!(Math.abs(clipToCollideWith._x - this.__x) < Const.C_HITTEST_COMPUTE_DISTANCE && Math.abs(clipToCollideWith._y - this.__y) < Const.C_HITTEST_COMPUTE_DISTANCE)) { return false; } var v2; v2 = clipToCollideWith.hitTest(this.__x, this.__y, false); if (v2) { this.__SFX.PlayBulletHitDamage(); this.PlayPlaneImpact(); } return v2; }; v2.Scroll = function (scrollCoef, xDiff, yDiff) { this.__x += Math.round(scrollCoef * xDiff, 2); this.__y += Math.round(scrollCoef * yDiff, 2); LayMan.ScrollClip(this.__clip, scrollCoef, xDiff, yDiff); if (this.__planeImpactClip._visible) { LayMan.ScrollClip(this.__planeImpactClip, scrollCoef, 2 * xDiff, yDiff); } }; v2.getDamageTypeCausedArray = function (planeX, planeY, planeDir) { var v7; v7 = UtilMath.getDirectRatioFncValue(this.__travelledDistance, this.C_MIN_DISTANCE, this.C_MAX_DISTANCE); var v4; v4 = Math.random(); if (v4 < v7) { this.Init(); return [enums.DamageTypes.MINOR, 0]; } var v2; var v6; var v5; v2 = new Vector2D(this.__x - planeX, this.__y - planeY); v6 = v2.Length(); v2.Normalize(); v5 = planeDir.Dot(v2); var v3; v3 = UtilMath.getRandomNaturalNumber(this.__parentWeapon.getMinDamage(), this.__parentWeapon.getMaxDamage()); if (v5 < -0.6 && v6 > 7) { this.Init(); return [enums.DamageTypes.TAIL, v3]; } if (v5 > 0.6 && v6 > 7) { this.Init(); return [enums.DamageTypes.ENGINE, v3]; } v4 = Math.random(); if (v4 < 0.1) { this.Init(); return [enums.DamageTypes.PILOT, v3]; } else { this.Init(); return [enums.DamageTypes.GUN, v3]; } false; }; v2.setVisibility = function (isVisible) { this.__clip._visible = isVisible; }; v2.PlayGroundImpact = function () { this.setDirY(0); this.__SFX.PlayBulletHitDamage(); this.PlayPlaneImpact(); }; v2.getInArenaPositionX = function () { return this.__x - this.__myWorld.getScrollOriginX(); }; v2.DontWrap = function () { var v2; v2 = this.getInArenaPositionX(); if (v2 > Const.C_SCENE_MAX_WIDTH) { this.Init(); } if (v2 < Const.C_SCENE_MIN_WIDTH) { this.Init(); } if (this.__y > Const.C_SCENE_HEIGHT - 15) { this.PlayGroundImpact(); this.Init(); } if (this.__y < -50) { this.Init(); } }; v2.Wrap = function () { if (this.__x > Const.C_SCENE_WIDTH) { this.__x = 0; } if (this.__x < 0) { this.__x = Const.C_SCENE_WIDTH; } if (this.__y > Const.C_SCENE_HEIGHT - 15) { this.Init(); this.PlayGroundImpact(); } if (this.__y < -50) { this.Init(); } }; v2.SyncClipAttributes = function (x, y, rotation) { this.__clip._x = x; this.__clip._y = y; if (rotation != undefined) { this.__clip._rotation = rotation; } }; v2.CheckLifeTime = function () { this.__travelledDistance += this.__velocity; if (this.__travelledDistance > this.C_MAX_DISTANCE) { this.Init(); } }; v2.UpgradeRangeAndProjectileSpeed = function () { this.C_BASE_VELOCITY *= this.C_UPGRADE_COEF; this.C_MIN_DISTANCE *= this.C_UPGRADE_COEF; this.C_MAX_DISTANCE *= this.C_UPGRADE_COEF; }; v2.Pause = function (evtObj) { if (evtObj.state == true) { if (this.__clip._visible) { this.__clip.stop(); } } else { if (this.__clip._visible) { this.__clip.play(); } } }; v2.getItemId = function () { return this.__parentWeapon.getItemId(); }; v2.getParentPlane = function () { return this.__parentPlane; }; v2.C_BASE_VELOCITY = 10; v2.C_MIN_DISTANCE = Const.C_SCENE_WIDTH / 2; v2.C_MAX_DISTANCE = Const.C_SCENE_WIDTH; v2.C_UPGRADE_COEF = 1.4; v2.__myIdx = undefined; ASSetPropFlags(entities.projectiles.TwinGunBurst.prototype, null, 1); } #endinitclip } movieClip 1741 __Packages.entities.projectiles.BurstGunBurst { #initclip if (!_global.entities) { _global.entities = new Object(); } if (!_global.entities.projectiles) { _global.entities.projectiles = new Object(); } if (!_global.entities.projectiles.BurstGunBurst) { var v1 = function (x, y, velocity, direction, parentPlane, myWorld, parentWeapon, skyType) { super.constructor.apply(this, arguments); this.__parentPlane = parentPlane; this.__myWorld = myWorld; this.__SFX = this.__parentPlane.getSFXObject(); this.__parentWeapon = parentWeapon; this.__clip = LayMan.RegisterClip('S_BULLET', LayMan.C_S_COLLIDE_NEAR); this.__clip.cacheAsBitmap = true; if (this.__parentPlane.getFaceRightOrientation()) { this.__clip._xscale = -1 * this.__clip._xscale; } this.__planeImpactClip = LayMan.RegisterClip('S_BULLET_PLANE_RICOS', LayMan.C_S_COLLIDE_NEAR); if (this.__parentPlane.getFaceRightOrientation() == true) { this.__clip._xscale = -100; } else { this.__clip._xscale = 100; } if (this.__myWorld.isScrolling()) { this.CheckScreenBordersFunction = this.DontWrap; } else { this.CheckScreenBordersFunction = this.Wrap; } this.Init(); this.__myWorld.addEventListener(World.EVT_GAME_PAUSED, mx.utils.Delegate.create(this, this.Pause)); }; entities.projectiles.BurstGunBurst = v1; entities.projectiles.BurstGunBurst extends entities.basic.MovingEntity; var v2 = v1.prototype; _global.entities.projectiles.BurstGunBurst implements _global.entities.projectiles.ProjectileInterface; v2.Init = function () { this.setXY(0, 0); this.setVelocity(0); this.setDirXY(-1, 0); this.setVisibility(false); this.__travelledDistance = 0; if (this.__myIdx != undefined) { World.UnRegMPArr(this); this.__myIdx = undefined; } }; v2.Fire = function (planePosX, planePosY, planeDir, planeVelocity) { var v3; var v2; v3 = planePosX + 30 * planeDir.getX(); v2 = planePosY + 30 * planeDir.getY(); this.setXY(v3, v2); var v4; v4 = this.__parentPlane.getRotation() + this.C_SPREAD_ANGLE * Math.random() - 0.5 * this.C_SPREAD_ANGLE + this.__parentPlane.getAngleCorrection(); this.__direction.setXY(1, 0); this.__direction.Rotate(v4); this.setVelocity(this.C_BASE_VELOCITY); this.setVisibility(true); this.SyncClipAttributes(v3, v2, this.__parentPlane.getClipRotation()); this.__SFX.PlayMachineGun(); World.RegMPArr(this); return true; }; v2.Update = function (idx) { this.__myIdx = idx; super.Move(); this.SyncClipAttributes(this.__x, this.__y); this.CheckLifeTime(); this.CheckScreenBordersFunction(); }; v2.Destroy = function () { LayMan.RemoveClip(this.__clip); LayMan.RemoveClip(this.__planeImpactClip); }; v2.PlayPlaneImpact = function () { this.__planeImpactClip._x = this.__clip._x; this.__planeImpactClip._y = this.__clip._y; this.__planeImpactClip._rotation = this.__clip._rotation; this.__planeImpactClip._visible = true; this.__planeImpactClip.gotoAndPlay('F_BEGIN', 1); }; v2.setDirX = function (x) { super.setDirX(x); this.__clip._rotation = 180 + 1 * this.__direction.getAlphaDeg(); }; v2.setDirY = function (y) { super.setDirY(y); this.__clip._rotation = 180 + 1 * this.__direction.getAlphaDeg(); }; v2.setDirXY = function (x, y) { super.setDirXY(x, y); this.__clip._rotation = 180 + 1 * this.__direction.getAlphaDeg(); }; v2.isCollision = function (clipToCollideWith) { if (!this.__isMoving) { return false; } if (!(Math.abs(clipToCollideWith._x - this.__x) < Const.C_HITTEST_COMPUTE_DISTANCE && Math.abs(clipToCollideWith._y - this.__y) < Const.C_HITTEST_COMPUTE_DISTANCE)) { return false; } var v2; v2 = clipToCollideWith.hitTest(this.__x, this.__y, false); if (v2) { this.__SFX.PlayBulletHitDamage(); this.PlayPlaneImpact(); } return v2; }; v2.Scroll = function (scrollCoef, xDiff, yDiff) { this.__x += scrollCoef * xDiff; this.__y += scrollCoef * yDiff; LayMan.ScrollClip(this.__clip, scrollCoef, xDiff, yDiff); if (this.__planeImpactClip._visible) { LayMan.ScrollClip(this.__planeImpactClip, scrollCoef, 2 * xDiff, yDiff); } }; v2.getDamageTypeCausedArray = function (planeX, planeY, planeDir) { var v7; v7 = UtilMath.getDirectRatioFncValue(this.__travelledDistance, this.C_MIN_DISTANCE, this.C_MAX_DISTANCE); var v4; v4 = Math.random(); if (v4 < v7) { this.Init(); return [enums.DamageTypes.MINOR, 0]; } var v2; var v6; var v5; v2 = new Vector2D(this.__x - planeX, this.__y - planeY); v6 = v2.Length(); v2.Normalize(); v5 = planeDir.Dot(v2); var v3; v3 = UtilMath.getRandomNaturalNumber(this.__parentWeapon.getMinDamage(), this.__parentWeapon.getMaxDamage()); if (v5 < -0.6 && v6 > 7) { this.Init(); return [enums.DamageTypes.TAIL, v3]; } if (v5 > 0.6 && v6 > 7) { this.Init(); return [enums.DamageTypes.ENGINE, v3]; } v4 = Math.random(); if (v4 < 0.1) { this.Init(); return [enums.DamageTypes.PILOT, v3]; } else { this.Init(); return [enums.DamageTypes.GUN, v3]; } false; }; v2.setVisibility = function (isVisible) { this.__clip._visible = isVisible; }; v2.PlayGroundImpact = function () { this.setDirY(0); this.__SFX.PlayBulletHitDamage(); this.PlayPlaneImpact(); }; v2.getInArenaPositionX = function () { return this.__x - this.__myWorld.getScrollOriginX(); }; v2.DontWrap = function () { var v2; v2 = this.getInArenaPositionX(); if (v2 > Const.C_SCENE_MAX_WIDTH) { this.Init(); } if (v2 < Const.C_SCENE_MIN_WIDTH) { this.Init(); } if (this.__y > Const.C_SCENE_HEIGHT - 15) { this.PlayGroundImpact(); this.Init(); } if (this.__y < -50) { this.Init(); } }; v2.Wrap = function () { if (this.__x > Const.C_SCENE_WIDTH) { this.__x = 0; } if (this.__x < 0) { this.__x = Const.C_SCENE_WIDTH; } if (this.__y > Const.C_SCENE_HEIGHT - 15) { this.Init(); this.PlayGroundImpact(); } if (this.__y < -50) { this.Init(); } }; v2.SyncClipAttributes = function (x, y, rotation) { this.__clip._x = x; this.__clip._y = y; if (rotation != undefined) { this.__clip._rotation = rotation; } }; v2.CheckLifeTime = function () { this.__travelledDistance += this.__velocity; if (this.__travelledDistance > this.C_MAX_DISTANCE + 100) { this.Init(); } }; v2.UpgradeRangeAndProjectileSpeed = function () { this.C_BASE_VELOCITY *= this.C_UPGRADE_COEF; this.C_MIN_DISTANCE *= this.C_UPGRADE_COEF; this.C_MAX_DISTANCE *= this.C_UPGRADE_COEF; }; v2.Pause = function (evtObj) { if (evtObj.state == true) { if (this.__clip._visible) { this.__clip.stop(); } } else { if (this.__clip._visible) { this.__clip.play(); } } }; v2.getItemId = function () { return this.__parentWeapon.getItemId(); }; v2.getParentPlane = function () { return this.__parentPlane; }; v2.C_BASE_VELOCITY = 7; v2.C_MIN_DISTANCE = 0.1 * Const.C_SCENE_WIDTH; v2.C_MAX_DISTANCE = 0.5 * Const.C_SCENE_WIDTH; v2.C_SPREAD_ANGLE = 30; v2.C_UPGRADE_COEF = 1.3; v2.__myIdx = undefined; ASSetPropFlags(entities.projectiles.BurstGunBurst.prototype, null, 1); } #endinitclip } movieClip 1742 __Packages.entities.projectiles.AcousticRifle { #initclip if (!_global.entities) { _global.entities = new Object(); } if (!_global.entities.projectiles) { _global.entities.projectiles = new Object(); } if (!_global.entities.projectiles.AcousticRifle) { var v1 = function (x, y, velocity, direction, parentPlane, myWorld, parentWeapon, skyType) { super.constructor.apply(this, arguments); this.__parentPlane = parentPlane; this.__myWorld = myWorld; this.__SFX = this.__parentPlane.getSFXObject(); this.__parentWeapon = parentWeapon; var v4; v4 = this.__parentPlane.getClip(); this.__clip = LayMan.RegisterClipInClip(v4, 'S_SONIC_WAVE_FLASH'); this.__hitAreaClip = LayMan.RegisterClipInClip(v4, 'S_SONIC_WAVE_FLASH_BBOX'); this.__hitAreaClip._visible = false; this.CheckScreenBordersFunction = undefined; this.__currentState = this.C_STATE_INIT; this.Init(); this.__myWorld.addEventListener(World.EVT_GAME_PAUSED, mx.utils.Delegate.create(this, this.Pause)); }; entities.projectiles.AcousticRifle = v1; entities.projectiles.AcousticRifle extends entities.basic.MovingEntity; var v2 = v1.prototype; _global.entities.projectiles.AcousticRifle implements _global.entities.projectiles.ProjectileInterface; v2.Init = function () { this.setVelocity(0); this.setVisibility(false); if (this.__myIdx != undefined) { World.UnRegMPArr(this); this.__myIdx = undefined; } }; v2.Fire = function (planePosX, planePosY, planeDir, planeVelocity) { this.setVelocity(1); this.StartSonicWaveClips(); this.__SFX.PlayAcousticRifleOn(); World.RegMPArr(this); this.ChangeState(this.C_STATE_EXPLODING); return true; }; v2.Update = function (idx) { this.__myIdx = idx; this.HandleStateActions(); }; v2.Destroy = function () { LayMan.RemoveClip(this.__clip); LayMan.RemoveClip(this.__hitAreaClip); }; v2.setDirX = function (x) { super.setDirX(x); this.__clip._rotation = 180 - 1 * this.__direction.getAlphaDeg(); }; v2.setDirY = function (y) { super.setDirY(y); this.__clip._rotation = 180 - 1 * this.__direction.getAlphaDeg(); }; v2.isCollision = function (clipToCollideWith) { if (!(Math.abs(clipToCollideWith._x - this.__parentPlane.__x) < this.C_MAX_DISTANCE && Math.abs(clipToCollideWith._y - this.__parentPlane.__y) < this.C_MAX_DISTANCE)) { return false; } if (!this.__isMoving) { return false; } var v2; v2 = clipToCollideWith.hitTest(this.__hitAreaClip); if (v2) { this.__SFX.PlayBulletHitDamage(); } return v2; }; v2.Scroll = function (scrollCoef, xDiff, yDiff) {}; v2.getDamageTypeCausedArray = function (planeX, planeY, planeDir) { var v2; v2 = UtilMath.getRandomNaturalNumber(this.__parentWeapon.getMinDamage(), this.__parentWeapon.getMaxDamage()); var v5; v5 = new Array(); var v6; var v4; var v3 = v2; while (v3 > 0) { v2 = 1 + Math.round((v3 - 1) * Math.random()); v4 = Math.round(enums.DamageTypes.COUNT * Math.random()); v5.push([v4, v2]); v3 -= v2; } v5.push([enums.DamageTypes.ACOUSTIC_KNOCKBACK, enums.DamageOutputs.NONE]); return v5; }; v2.setVisibility = function (isVisible) { this.__clip._visible = isVisible; }; v2.getInArenaPositionX = function () { return this.__x - this.__myWorld.getScrollOriginX(); }; v2.CheckLifeTime = function () { if (this.__clip._currentframe == this.__clip._totalframes) { this.ChangeState(this.C_STATE_INIT); } }; v2.StartSonicWaveClips = function () { this.setVisibility(true); this.__clip.gotoAndPlay('F_BEGIN'); this.__hitAreaClip.gotoAndPlay('F_BEGIN'); }; v2.HandleStateActions = function () { if (this.__currentState !== this.C_STATE_EXPLODING) { } else { this.CheckLifeTime(); } }; v2.ChangeState = function (newState) { this.HandleStatesTransition(this.__currentState, newState); this.__currentState = newState; }; v2.HandleStatesTransition = function (oldState, newState) { if (oldState == this.C_STATE_INIT && newState == this.C_STATE_EXPLODING) { this.__clip._visible = true; } if (oldState == this.C_STATE_EXPLODING && newState == this.C_STATE_INIT) { this.Init(); } }; v2.Pause = function (evtObj) { if (evtObj.state == true) { if (this.__clip._visible) { this.__clip.stop(); this.__hitAreaClip.stop(); } } else { if (this.__clip._visible) { this.__clip.play(); this.__hitAreaClip.play(); } } }; v2.getItemId = function () { return this.__parentWeapon.getItemId(); }; v2.getParentPlane = function () { return this.__parentPlane; }; v2.C_STATE_INIT = 1; v2.C_STATE_EXPLODING = 2; v2.C_MAX_DISTANCE = 400; v2.__myIdx = undefined; ASSetPropFlags(entities.projectiles.AcousticRifle.prototype, null, 1); } #endinitclip } movieClip 1743 __Packages.enums.DamageOutputs { #initclip if (!_global.enums) { _global.enums = new Object(); } if (!_global.enums.DamageOutputs) { var v1 = function () {}; enums.DamageOutputs = v1; var v2 = v1.prototype; v1.COUNT = 5; v1.NONE = 0; v1.SMALL = 1; v1.MEDIUM = 2; v1.HIGH = 3; v1.CRITICAL = 6; ASSetPropFlags(enums.DamageOutputs.prototype, null, 1); } #endinitclip } movieClip 1744 __Packages.entities.projectiles.MaliciousParachute { #initclip if (!_global.entities) { _global.entities = new Object(); } if (!_global.entities.projectiles) { _global.entities.projectiles = new Object(); } if (!_global.entities.projectiles.MaliciousParachute) { var v1 = function (x, y, velocity, direction, parentPlane, myWorld, parentWeapon, skyType) { super.constructor.apply(this, arguments); this.__parentPlane = parentPlane; this.__myWorld = myWorld; this.__SFX = this.__parentPlane.getSFXObject(); this.__parentWeapon = parentWeapon; this.__clip = LayMan.RegisterClip('S_MALICIOUS_PARACHUTE', LayMan.C_S_COLLIDE_NEAR); enums.SkyTypes.AdjustTint(this.__clip, skyType, enums.SkyTypes.C_OBJ_COLOR_AMOUNT); this.__clip._xscale = 70; this.__clip._yscale = 70; if (this.__parentPlane.getFaceRightOrientation()) { this.__clip._xscale = -1 * this.__clip._xscale; } this.__hitAreaClip = LayMan.RegisterClip('S_MALICIOUS_PARACHUTE_BBOX', LayMan.C_S_COLLIDE_NEAR); this.__hitAreaClip._x = this.__clip._x; this.__hitAreaClip._y = this.__clip._y; this.__hitAreaClip._xscale = this.__clip._xscale; this.__hitAreaClip._yscale = this.__clip._yscale; this.__hitAreaClip._visible = false; if (this.__myWorld.isScrolling()) { this.CheckScreenBordersFunction = this.DontWrap; } else { this.CheckScreenBordersFunction = this.Wrap; } this.__lifeTimer = new Timer(this.C_LIVING_TIME); this.Init(); this.__myWorld.addEventListener(World.EVT_GAME_PAUSED, mx.utils.Delegate.create(this, this.Pause)); }; entities.projectiles.MaliciousParachute = v1; entities.projectiles.MaliciousParachute extends entities.basic.MovingEntity; var v2 = v1.prototype; _global.entities.projectiles.MaliciousParachute implements _global.entities.projectiles.ProjectileInterface; v2.Init = function () { this.setXY(0, 0); this.setVelocity(0); this.setDirXY(-1, 0); this.setVisibility(false); this.__travelledDistance = 0; this.__lifeTimer.StopTimer(); if (this.__myIdx != undefined) { World.UnRegMPArr(this); this.__myIdx = undefined; } }; v2.Fire = function (planePosX, planePosY, planeDir, planeVelocity) { var v3; var v2; v3 = planePosX - 30 * planeDir.getX(); v2 = planePosY - 30 * planeDir.getY(); this.setXY(v3, v2); this.setDirVec(planeDir); this.__direction.Multiply(-1); this.setVelocity(this.C_BASE_VELOCITY + planeVelocity / 2); this.setVisibility(true); this.SyncClipAttributes(v3, v2, this.__parentPlane.getClipRotation()); this.__lifeTimer.StartTimer(); this.__SFX.PlayParachuteDrop(); this.__clip.gotoAndPlay('F_BEGIN'); World.RegMPArr(this); return true; }; v2.Update = function (idx) { this.__myIdx = idx; super.Move(); if (this.__velocity <= 0.8) { this.__velocity = 0.8; } else { this.__velocity -= this.C_VELOCITY_SLOWDOWN_STEP; } this.SyncClipAttributes(this.__x, this.__y); this.CheckLifeTime(); this.CheckScreenBordersFunction(); }; v2.Destroy = function () { LayMan.RemoveClip(this.__clip); LayMan.RemoveClip(this.__hitAreaClip); }; v2.PlayPlaneImpact = function () { this.__SFX.PlayParachuteDrop(); }; v2.setDirX = function (x) { super.setDirX(x); this.__clip._rotation = 180 - 1 * this.__direction.getAlphaDeg(); }; v2.setDirY = function (y) { super.setDirY(y); this.__clip._rotation = 180 - 1 * this.__direction.getAlphaDeg(); }; v2.isCollision = function (clipToCollideWith) { if (!this.__isMoving) { return false; } if (!(Math.abs(clipToCollideWith._x - this.__x) < Const.C_HITTEST_COMPUTE_DISTANCE && Math.abs(clipToCollideWith._y - this.__y) < Const.C_HITTEST_COMPUTE_DISTANCE)) { return false; } var v2; v2 = clipToCollideWith.hitTest(this.__hitAreaClip); if (v2) { this.PlayPlaneImpact(); } return v2; }; v2.Scroll = function (scrollCoef, xDiff, yDiff) { this.__x += scrollCoef * xDiff; this.__y += scrollCoef * yDiff; LayMan.ScrollClip(this.__clip, scrollCoef, xDiff, yDiff); LayMan.ScrollClip(this.__hitAreaClip, scrollCoef, 2 * xDiff, yDiff); }; v2.getDamageTypeCausedArray = function (planeX, planeY, planeDir) { this.Init(); return [enums.DamageTypes.MALICIOUS_PARACHUTE_STALL, enums.DamageOutputs.NONE]; }; v2.setVisibility = function (isVisible) { this.__clip._visible = isVisible; }; v2.PlayGroundImpact = function () {}; v2.getInArenaPositionX = function () { return this.__x - this.__myWorld.getScrollOriginX(); }; v2.DontWrap = function () { var v2; v2 = this.getInArenaPositionX(); if (v2 > Const.C_SCENE_MAX_WIDTH) { this.Init(); } if (v2 < Const.C_SCENE_MIN_WIDTH) { this.Init(); } if (this.__y > Const.C_SCENE_HEIGHT - 15) { this.PlayGroundImpact(); this.Init(); } if (this.__y < -50) { this.Init(); } }; v2.Wrap = function () { if (this.__x > Const.C_SCENE_WIDTH) { this.__x = 0; } if (this.__x < 0) { this.__x = Const.C_SCENE_WIDTH; } if (this.__y > Const.C_SCENE_HEIGHT - 15) { this.Init(); this.PlayGroundImpact(); } if (this.__y < -50) { this.Init(); } }; v2.SyncClipAttributes = function (x, y, rotation) { this.__clip._x = x; this.__clip._y = y; if (rotation != undefined) { this.__clip._rotation = rotation; } if (this.__hitAreaClip != undefined) { this.__hitAreaClip._x = this.__clip._x; this.__hitAreaClip._y = this.__clip._y; this.__hitAreaClip._rotation = this.__clip._rotation; } }; v2.CheckLifeTime = function () { if (this.__lifeTimer.isTimerStarted() && this.__lifeTimer.TimeIntervalElapsed()) { this.Init(); } }; v2.Pause = function (evtObj) { if (evtObj.state == true) { if (this.__clip._visible) { this.__clip.stop(); } } else { if (this.__clip._visible) { this.__clip.play(); } } }; v2.getItemId = function () { return this.__parentWeapon.getItemId(); }; v2.getParentPlane = function () { return this.__parentPlane; }; v2.C_BASE_VELOCITY = 2; v2.C_VELOCITY_SLOWDOWN_STEP = 0.07000000000000001; v2.C_MIN_DISTANCE = 0; v2.C_MAX_DISTANCE = Const.C_SCENE_WIDTH / 10; v2.C_LIVING_TIME = 2000; v2.C_LASTING_TIME = 2000; v2.__myIdx = undefined; ASSetPropFlags(entities.projectiles.MaliciousParachute.prototype, null, 1); } #endinitclip } movieClip 1745 __Packages.entities.projectiles.ImpactBomb { #initclip if (!_global.entities) { _global.entities = new Object(); } if (!_global.entities.projectiles) { _global.entities.projectiles = new Object(); } if (!_global.entities.projectiles.ImpactBomb) { var v1 = function (x, y, velocity, direction, parentPlane, myWorld, parentWeapon, skyType) { super.constructor.apply(this, arguments); this.__parentPlane = parentPlane; this.__myWorld = myWorld; this.__SFX = this.__parentPlane.getSFXObject(); this.__parentWeapon = parentWeapon; this.__clip = LayMan.RegisterClip('S_IMPACT_BOMB', LayMan.C_S_COLLIDE_NEAR); enums.SkyTypes.AdjustTint(this.__clip, skyType, enums.SkyTypes.C_OBJ_COLOR_AMOUNT); this.__hitAreaClip = LayMan.RegisterClip('S_IMPACT_BOMB_EXPLOSION_BBOX', LayMan.C_S_COLLIDE_NEAR); if (this.__myWorld.isScrolling()) { this.CheckScreenBordersFunction = this.DontWrap; } else { this.CheckScreenBordersFunction = this.Wrap; } this.__gravityVec = new Vector2D(0, Const.C_G * 0.8); this.__currentState = this.C_STATE_INIT; this.__planesArray = this.__myWorld.getPlanesArray(); this.__explosion = new entities.effects.Explosion(entities.effects.Explosion.C_TYPE_SPHERE, entities.effects.Explosion.C_DURTYPE_ONCE, 15, 100, 200, new Array('50'), entities.effects.Explosion.C_FADE_SPEED_FAST); this.__explosion.SetPauseListener(this.__myWorld, World.EVT_GAME_PAUSED); this.Init(); this.__myWorld.addEventListener(World.EVT_GAME_PAUSED, mx.utils.Delegate.create(this, this.Pause)); }; entities.projectiles.ImpactBomb = v1; entities.projectiles.ImpactBomb extends entities.basic.MovingEntity; var v2 = v1.prototype; _global.entities.projectiles.ImpactBomb implements _global.entities.projectiles.ProjectileInterface; v2.Init = function () { this.setXY(0, 0); this.setVelocity(0); this.setDirXY(-1, 0); this.__clip._visible = false; this.__hitAreaClip._visible = false; if (this.__myIdx != undefined) { World.UnRegMPArr(this); this.__myIdx = undefined; } }; v2.Fire = function (planePosX, planePosY, planeDir, planeVelocity) { var v4; var v3; v4 = planePosX; v3 = planePosY + 5; this.setXY(v4, v3); var v2; if (this.__parentPlane.getFaceRightOrientation() != true) { v2 = this.__parentPlane.getClipRotation() + -45; this.__direction.setXY(1, 0); this.__direction.Rotate(this.__parentPlane.getAngleCorrection() + v2); this.setVelocity(0.5); this.SyncClipAttributes(v4, v3, v2); this.__SFX.PlayBombDrop(); World.RegMPArr(this); this.ChangeState(this.C_STATE_FLYING); return true; } v2 = this.__parentPlane.getClipRotation() + 45; this.__direction.setXY(1, 0); this.__direction.Rotate(this.__parentPlane.getAngleCorrection() + v2); this.setVelocity(0.5); this.SyncClipAttributes(v4, v3, v2); this.__SFX.PlayBombDrop(); World.RegMPArr(this); this.ChangeState(this.C_STATE_FLYING); return true; }; v2.Update = function (idx) { this.__myIdx = idx; this.HandleStateActions(); }; v2.Destroy = function () { LayMan.RemoveClip(this.__clip); LayMan.RemoveClip(this.__hitAreaClip); this.__explosion.Destroy(); }; v2.PlayPlaneImpact = function () {}; v2.setDirX = function (x) { super.setDirX(x); this.__clip._rotation = 1 * this.__direction.getAlphaDeg(); }; v2.setDirY = function (y) { super.setDirY(y); this.__clip._rotation = 1 * this.__direction.getAlphaDeg(); }; v2.setDirXY = function (x, y) { super.setDirXY(x, y); this.__clip._rotation = 1 * this.__direction.getAlphaDeg(); }; v2.isCollision = function (clipToCollideWith) { if (!this.isMoving()) { return false; } var v2; if (this.__currentState == this.C_STATE_FLYING) { if (!(Math.abs(clipToCollideWith._x - this.__x) < Const.C_HITTEST_COMPUTE_DISTANCE && Math.abs(clipToCollideWith._y - this.__y) < Const.C_HITTEST_COMPUTE_DISTANCE)) { return false; } v2 = clipToCollideWith.hitTest(this.__x, this.__y, false); if (v2) { this.ChangeState(this.C_STATE_EXPLODING); } return v2; } if (this.__currentState == this.C_STATE_EXPLODING) { if (this.__hitAreaClip._currentframe == this.__hitAreaClip._totalframes) { return false; } v2 = clipToCollideWith.hitTest(this.__hitAreaClip); return v2; } }; v2.Scroll = function (scrollCoef, xDiff, yDiff) { this.__x += scrollCoef * xDiff; this.__y += scrollCoef * yDiff; LayMan.ScrollClip(this.__clip, scrollCoef, xDiff, yDiff); LayMan.ScrollClip(this.__hitAreaClip, scrollCoef, xDiff, yDiff); }; v2.getDamageTypeCausedArray = function (planeX, planeY, planeDir) { if (Math.random() <= this.C_PROBAB_TO_PILOTHIT) { return [enums.DamageTypes.PILOT, enums.DamageOutputs.SMALL]; } var v2; v2 = UtilMath.getRandomNaturalNumber(this.__parentWeapon.getMinDamage(), this.__parentWeapon.getMaxDamage()); var v5; v5 = new Array(); var v6; var v4; var v3 = v2; while (v3 > 0) { v2 = 1 + Math.round((v3 - 1) * Math.random()); v4 = Math.round(enums.DamageTypes.COUNT * Math.random()); v5.push([v4, v2]); v3 -= v2; } this.__explosion.SetType(entities.effects.Explosion.C_TYPE_SPHERE); return v5; }; v2.getInArenaPositionX = function () { return this.__x - this.__myWorld.getScrollOriginX(); }; v2.DontWrap = function () { var v2; v2 = this.getInArenaPositionX(); if (this.__y > Const.C_SCENE_HEIGHT - 15) { this.ChangeState(this.C_STATE_EXPLODING); } if (this.__y < -50) { this.ChangeState(this.C_STATE_INIT); } }; v2.Wrap = function () { if (this.__x > Const.C_SCENE_WIDTH) { this.__x = 0; } if (this.__x < 0) { this.__x = Const.C_SCENE_WIDTH; } if (this.__y > Const.C_SCENE_HEIGHT - 15) { this.ChangeState(this.C_STATE_EXPLODING); this.__explosion.SetType(entities.effects.Explosion.C_TYPE_HEMISPHERE_UP); } if (this.__y < -50) { this.ChangeState(this.C_STATE_INIT); } }; v2.SyncClipAttributes = function (x, y, rotation) { this.__clip._x = x; this.__clip._y = y; if (rotation != undefined) { this.__clip._rotation = rotation; } }; v2.CheckLifeTime = function () { this.ChangeState(this.C_STATE_INIT); }; v2.AlignDirToGravity = function () { this.__direction.Multiply(this.__velocity); this.__direction.Add(this.__gravityVec); this.__velocity = this.__direction.Length(); this.__direction.Normalize(); }; v2.HandleStateActions = function () { switch (this.__currentState) { case this.C_STATE_FLYING: super.Move(); this.AlignDirToGravity(); this.SyncClipAttributes(this.__x, this.__y, this.__direction.getY() >= 0.99 ? undefined : this.__direction.getAlphaDeg() + 180); this.CheckScreenBordersFunction(); this.CheckTargetProximity(); break; case this.C_STATE_EXPLODING: this.CheckLifeTime(); } }; v2.ChangeState = function (newState) { this.HandleStatesTransition(this.__currentState, newState); this.__currentState = newState; }; v2.HandleStatesTransition = function (oldState, newState) { if (oldState == this.C_STATE_INIT && newState == this.C_STATE_FLYING) { this.__clip._visible = true; this.__clip._visible = true; this.__hitAreaClip._visible = false; } if (oldState == this.C_STATE_FLYING && newState == this.C_STATE_INIT) { this.Init(); } if (oldState == this.C_STATE_FLYING && newState == this.C_STATE_EXPLODING) { this.__clip._visible = false; this.PlayExplosion(); } if (oldState == this.C_STATE_EXPLODING && newState == this.C_STATE_INIT) { this.Init(); } }; v2.PlayExplosion = function () { this.__hitAreaClip._x = this.__clip._x; this.__hitAreaClip._y = this.__clip._y; this.__hitAreaClip.gotoAndPlay('F_BEGIN', 1); this.__explosion.SetXY(this.__x, this.__y); this.__explosion.Play(); this.__SFX.PlayExplosion(); }; v2.CheckTargetProximity = function () { var v3; var v12; var v11; v12 = this.__myWorld.getNumOfPlanes(); var v2; var v4; v3 = 0; while (v3 < v12) { v2 = this.__planesArray[v3]; v4 = v2.getCurrentState(); if (this.__parentPlane.getPlaneIdx() == v2.getPlaneIdx()) { } else { if (v4 == enums.PlaneStates.INIT || v4 == enums.PlaneStates.EXPLODING || v4 == enums.PlaneStates.END) { } else { if (this.C_MIN_DISTANCE_TO_EXPLODE == 0) { if (this.__hitAreaClip.hitTest(v2.getBBoxClip())) { this.ChangeState(this.C_STATE_EXPLODING); return undefined; } } var v10; var v8; v10 = v2.__x; v8 = v2.__y; var v9; var v7; v9 = this.__x; v7 = this.__y; var v6; var v5; v6 = v9 - v10; v5 = v7 - v8; v11 = Math.sqrt(v6 * v6 + v5 * v5); if (v11 < this.C_MIN_DISTANCE_TO_EXPLODE) { this.ChangeState(this.C_STATE_EXPLODING); return undefined; } } } ++v3; } }; v2.UpgradeProximityRange = function () { this.C_MIN_DISTANCE_TO_EXPLODE = this.C_UPGRADED_MIN_DISTANCE_TO_EXPLODE; }; v2.Pause = function (evtObj) { if (evtObj.state == true) { if (this.__clip._visible) { this.__clip.stop(); this.__hitAreaClip.stop(); } } else { if (this.__clip._visible) { this.__clip.play(); this.__hitAreaClip.play(); } } }; v2.getItemId = function () { return this.__parentWeapon.getItemId(); }; v2.getParentPlane = function () { return this.__parentPlane; }; v2.C_STATE_INIT = 1; v2.C_STATE_FLYING = 2; v2.C_STATE_EXPLODING = 3; v2.C_BASE_VELOCITY = 2; v2.C_MIN_DISTANCE = Const.C_SCENE_WIDTH / 2; v2.C_MAX_DISTANCE = Const.C_SCENE_WIDTH; v2.C_PROBAB_TO_PILOTHIT = 0.2; v2.C_MIN_DISTANCE_TO_EXPLODE = 0; v2.C_UPGRADED_MIN_DISTANCE_TO_EXPLODE = 80; v2.__myIdx = undefined; ASSetPropFlags(entities.projectiles.ImpactBomb.prototype, null, 1); } #endinitclip } movieClip 1746 __Packages.enums.PlaneStates { #initclip if (!_global.enums) { _global.enums = new Object(); } if (!_global.enums.PlaneStates) { var v1 = function () {}; enums.PlaneStates = v1; var v2 = v1.prototype; v1.C_PLANE_CAMEL = 0; v1.C_PLANE_FOKKER = 1; v1.C_PLANE_HENRIOT = 2; v1.C_PLANE_PFALZ = 3; v1.INIT = 0; v1.ROLLING = 1; v1.FLYING = 2; v1.BREAKDOWN = 3; v1.BULLETHIT = 4; v1.EXPLODING = 5; v1.END = 6; ASSetPropFlags(enums.PlaneStates.prototype, null, 1); } #endinitclip } movieClip 1747 __Packages.Scrolling { #initclip if (!_global.Scrolling) { var v1 = function () {}; _global.Scrolling = v1; var v2 = v1.prototype; v1.xDiff = 0; v1.yDiff = 0; v1.C_SCROLL_COEF_L1 = 0.1; v1.C_SCROLL_COEF_L2 = 0; v1.C_SCROLL_COEF_L3 = 0.7; v1.C_SCROLL_COEF_L4 = 1; v1.C_SCROLL_COEF_L5 = 1.2; ASSetPropFlags(_global.Scrolling.prototype, null, 1); } #endinitclip } movieClip 1748 __Packages.entities.effects.Explosion { #initclip if (!_global.entities) { _global.entities = new Object(); } if (!_global.entities.effects) { _global.entities.effects = new Object(); } if (!_global.entities.effects.Explosion) { var v1 = function (etype, durType, seed, fury, elemScale, areaArgs, fadeSpeed) { this.__type = (etype == undefined) ? entities.effects.Explosion.C_TYPE_SPHERE : etype; this.__durType = (durType == undefined) ? entities.effects.Explosion.C_DURTYPE_ONCE : durType; this.__seed = (seed == undefined) ? 7 : seed; this.C_EXPLOSION_CENTER_CLIPS_COUNT = Math.round(this.__seed / 2); this.__fury = (fury == undefined) ? 1 : fury / 100; this.__elemScale = (elemScale == undefined) ? 100 : elemScale; this.__fadeSpeed = (fadeSpeed == undefined) ? entities.effects.Explosion.C_FADE_SPEED_SLOW : fadeSpeed; switch (this.__type) { case entities.effects.Explosion.C_TYPE_SPHERE: case entities.effects.Explosion.C_TYPE_HEMISPHERE_UP: this.__radius = areaArgs[0]; break; case entities.effects.Explosion.C_TYPE_RECTANGLE: this.__width = areaArgs[0]; this.__height = areaArgs[1]; } this.SetXY(0, 0); this.InitClips(); this.__curFreeClipIdx = 0; this.__isPlaying = false; this.__clipPlayingCount = 0; }; entities.effects.Explosion = v1; var v2 = v1.prototype; v2.InitClips = function () { this.__clips = new Array(); this.__emptyClip = LayMan.RegisterEmptyClip('', this.C_DEF_DEPTH_TYPE); var v3; var v2; v3 = 0; while (v3 < this.__seed) { if (v3 % this.C_EXPLOSION_CENTER_MODULO == 0) { v2 = LayMan.RegisterClip(this.C_EXPLOSION_CLIP_NAMES_ARRAY[this.__fadeSpeed][0], this.C_DEF_DEPTH_TYPE); } else { v2 = LayMan.RegisterClip(this.C_EXPLOSION_CLIP_NAMES_ARRAY[this.__fadeSpeed][1], this.C_DEF_DEPTH_TYPE); } v2.gotoAndStop('F_END'); v2._visible = false; switch (this.__type) { case entities.effects.Explosion.C_TYPE_SPHERE: case entities.effects.Explosion.C_TYPE_HEMISPHERE_UP: var v4; v4 = this.C_SCALE_VARIATION * Math.random() / 100; v2._xscale = this.__elemScale - this.__elemScale * this.C_SCALE_VARIATION / 100 + 2 * this.__elemScale * v4; v2._yscale = v2._xscale; break; case entities.effects.Explosion.C_TYPE_RECTANGLE: var v4 = this.C_SCALE_VARIATION * Math.random() / 100; v2._xscale = this.__elemScale - this.__elemScale * this.C_SCALE_VARIATION / 100 + 2 * this.__elemScale * v4; v2._yscale = v2._xscale; } v2.gotoAndStop('F_FIRST'); this.__clips.push(v2); ++v3; } }; v2.InitListeners = function () { if (this.__durType == entities.effects.Explosion.C_DURTYPE_DURATION) { this.__emptyClip.onEnterFrame = mx.utils.Delegate.create(this, this.Update); } }; v2.DisableListeners = function () { if (this.__durType == entities.effects.Explosion.C_DURTYPE_DURATION) { this.__emptyClip.onEnterFrame = undefined; } }; v2.SetXY = function (x, y) { this.__x = x; this.__y = y; }; v2.Move = function (x, y) { this.__x += x; this.__y += y; var v2; var v3; v2 = 0; while (v2 < this.__seed) { v3 = this.__clips[v2]; v3._x += x; v3._y += y; ++v2; } }; v2.SetType = function (etype) { this.__type = etype; }; v2.Play = function () { this.__isPlaying = true; switch (this.__durType) { case entities.effects.Explosion.C_DURTYPE_ONCE: var v3; var v2; v3 = 0; while (v3 < this.__seed) { if (Math.random() < this.__fury) { v2 = this.__clips[v3]; this.SetRandomPositionAndScale(v2, v3); v2._visible = true; v2.gotoAndPlay(this.GetRandomFrame(v2)); v2.onEnterFrame = DelegatePlus.create(this, this.UpdateSingleClipPosition, v2, v3); ++this.__clipPlayingCount; } ++v3; } break; case entities.effects.Explosion.C_DURTYPE_DURATION: this.InitListeners(); } }; v2.GetRandomFrame = function (mc) { var v3; var v4; switch (this.__durType) { return v3; case entities.effects.Explosion.C_DURTYPE_ONCE: v3 = UtilMath.getRandomNaturalNumber(2, mc._totalframes / 10); return v3; case entities.effects.Explosion.C_DURTYPE_DURATION: v4 = Math.sqrt((mc._x - this.__x) * (mc._x - this.__x) + (mc._y - this.__y) * (mc._y - this.__y)) / this.__radius; v3 = UtilMath.getRandomNaturalNumber(2, mc._totalframes / 5); return v3; } return v3; }; v2.Stop = function () { this.DisableListeners(); }; v2.Update = function () { if (!FrameMan.isNthFrame(this.C_NTH_FRAME_UPDATE_TRIGGER)) { return undefined; } var v2; if (Math.random() < this.__fury) { v2 = this.__clips[this.__curFreeClipIdx]; this.SetRandomPositionAndScale(v2, this.__curFreeClipIdx); v2._visible = true; v2.gotoAndPlay(this.GetRandomFrame(v2)); v2.onEnterFrame = DelegatePlus.create(this, this.UpdateSingleClipPosition, v2); this.__curFreeClipIdx = (this.__curFreeClipIdx + 1) % this.__seed; } }; v2.UpdateSingleClipPosition = function (mc, idx) { if (mc._visible) { LayMan.ScrollClip(mc, this.__scrollCoef, Scrolling.xDiff, Scrolling.yDiff); } else { --this.__clipPlayingCount; mc.onEnterFrame = undefined; if (this.__clipPlayingCount <= 0) { this.__isPlaying = false; } } }; v2.SetRandomPositionAndScale = function (mc, idx) { switch (this.__type) { case entities.effects.Explosion.C_TYPE_SPHERE: var v3; v3 = new Vector2D(1, 0); v3.Rotate(360 * Math.random()); var v4; if (idx % this.C_EXPLOSION_CENTER_MODULO == 0) { v4 = UtilMath.getRandomNaturalNumber(0, 2 * this.__radius / 3); } else { v4 = UtilMath.getRandomNaturalNumber(this.__radius / 3, this.__radius); } v3.Multiply(v4); mc._x = this.__x + v3.getX(); mc._y = this.__y + v3.getY(); var v5; v5 = this.C_SCALE_VARIATION * Math.random() / 100; mc._xscale = this.__elemScale - this.__elemScale * this.C_SCALE_VARIATION / 100 + 2 * this.__elemScale * v5; mc._yscale = mc._xscale; mc._rotation = 360 * Math.random(); break; case entities.effects.Explosion.C_TYPE_HEMISPHERE_UP: var v3 = new Vector2D(1, 0); v3.Rotate(-180 * Math.random()); if (idx % this.C_EXPLOSION_CENTER_MODULO == 0) { var v4 = UtilMath.getRandomNaturalNumber(0, 2 * this.__radius / 3); } else { var v4 = UtilMath.getRandomNaturalNumber(this.__radius / 3, this.__radius); } v3.Multiply(v4); mc._x = this.__x + v3.getX(); mc._y = this.__y + v3.getY(); var v5 = this.C_SCALE_VARIATION * Math.random() / 100; mc._xscale = this.__elemScale - this.__elemScale * this.C_SCALE_VARIATION / 100 + 2 * this.__elemScale * v5; mc._yscale = mc._xscale; mc._rotation = -180 * Math.random(); break; case entities.effects.Explosion.C_TYPE_RECTANGLE: mc._x = this.__x - this.__width / 2 + this.__width * Math.random(); mc._y = this.__y - this.__height / 2 + this.__height * Math.random(); var v5 = this.C_SCALE_VARIATION * Math.random() / 100; mc._xscale = this.__elemScale - this.__elemScale * this.C_SCALE_VARIATION / 100 + 2 * this.__elemScale * v5; mc._yscale = mc._xscale; mc._rotation = 360 * Math.random(); } }; v2.Destroy = function () { var v2; var v3; v2 = 0; while (v2 < this.__seed) { v3 = this.__clips[v2]; LayMan.RemoveClip(v3); ++v2; } LayMan.RemoveClip(this.__emptyClip); }; v2.SetFury = function (fury) { this.__fury = fury; }; v2.Scroll = function (scrollCoef, xDiff, yDiff) { this.__x += Math.round(scrollCoef * xDiff, 2); this.__y += Math.round(scrollCoef * yDiff, 2); }; v2.ScrollClip = function (mc, scrollCoef, xDiff, yDiff) { LayMan.ScrollClip(mc, scrollCoef, xDiff, yDiff); }; v2.Pause = function (evtObj) { var v4; v4 = evtObj.state; if (v4 == true) { if (this.__isPlaying) { this.__emptyClip.onEnterFrame = undefined; var v3; var v5; v5 = this.__seed; v3 = 0; while (v3 < this.__seed) { var v2; v2 = this.__clips[v3]; if (v2._visible) { v2.onEnterFrame = undefined; v2.stop(); } ++v3; } } } else { if (this.__durType == entities.effects.Explosion.C_DURTYPE_DURATION && this.__isPlaying) { this.__emptyClip.onEnterFrame = mx.utils.Delegate.create(this, this.Update); } if (this.__isPlaying) { var v5 = this.__seed; var v3 = 0; while (v3 < this.__seed) { var v2 = this.__clips[v3]; if (v2._visible) { v2.onEnterFrame = DelegatePlus.create(this, this.UpdateSingleClipPosition, v2); v2.play(); } ++v3; } } } }; v2.SetPauseListener = function (listenerObj, eventId) { listenerObj.addEventListener(eventId, mx.utils.Delegate.create(this, this.Pause)); }; v1.C_TYPE_RECTANGLE = 0; v1.C_TYPE_SPHERE = 1; v1.C_TYPE_HEMISPHERE_UP = 2; v1.C_DURTYPE_ONCE = 0; v1.C_DURTYPE_DURATION = 1; v1.C_FADE_SPEED_SLOW = 0; v1.C_FADE_SPEED_FAST = 1; v2.C_DEF_DEPTH_TYPE = LayMan.C_S_FGD_NEAR; v2.C_EXPLOSION_CLIP_NAMES_ARRAY = [['S_EXPLOSION_ELEMENT_01_SLOW', 'S_EXPLOSION_ELEMENT_02_SLOW'], ['S_EXPLOSION_ELEMENT_01_FAST', 'S_EXPLOSION_ELEMENT_02_FAST']]; v2.C_EXPLOSION_CENTER_CLIPS_COUNT = 5; v2.C_EXPLOSION_CENTER_MODULO = 2; v2.C_NTH_FRAME_UPDATE_TRIGGER = 3; v2.C_SCALE_VARIATION = 40; v2.__scrollCoef = Scrolling.C_SCROLL_COEF_L4; ASSetPropFlags(entities.effects.Explosion.prototype, null, 1); } #endinitclip } movieClip 1749 __Packages.entities.projectiles.HomingMissile { #initclip if (!_global.entities) { _global.entities = new Object(); } if (!_global.entities.projectiles) { _global.entities.projectiles = new Object(); } if (!_global.entities.projectiles.HomingMissile) { var v1 = function (x, y, velocity, direction, parentPlane, myWorld, parentWeapon, skyType) { super.constructor.apply(this, arguments); this.__parentPlane = parentPlane; this.__myWorld = myWorld; this.__SFX = this.__parentPlane.getSFXObject(); this.__parentWeapon = parentWeapon; this.__clip = LayMan.RegisterClip('S_HOMING_MISSILE', LayMan.C_S_COLLIDE_NEAR); enums.SkyTypes.AdjustTint(this.__clip, skyType, enums.SkyTypes.C_OBJ_COLOR_AMOUNT); this.__crosshairClip = LayMan.RegisterClip('S_CROSSHAIR', LayMan.C_S_FGD_NEAR); if (this.__myWorld.isScrolling()) { this.CheckScreenBordersFunction = this.DontWrap; } else { this.CheckScreenBordersFunction = this.Wrap; } this.__targetPos = new Vector2D(0, 0); this.__planesArray = this.__myWorld.getPlanesArray(); this.__reacquireTargetTimer = new Timer(this.C_REACQUIRE_TARGET_TIME); this.__willToSeek = this.C_WILL_TO_SEEK; this.__smokeTrail = new entities.effects.Smoke(15, 50, new Vector2D(0, -0.25), 80, 16777215, 0, entities.effects.Smoke.C_FADE_SPEED_FAST); this.__smokeTrail.SetPauseListener(this.__myWorld, World.EVT_GAME_PAUSED); this.__explosion = new entities.effects.Explosion(entities.effects.Explosion.C_TYPE_SPHERE, entities.effects.Explosion.C_DURTYPE_ONCE, 10, 100, 70, new Array('25'), entities.effects.Explosion.C_FADE_SPEED_FAST); this.__explosion.SetPauseListener(this.__myWorld, World.EVT_GAME_PAUSED); this.Init(); this.__myWorld.addEventListener(World.EVT_GAME_PAUSED, mx.utils.Delegate.create(this, this.Pause)); }; entities.projectiles.HomingMissile = v1; entities.projectiles.HomingMissile extends entities.basic.MovingEntity; var v2 = v1.prototype; _global.entities.projectiles.HomingMissile implements _global.entities.projectiles.ProjectileInterface; v2.Init = function () { this.setXY(0, 0); this.setVelocity(0); this.setDirXY(-1, 0); this.setVisibility(false); this.__travelledDistance = 0; this.__isTargetAcquired = false; this.__targetPos.setXY(0, 0); this.__reacquireTargetTimer.StopTimer(); this.__smokeTrail.Stop(); if (this.__myIdx != undefined) { World.UnRegMPArr(this); this.__myIdx = undefined; } }; v2.Fire = function (planePosX, planePosY, planeDir, planeVelocity) { var v5; var v4; var v3; var v6; v6 = (this.__parentPlane.getClip())._yscale; if (v6 > 0) { v3 = 1; } else { v3 = -1; } var v2; v2 = new Vector2D(1, 0); if (this.__parentPlane.getFaceRightOrientation()) { v2.Rotate(this.__parentPlane.getRotation() + v3 * 90 + this.__parentPlane.getAngleCorrection()); } else { v2.Rotate(this.__parentPlane.getRotation() - v3 * 90 + this.__parentPlane.getAngleCorrection()); } v5 = planePosX + 20 * v2.getX(); v4 = planePosY + 20 * v2.getY(); this.setXY(v5, v4); this.setDirVec(planeDir); this.setVelocity(planeVelocity); this.setVisibility(true); this.SyncClipAttributes(v5, v4, this.__parentPlane.getClipRotation()); if (!this.__reacquireTargetTimer.isTimerStarted()) { this.__reacquireTargetTimer.StartTimer(); } this.AcquireTarget(); this.__SFX.PlayHomingMissileDrop(); false; this.__smokeTrail.SetXY(this.__x - this.__direction.getX() * 30, this.__y - this.__direction.getY() * 30); this.__smokeTrail.Play(); World.RegMPArr(this); return true; }; v2.Update = function (idx) { this.__myIdx = idx; this.AcquireTarget(); this.UpdateTargetPos(); this.UpdateMissileVelocity(); this.UpdateMissileDirection(); this.SyncClipAttributes(this.__x, this.__y, this.__direction.getAlphaDeg() + 180); this.CheckLifeTime(); super.Move(); this.CheckScreenBordersFunction(); this.__smokeTrail.SetXY(this.__x - this.__direction.getX() * 30, this.__y - this.__direction.getY() * 30); }; v2.PlayPlaneImpact = function () { this.PlayExplosion(); }; v2.setDirX = function (x) { super.setDirX(x); this.__clip._rotation = 180 - 1 * this.__direction.getAlphaDeg(); }; v2.setDirY = function (y) { super.setDirY(y); this.__clip._rotation = 180 - 1 * this.__direction.getAlphaDeg(); }; v2.isCollision = function (clipToCollideWith) { if (!this.__isMoving) { return false; } if (!(Math.abs(clipToCollideWith._x - this.__x) < Const.C_HITTEST_COMPUTE_DISTANCE && Math.abs(clipToCollideWith._y - this.__y) < Const.C_HITTEST_COMPUTE_DISTANCE)) { return false; } var v2; v2 = clipToCollideWith.hitTest(this.__x, this.__y, false); if (v2) { } return v2; }; v2.Scroll = function (scrollCoef, xDiff, yDiff) { this.__x += scrollCoef * xDiff; this.__y += scrollCoef * yDiff; LayMan.ScrollClip(this.__clip, scrollCoef, xDiff, yDiff); }; v2.getDamageTypeCausedArray = function (planeX, planeY, planeDir) { var v2; var v5; var v4; v2 = new Vector2D(this.__x - planeX, this.__y - planeY); v5 = v2.Length(); v2.Normalize(); v4 = planeDir.Dot(v2); var v3; v3 = UtilMath.getRandomNaturalNumber(this.__parentWeapon.getMinDamage(), this.__parentWeapon.getMaxDamage()); if (v4 < -0.6 && v5 > 7) { this.PlayExplosion(); this.Init(); return [enums.DamageTypes.TAIL, v3]; } if (v4 > 0.6 && v5 > 7) { this.PlayExplosion(); this.Init(); return [enums.DamageTypes.ENGINE, v3]; } if (Math.random() < 0.4) { this.PlayExplosion(); this.Init(); return [enums.DamageTypes.PILOT, v3]; } else { this.PlayExplosion(); this.Init(); return [enums.DamageTypes.GUN, v3]; } false; }; v2.UpgradeWillToSeek = function () { this.__willToSeek = this.C_UPGRADED_WILL_TO_SEEK; }; v2.setVisibility = function (isVisible) { this.__clip._visible = isVisible; if (this.__isTargetAcquired && isVisible) { this.__crosshairClip._visible = isVisible; } if (!isVisible) { this.__crosshairClip._visible = isVisible; } }; v2.PlayGroundImpact = function () { if (this.getDirX() < 0) { } else {} this.setDirY(0); this.__SFX.PlayBulletHitDamage(); this.PlayExplosion(true); }; v2.getInArenaPositionX = function () { return this.__x - this.__myWorld.getScrollOriginX(); }; v2.PlayExplosion = function (isGround) { if (isGround == undefined || isGround == false) { this.__explosion.SetType(entities.effects.Explosion.C_TYPE_SPHERE); } else { this.__explosion.SetType(entities.effects.Explosion.C_TYPE_HEMISPHERE_UP); } this.__explosion.SetXY(this.__x, this.__y); this.__explosion.Play(); this.__SFX.PlayExplosion(); }; v2.DontWrap = function () { var v2; v2 = this.getInArenaPositionX(); if (v2 > Const.C_SCENE_MAX_WIDTH) { this.Init(); } if (v2 < Const.C_SCENE_MIN_WIDTH) { this.Init(); } if (this.__y > Const.C_SCENE_HEIGHT - 15) { this.PlayGroundImpact(); this.Init(); } if (this.__y < -50) { this.Init(); } }; v2.Wrap = function () { if (this.__x > Const.C_SCENE_WIDTH) { this.__x = 0; } if (this.__x < 0) { this.__x = Const.C_SCENE_WIDTH; } if (this.__y > Const.C_SCENE_HEIGHT - 15) { this.PlayGroundImpact(); this.Init(); } if (this.__y < -50) { this.Init(); } }; v2.SyncClipAttributes = function (x, y, rotation) { this.__clip._x = x; this.__clip._y = y; if (rotation != undefined) { this.__clip._rotation = rotation; } }; v2.CheckLifeTime = function () { this.__travelledDistance += this.__velocity; if (this.__travelledDistance > this.C_MAX_DISTANCE) { this.Init(); } }; v2.UpdateTargetPos = function () { if (this.__isTargetAcquired) { this.__targetPos.setXY(this.__targetPlaneObj.getXPos(), this.__targetPlaneObj.getYPos()); this.__crosshairClip._x = this.__targetPos.getX(); this.__crosshairClip._y = this.__targetPos.getY(); } }; v2.AcquireTarget = function () { if (!this.__reacquireTargetTimer.TimeIntervalElapsed()) { return undefined; } this.__reacquireTargetTimer.StopTimer(); var v2; var v8; v8 = this.__planesArray.length; var v7; var v4; v7 = new Vector2D(this.__x, this.__y); v4 = new Vector2D(0, 0); var v5; var v3; var v6; v3 = 999999999999.0; v5 = v3; v6 = -1; v2 = 0; while (v2 < v8) { if (this.__parentPlane.getPlaneIdx() == this.__planesArray[v2].getPlaneIdx()) { } else { if (this.__planesArray[v2].getCurrentState() == enums.PlaneStates.INIT || this.__planesArray[v2].getCurrentState() == enums.PlaneStates.EXPLODING || this.__planesArray[v2].getCurrentState() == enums.PlaneStates.END) { } else { v4.setXY(this.__planesArray[v2].getXPos(), this.__planesArray[v2].getYPos()); v3 = v7.Distance(v4); if (v3 > this.C_MIN_DISTANCE) { } else { if (v3 < v5) { v5 = v3; v6 = v2; } } } } ++v2; } false; false; if (v6 != -1) { this.__isTargetAcquired = true; this.__targetPlaneObj = this.__planesArray[v6]; this.__crosshairClip._visible = true; } else { this.__isTargetAcquired = false; this.__crosshairClip._visible = false; } this.__reacquireTargetTimer.StartTimer(); }; v2.UpdateMissileVelocity = function () { if (this.__velocity < this.C_BASE_VELOCITY) { this.__velocity += this.C_VELOCITY_SPEEDUP_STEP; } }; v2.UpdateMissileDirection = function () { if (this.__isTargetAcquired) { var v2; v2 = new Vector2D(0, 0); v2.Add(this.__targetPos); v2.SubXY(this.__x, this.__y); v2.Normalize(); v2.Multiply(this.__willToSeek); this.__direction.Add(v2); this.__direction.Normalize(); false; } }; v2.Destroy = function () { LayMan.RemoveClip(this.__clip); LayMan.RemoveClip(this.__crosshairClip); this.__smokeTrail.Destroy(); this.__explosion.Destroy(); }; v2.Pause = function (evtObj) { if (evtObj.state == true) { if (this.__clip._visible) { this.__clip.stop(); } } else { if (this.__clip._visible) { this.__clip.play(); } } }; v2.getItemId = function () { return this.__parentWeapon.getItemId(); }; v2.getParentPlane = function () { return this.__parentPlane; }; v2.C_BASE_VELOCITY = 8; v2.C_WILL_TO_SEEK = 0.07000000000000001; v2.C_UPGRADED_WILL_TO_SEEK = 0.11; v2.C_REACQUIRE_TARGET_TIME = 800; v2.C_VELOCITY_SPEEDUP_STEP = 0.1; v2.C_MIN_DISTANCE = Const.C_SCENE_WIDTH; v2.C_MAX_DISTANCE = 2 * Const.C_SCENE_WIDTH; v2.__myIdx = undefined; ASSetPropFlags(entities.projectiles.HomingMissile.prototype, null, 1); } #endinitclip } movieClip 1750 __Packages.entities.effects.Smoke { #initclip if (!_global.entities) { _global.entities = new Object(); } if (!_global.entities.effects) { _global.entities.effects = new Object(); } if (!_global.entities.effects.Smoke) { var v1 = function (seed, elemScale, wind, fury, color, jitter, fadeSpeed, elemClipName, isInitPositionStatic, depthType) { this.__seed = (seed == undefined) ? 15 : seed; this.__wind = (wind == undefined) ? new Vector2D(0, 0) : wind; this.__fury = (fury == undefined) ? 1 : fury / 100; this.__elemScale = (elemScale == undefined) ? 100 : elemScale; this.__color = color; this.__jitter = (jitter == undefined) ? 0 : jitter; this.__fadeSpeed = (fadeSpeed == undefined) ? entities.effects.Smoke.C_FADE_SPEED_SLOW : fadeSpeed; this.__isInitPositionStatic = (isInitPositionStatic == undefined) ? false : isInitPositionStatic; this.__depthType = (depthType == undefined) ? this.C_DEF_DEPTH_TYPE : depthType; this.__rotation = undefined; this.__curFreeClipIdx = 0; this.InitClips(elemClipName); this.__isPlaying = false; this.__clipPlayingCount = 0; }; entities.effects.Smoke = v1; var v2 = v1.prototype; v2.InitClips = function (elemClipName) { var v4; if (elemClipName != undefined) { v4 = elemClipName; } else { v4 = this.C_SMOKE_CLIP_NAME[this.__fadeSpeed]; } this.__clips = new Array(); this.__emptyClip = LayMan.RegisterEmptyClip('', LayMan.C_S_OTHER); var v3; var v2; v3 = 0; while (v3 < this.__seed) { v2 = LayMan.RegisterClip(v4, this.__depthType); v2._visible = false; v2._xscale = this.__elemScale; v2._yscale = this.__elemScale; if (this.__color != undefined) { LayMan.SetTint(v2, this.__color, 100); } v2.gotoAndStop('F_FIRST'); this.__clips.push(v2); ++v3; } }; v2.InitListeners = function () { this.__emptyClip.onEnterFrame = mx.utils.Delegate.create(this, this.Update); }; v2.DisableListeners = function () { this.__emptyClip.onEnterFrame = undefined; }; v2.SetXY = function (x, y) { this.__x = x; this.__y = y; }; v2.SetRotation = function (rot) { this.__rotation = rot; }; v2.Play = function () { this.__isPlaying = true; this.InitListeners(); }; v2.GetRandomFrame = function (mc) { var v1; v1 = 2; return v1; }; v2.Stop = function () { this.__isPlaying = false; this.DisableListeners(); }; v2.Update = function () { this.Scroll(this.__scrollCoef, Scrolling.xDiff, Scrolling.yDiff); if (!FrameMan.isNthFrame(this.C_NTH_FRAME_UPDATE_TRIGGER)) { return undefined; } if (Math.random() < this.__fury) { var v2; v2 = this.__clips[this.__curFreeClipIdx]; this.SetRandomPositionAndScale(v2); v2._visible = true; v2.gotoAndPlay(this.GetRandomFrame(v2)); v2.onEnterFrame = DelegatePlus.create(this, this.UpdateSingleClipPosition, v2, this.__curFreeClipIdx); this.__curFreeClipIdx = (this.__curFreeClipIdx + 1) % this.__seed; ++this.__clipPlayingCount; } }; v2.UpdateSingleClipPosition = function (mc, idx) { if (mc._visible) { mc._x += this.__wind.getX() - this.__jitter / 2 + this.__jitter * Math.random(); mc._y += this.__wind.getY() - this.__jitter / 2 + this.__jitter * Math.random(); LayMan.ScrollClip(mc, this.__scrollCoef, Scrolling.xDiff, Scrolling.yDiff); } else { --this.__clipPlayingCount; mc.onEnterFrame = undefined; if (this.__clipPlayingCount <= 0) { this.__isPlaying = false; } } }; v2.SetRandomPositionAndScale = function (mc) { var v3; if (this.__isInitPositionStatic) { mc._x = this.__x; mc._y = this.__y; if (this.__rotation == undefined) { mc._rotation = 360 * Math.random(); } else { mc._rotation = this.__rotation; } v3 = this.C_SCALE_VARIATION * Math.random(); mc._xscale = this.__elemScale - this.C_SCALE_VARIATION * 0.5 + v3; mc._yscale = this.__elemScale - this.C_SCALE_VARIATION * 0.5 + v3; } else { v3 = this.C_POSITION_VARIATION * Math.random(); mc._x = this.__x - this.C_POSITION_VARIATION * 0.5 + v3; v3 = this.C_POSITION_VARIATION * Math.random(); mc._y = this.__y - this.C_POSITION_VARIATION * 0.5 + v3; v3 = this.C_SCALE_VARIATION * Math.random(); mc._xscale = this.__elemScale - this.C_SCALE_VARIATION * 0.5 + v3; mc._yscale = this.__elemScale - this.C_SCALE_VARIATION * 0.5 + v3; if (this.__rotation == undefined) { mc._rotation = 360 * Math.random(); } else { mc._rotation = this.__rotation; } } }; v2.Destroy = function () { var v2; var v3; v2 = 0; while (v2 < this.__seed) { v3 = this.__clips[v2]; LayMan.RemoveClip(v3); ++v2; } LayMan.RemoveClip(this.__emptyClip); }; v2.SetWind = function (x, y) { this.__wind.setXY(x, y); }; v2.SetFury = function (fury) { this.__fury = fury; }; v2.Scroll = function (scrollCoef, xDiff, yDiff) { this.__x += Math.round(scrollCoef * xDiff, 2); this.__y += Math.round(scrollCoef * yDiff, 2); }; v2.ScrollClip = function (mc, scrollCoef, xDiff, yDiff) { LayMan.ScrollClip(mc, scrollCoef, xDiff, yDiff); }; v2.Pause = function (evtObj) { var v4; v4 = evtObj.state; if (v4 == true) { if (this.__isPlaying) { this.__emptyClip.onEnterFrame = undefined; var v3; var v5; v5 = this.__seed; v3 = 0; while (v3 < this.__seed) { var v2; v2 = this.__clips[v3]; if (v2._visible) { v2.onEnterFrame = undefined; v2.stop(); } ++v3; } } } else { if (this.__isPlaying) { this.__emptyClip.onEnterFrame = mx.utils.Delegate.create(this, this.Update); var v5 = this.__seed; var v3 = 0; while (v3 < this.__seed) { var v2 = this.__clips[v3]; if (v2._visible) { v2.onEnterFrame = DelegatePlus.create(this, this.UpdateSingleClipPosition, v2); v2.play(); } ++v3; } } } }; v2.SetPauseListener = function (listenerObj, eventId) { listenerObj.addEventListener(eventId, mx.utils.Delegate.create(this, this.Pause)); }; v2.C_DEF_DEPTH_TYPE = LayMan.C_S_FGD_NEAR; v2.C_SMOKE_CLIP_NAME = ['S_SMOKE_ELEMENT_SLOW', 'S_SMOKE_ELEMENT_FAST']; v1.C_FADE_SPEED_SLOW = 0; v1.C_FADE_SPEED_FAST = 1; v2.C_NTH_FRAME_UPDATE_TRIGGER = 2; v2.C_SCALE_VARIATION = 20; v2.C_POSITION_VARIATION = 5; v2.__scrollCoef = Scrolling.C_SCROLL_COEF_L4; ASSetPropFlags(entities.effects.Smoke.prototype, null, 1); } #endinitclip } movieClip 1751 __Packages.entities.projectiles.EmpDisruptor { #initclip if (!_global.entities) { _global.entities = new Object(); } if (!_global.entities.projectiles) { _global.entities.projectiles = new Object(); } if (!_global.entities.projectiles.EmpDisruptor) { var v1 = function (x, y, velocity, direction, parentPlane, myWorld, parentWeapon, skyType) { super.constructor.apply(this, arguments); this.__parentPlane = parentPlane; this.__myWorld = myWorld; this.__SFX = this.__parentPlane.getSFXObject(); this.__parentWeapon = parentWeapon; var v4; v4 = this.__parentPlane.getClip(); this.__clip = LayMan.RegisterClipInClip(v4, 'S_EMP_FLASH'); this.__hitAreaClip = LayMan.RegisterClipInClip(v4, 'S_EMP_FLASH_BBOX'); this.__hitAreaClip._visible = false; this.__currentState = this.C_STATE_INIT; this.Init(); this.__myWorld.addEventListener(World.EVT_GAME_PAUSED, mx.utils.Delegate.create(this, this.Pause)); }; entities.projectiles.EmpDisruptor = v1; entities.projectiles.EmpDisruptor extends entities.basic.MovingEntity; var v2 = v1.prototype; _global.entities.projectiles.EmpDisruptor implements _global.entities.projectiles.ProjectileInterface; v2.Init = function () { this.setVelocity(0); this.setVisibility(false); if (this.__myIdx != undefined) { World.UnRegMPArr(this); this.__myIdx = undefined; } }; v2.Fire = function (planePosX, planePosY, planeDir, planeVelocity) { this.setVelocity(1); this.__SFX.PlayEMPDisruptorOn(); this.StartEMPClips(); World.RegMPArr(this); this.ChangeState(this.C_STATE_EXPLODING); return true; }; v2.Update = function (idx) { this.__myIdx = idx; this.HandleStateActions(); }; v2.Destroy = function () { LayMan.RemoveClip(this.__clip); LayMan.RemoveClip(this.__hitAreaClip); }; v2.setDirX = function (x) { super.setDirX(x); this.__clip._rotation = 180 - 1 * this.__direction.getAlphaDeg(); }; v2.setDirY = function (y) { super.setDirY(y); this.__clip._rotation = 180 - 1 * this.__direction.getAlphaDeg(); }; v2.isCollision = function (clipToCollideWith) { if (!(Math.abs(clipToCollideWith._x - this.__parentPlane.__x) < this.C_MAX_DISTANCE && Math.abs(clipToCollideWith._y - this.__parentPlane.__y) < this.C_MAX_DISTANCE)) { return false; } if (!this.__isMoving) { return false; } var v2; v2 = clipToCollideWith.hitTest(this.__hitAreaClip); if (v2) { this.__SFX.PlayEMPDisruptorOn(); } return v2; }; v2.Scroll = function (scrollCoef, xDiff, yDiff) {}; v2.getDamageTypeCausedArray = function (planeX, planeY, planeDir) { var v2; v2 = UtilMath.getRandomNaturalNumber(this.__parentWeapon.getMinDamage(), this.__parentWeapon.getMaxDamage()); var v4; v4 = new Array(); var v5; var v3 = v2; while (v3 > 0) { v2 = 1 + Math.round((v3 - 1) * Math.random()); v4.push([enums.DamageTypes.ENGINE, v2]); v3 -= v2; } v4.push([enums.DamageTypes.EMP_STALL, enums.DamageOutputs.NONE]); return v4; }; v2.setVisibility = function (isVisible) { this.__clip._visible = isVisible; }; v2.getInArenaPositionX = function () { return this.__x - this.__myWorld.getScrollOriginX(); }; v2.CheckLifeTime = function () { if (this.__clip._currentframe == this.__clip._totalframes) { this.ChangeState(this.C_STATE_INIT); } }; v2.StartEMPClips = function () { this.__clip.gotoAndPlay('F_BEGIN'); this.__hitAreaClip.gotoAndPlay('F_BEGIN'); }; v2.HandleStateActions = function () { switch (this.__currentState) { case this.C_STATE_INIT: break; case this.C_STATE_EXPLODING: this.CheckLifeTime(); } }; v2.ChangeState = function (newState) { this.HandleStatesTransition(this.__currentState, newState); this.__currentState = newState; }; v2.HandleStatesTransition = function (oldState, newState) { if (oldState == this.C_STATE_INIT && newState == this.C_STATE_EXPLODING) { this.__clip._visible = true; } if (oldState == this.C_STATE_EXPLODING && newState == this.C_STATE_INIT) { this.Init(); } }; v2.Pause = function (evtObj) { if (evtObj.state == true) { if (this.__clip._visible) { this.__clip.stop(); this.__hitAreaClip.stop(); } } else { if (this.__clip._visible) { this.__clip.play(); this.__hitAreaClip.play(); } } }; v2.getItemId = function () { return this.__parentWeapon.getItemId(); }; v2.getParentPlane = function () { return this.__parentPlane; }; v2.C_STATE_INIT = 1; v2.C_STATE_EXPLODING = 2; v2.C_MAX_DISTANCE = 200; v2.__myIdx = undefined; ASSetPropFlags(entities.projectiles.EmpDisruptor.prototype, null, 1); } #endinitclip } movieClip 1752 __Packages.entities.projectiles.Nuke { #initclip if (!_global.entities) { _global.entities = new Object(); } if (!_global.entities.projectiles) { _global.entities.projectiles = new Object(); } if (!_global.entities.projectiles.Nuke) { var v1 = function (x, y, velocity, direction, parentPlane, myWorld, parentWeapon, skyType) { super.constructor.apply(this, arguments); this.__parentPlane = parentPlane; this.__myWorld = myWorld; this.__SFX = this.__parentPlane.getSFXObject(); this.__parentWeapon = parentWeapon; this.__clip = LayMan.RegisterClip('S_NUKE', LayMan.C_S_COLLIDE_NEAR); enums.SkyTypes.AdjustTint(this.__clip, skyType, enums.SkyTypes.C_OBJ_COLOR_AMOUNT); this.__hitAreaClip = LayMan.RegisterClip('S_NUKE_EXPLOSION_BBOX', LayMan.C_S_COLLIDE_NEAR); this.__screenFlashClip = LayMan.RegisterClip('S_NUKE_SCREEN_FLASH', LayMan.C_S_OTHER); if (this.__myWorld.isScrolling()) { this.CheckScreenBordersFunction = this.DontWrap; } else { this.CheckScreenBordersFunction = this.Wrap; } this.__gravityVec = new Vector2D(0, Const.C_G * 0.8); this.__currentState = this.C_STATE_INIT; this.__explosion = new entities.effects.Explosion(entities.effects.Explosion.C_TYPE_SPHERE, entities.effects.Explosion.C_DURTYPE_ONCE, 30, 100, 400, new Array('120'), entities.effects.Explosion.C_FADE_SPEED_SLOW); this.__explosion.SetPauseListener(this.__myWorld, World.EVT_GAME_PAUSED); this.Init(); this.__myWorld.addEventListener(World.EVT_GAME_PAUSED, mx.utils.Delegate.create(this, this.Pause)); }; entities.projectiles.Nuke = v1; entities.projectiles.Nuke extends entities.basic.MovingEntity; var v2 = v1.prototype; _global.entities.projectiles.Nuke implements _global.entities.projectiles.ProjectileInterface; v2.Init = function () { this.setXY(0, 0); this.setVelocity(0); this.setDirXY(-1, 0); this.__clip._visible = false; this.__hitAreaClip._visible = false; this.__screenFlashClip._visible = false; if (this.__myIdx != undefined) { World.UnRegMPArr(this); this.__myIdx = undefined; } }; v2.Fire = function (planePosX, planePosY, planeDir, planeVelocity) { var v3; var v2; v3 = planePosX; v2 = planePosY + 5; this.setXY(v3, v2); this.setDirVec(planeDir); this.setVelocity(planeVelocity); this.SyncClipAttributes(v3, v2, this.__parentPlane.getClipRotation()); this.__SFX.PlayBombDrop(); World.RegMPArr(this); this.ChangeState(this.C_STATE_FLYING); return true; }; v2.Update = function (idx) { this.__myIdx = idx; this.HandleStateActions(); }; v2.Destroy = function () { LayMan.RemoveClip(this.__clip); LayMan.RemoveClip(this.__hitAreaClip); LayMan.RemoveClip(this.__screenFlashClip); this.__explosion.Destroy(); }; v2.PlayPlaneImpact = function () {}; v2.setDirX = function (x) { super.setDirX(x); this.__clip._rotation = 180 - 1 * this.__direction.getAlphaDeg(); }; v2.setDirY = function (y) { super.setDirY(y); this.__clip._rotation = 180 - 1 * this.__direction.getAlphaDeg(); }; v2.isCollision = function (clipToCollideWith) { if (!this.isMoving()) { return false; } var v2; if (this.__currentState == this.C_STATE_FLYING) { if (!(Math.abs(clipToCollideWith._x - this.__x) < Const.C_HITTEST_COMPUTE_DISTANCE && Math.abs(clipToCollideWith._y - this.__y) < Const.C_HITTEST_COMPUTE_DISTANCE)) { return false; } v2 = clipToCollideWith.hitTest(this.__x, this.__y, false); if (v2) { this.ChangeState(this.C_STATE_EXPLODING); } return v2; } if (this.__currentState == this.C_STATE_EXPLODING) { if (this.__hitAreaClip._currentframe == this.__hitAreaClip._totalframes) { return false; } v2 = clipToCollideWith.hitTest(this.__hitAreaClip); return v2; } }; v2.Scroll = function (scrollCoef, xDiff, yDiff) { this.__x += scrollCoef * xDiff; this.__y += scrollCoef * yDiff; LayMan.ScrollClip(this.__clip, scrollCoef, xDiff, yDiff); LayMan.ScrollClip(this.__hitAreaClip, scrollCoef, 2 * xDiff, yDiff); }; v2.getDamageTypeCausedArray = function (planeX, planeY, planeDir) { if (Math.random() <= this.C_PROBAB_TO_PILOTHIT) { return [enums.DamageTypes.PILOT, enums.DamageOutputs.SMALL]; } var v2; v2 = UtilMath.getRandomNaturalNumber(this.__parentWeapon.getMinDamage(), this.__parentWeapon.getMaxDamage()); var v5; v5 = new Array(); var v6; var v4; var v3 = v2; while (v3 > 0) { v2 = 1 + Math.round((v3 - 1) * Math.random()); v4 = Math.round(enums.DamageTypes.COUNT * Math.random()); v5.push([v4, v2]); v3 -= v2; } this.__explosion.SetType(entities.effects.Explosion.C_TYPE_SPHERE); return v5; }; v2.getInArenaPositionX = function () { return this.__x - this.__myWorld.getScrollOriginX(); }; v2.DontWrap = function () { if (this.__y > Const.C_SCENE_HEIGHT - 15) { this.ChangeState(this.C_STATE_EXPLODING); } if (this.__y < -50) { this.ChangeState(this.C_STATE_INIT); } }; v2.Wrap = function () { if (this.__x > Const.C_SCENE_WIDTH) { this.__x = 0; } if (this.__x < 0) { this.__x = Const.C_SCENE_WIDTH; } if (this.__y > Const.C_SCENE_HEIGHT - 15) { this.__explosion.SetType(entities.effects.Explosion.C_TYPE_HEMISPHERE_UP); this.ChangeState(this.C_STATE_EXPLODING); } if (this.__y < -50) { this.ChangeState(this.C_STATE_INIT); } }; v2.SyncClipAttributes = function (x, y, rotation) { this.__clip._x = this.__x; this.__clip._y = this.__y; if (rotation != undefined) { this.__clip._rotation = rotation; } }; v2.CheckLifeTime = function () { if (this.__screenFlashClip._currentframe == this.__screenFlashClip._totalframes) { this.ChangeState(this.C_STATE_INIT); } }; v2.AlignDirToGravity = function () { this.__direction.Multiply(this.__velocity); this.__direction.Add(this.__gravityVec); this.__velocity = this.__direction.Length(); this.__direction.Normalize(); }; v2.HandleStateActions = function () { switch (this.__currentState) { break; case this.C_STATE_INIT: case this.C_STATE_FLYING: super.Move(); this.AlignDirToGravity(); this.SyncClipAttributes(this.__x, this.__y, this.__direction.getY() >= 0.99 ? undefined : this.__direction.getAlphaDeg() + 180); this.CheckScreenBordersFunction(); break; case this.C_STATE_EXPLODING: this.CheckLifeTime(); } }; v2.ChangeState = function (newState) { this.HandleStatesTransition(this.__currentState, newState); this.__currentState = newState; }; v2.HandleStatesTransition = function (oldState, newState) { if (oldState == this.C_STATE_INIT && newState == this.C_STATE_FLYING) { this.__clip._visible = true; this.__clip._visible = true; this.__hitAreaClip._visible = false; this.__screenFlashClip._visible = false; } if (oldState == this.C_STATE_FLYING && newState == this.C_STATE_INIT) { this.Init(); } if (oldState == this.C_STATE_FLYING && newState == this.C_STATE_EXPLODING) { this.__clip._visible = false; this.__screenFlashClip._visible = true; this.PlayExplosion(); } if (oldState == this.C_STATE_EXPLODING && newState == this.C_STATE_INIT) { this.Init(); } }; v2.PlayExplosion = function () { this.__hitAreaClip._x = this.__clip._x; this.__hitAreaClip._y = this.__clip._y; this.__hitAreaClip.gotoAndPlay('F_BEGIN', 1); this.__screenFlashClip.gotoAndPlay('F_BEGIN', 1); this.__explosion.SetXY(this.__x, this.__y); this.__explosion.Play(); this.__SFX.PlayExplosion(); }; v2.Pause = function (evtObj) { if (evtObj.state == true) { if (this.__clip._visible) { this.__clip.stop(); this.__hitAreaClip.stop(); } } else { if (this.__clip._visible) { this.__clip.play(); this.__hitAreaClip.play(); } } }; v2.getItemId = function () { return this.__parentWeapon.getItemId(); }; v2.getParentPlane = function () { return this.__parentPlane; }; v2.C_STATE_INIT = 1; v2.C_STATE_FLYING = 2; v2.C_STATE_EXPLODING = 3; v2.C_BASE_VELOCITY = 2; v2.C_MIN_DISTANCE = Const.C_SCENE_WIDTH / 2; v2.C_MAX_DISTANCE = Const.C_SCENE_WIDTH; v2.C_PROBAB_TO_PILOTHIT = 0.2; v2.__myIdx = undefined; ASSetPropFlags(entities.projectiles.Nuke.prototype, null, 1); } #endinitclip } movieClip 1753 __Packages.FlyLabels { #initclip if (!_global.FlyLabels) { var v1 = function () { this.__labelArray = new Array(); this.__syncEmptyClip = LayMan.RegisterEmptyClip('', LayMan.C_S_OTHER); this.__syncEmptyClip.onEnterFrame = mx.utils.Delegate.create(this, this.Update); }; _global.FlyLabels = v1; var v2 = v1.prototype; v2.CreateTextField = function (x, y, txt, depth) { var v1; v1 = LayMan.CreateTextField(x, y, FlyLabels.C_LABEL_WIDTH, FlyLabels.C_LABEL_HEIGHT, FlyLabels.C_DEF_DEPTH_TYPE, depth); v1.selectable = false; v1.type = 'dynamic'; v1.text = String(txt); v1.selectable = false; v1.multiline = true; v1.embedFonts = true; v1._alpha = 100; var v2; v2 = v1.getTextFormat(); v2 = new TextFormat(); v1.size = 13; v1.bold = true; v1.align = 'center'; v2.color = 0; v2.font = 'fntFrutiger'; v1.setTextFormat(v2); return v1; }; v1.SetLabelFormat = function (txtField, size, bold, align) { var v1; v1 = txtField.getTextFormat(); if (size != undefined) { v1.size = size; } if (bold != undefined) { v1.bold = bold; } if (align != undefined) { v1.align = align; } txtField.setTextFormat(v1); }; v1.SetLabelColor = function (txtField, color) { var v1; v1 = txtField.getTextFormat(); v1.color = color; txtField.setTextFormat(v1); }; v1.SetLabelFont = function (txtField, font) { var v1; v1 = txtField.getTextFormat(); if (font != undefined) { v1.font = font; } txtField.setTextFormat(v1); }; v1.SetMoveFadeSteps = function (yStep, alphaStep) { if (yStep != undefined) { FlyLabels.__yStep = yStep; } if (alphaStep != undefined) { FlyLabels.__alphaStep = alphaStep; } }; v2.PlaceLabel = function (x, y, txt, yStep, alphaStep) { var v2; v2 = this.CreateTextField(x, y, txt, this.__curDepth); if (yStep != undefined) { FlyLabels.__yStep = yStep; } if (alphaStep != undefined) { FlyLabels.__alphaStep = alphaStep; } this.__labelArray.push(v2); ++this.__curDepth; this.__curDepth = this.__firstDepth + (this.__curDepth - this.__firstDepth) % this.C_MAX_DEPTH_OFFSET; return v2; }; v2.Update = function () { var v2; var v3; v3 = this.__labelArray.length; if (v3 == 0) { return undefined; } v2 = 0; while (v2 < v3) { if (this.MoveAndFadeLabel(v2) == false) { LayMan.RemoveTextField(this.__labelArray[v2]); this.__labelArray.splice(v2, 1); } ++v2; } }; v2.Hide = function () { var v2; var v3; v3 = this.__labelArray.length; if (v3 == 0) { return undefined; } v2 = 0; while (v2 < v3) { this.__labelArray[v2]._visible = false; ++v2; } this.__labelArray.splice(0, v3); }; v2.MoveAndFadeLabel = function (idx) { if (FrameMan.isNthFrame(3)) { var v2; v2 = this.__labelArray[idx]; v2._y -= 3 * FlyLabels.__yStep; v2._alpha -= 3 * FlyLabels.__alphaStep; } if (v2._alpha < 0) { return false; } return true; }; v2.Destroy = function () { var v2; var v3; v3 = this.__labelArray.length; v2 = 0; while (v2 < v3) { this.__labelArray[v2]._visible = false; LayMan.RemoveTextField(this.__labelArray[v2]); ++v2; } this.__labelArray.splice(0, v3); LayMan.RemoveClip(this.__syncEmptyClip); this.__syncEmptyClip.onEnterFrame = null; }; v1.C_FAST_FADEOUT = 1.2; v1.C_SLOW_FADEOUT = 0.75; v1.C_FAST_MOVEMENT = 0.8; v1.C_SLOW_MOVEMENT = 0.25; v1.C_FNT_SIZE_BIG = 30; v1.C_FNT_SIZE_VERY_BIG = 40; v1.C_FNT_SIZE_BONUS_INFO = 18; v1.C_FNT_SIZE_KILL_INFO = 18; v1.C_FNT_SIZE_DAMAGE_INFO = 18; v1.C_LABEL_WIDTH = 250; v1.C_LABEL_HEIGHT = 50; v1.C_DEF_DEPTH_TYPE = LayMan.C_S_FLY_LABELS; v2.C_MAX_DEPTH_OFFSET = 50; v2.__firstDepth = 0; v2.__curDepth = 0; v1.__yStep = FlyLabels.C_SLOW_MOVEMENT; v1.__alphaStep = FlyLabels.C_SLOW_FADEOUT; ASSetPropFlags(_global.FlyLabels.prototype, null, 1); } #endinitclip } movieClip 1754 __Packages.enums.BonusTypes { #initclip if (!_global.enums) { _global.enums = new Object(); } if (!_global.enums.BonusTypes) { var v1 = function () {}; enums.BonusTypes = v1; var v2 = v1.prototype; v1.getInfo = function (id, iType) { return enums.BonusTypes.C_BONUS_INFO[id][iType]; }; v1.NUM_OF_GOOD_BONUSES = 4; v1.TOTAL_BONUSES = 8; v1.GUN_BERSERK = 0; v1.AFTERBURNER = 1; v1.SCREWCUTTER = 2; v1.EXTRA_LIFE = 3; v1.GUN_JAM = 4; v1.ENGINE_FAILURE = 5; v1.ENGINE_JAM = 6; v1.DRUNKEN_PILOT = 7; v1.C_INFO_IS_GOOD = 0; v1.C_INFO_NAME = 1; v1.C_BONUS_INFO = [[true, 'Gun berserk'], [true, 'Afterburner'], [true, 'Screwcutter'], [true, 'Extra life'], [false, 'Gun jam'], [false, 'Engine failure'], [false, 'Engine jam'], [false, 'Drunken pilot']]; ASSetPropFlags(enums.BonusTypes.prototype, null, 1); } #endinitclip } movieClip 1755 __Packages.enums.WeatherTypes { #initclip if (!_global.enums) { _global.enums = new Object(); } if (!_global.enums.WeatherTypes) { var v1 = function () {}; enums.WeatherTypes = v1; var v2 = v1.prototype; v1.COUNT = 3; v1.SUNNY = 0; v1.PARTLY = 1; v1.CLOUDY = 2; ASSetPropFlags(enums.WeatherTypes.prototype, null, 1); } #endinitclip } movieClip 1756 __Packages.entities.Obstacles.Obstacle { #initclip if (!_global.entities) { _global.entities = new Object(); } if (!_global.entities.Obstacles) { _global.entities.Obstacles = new Object(); } if (!_global.entities.Obstacles.Obstacle) { var v1 = function () { super(); }; entities.Obstacles.Obstacle = v1; entities.Obstacles.Obstacle extends entities.basic.MovingEntity; var v2 = v1.prototype; v1.C_STATE_INIT = 0; v1.C_STATE_FLYING = 1; v1.C_STATE_EXPLODING = 2; v1.C_STATE_END = 3; v1.C_STATE_FALLING = 4; v1.C_STATE_FLY_IN = 5; v1.C_STATE_STATIC = 6; v1.C_STATE_FLY_OUT = 7; ASSetPropFlags(entities.Obstacles.Obstacle.prototype, null, 1); } #endinitclip } movieClip 1757 __Packages.entities.Obstacles.ObstacleInterface { #initclip if (!_global.entities) { _global.entities = new Object(); } if (!_global.entities.Obstacles) { _global.entities.Obstacles = new Object(); } if (!_global.entities.Obstacles.ObstacleInterface) { _global.entities.Obstacles.ObstacleInterface = function () {}; } #endinitclip } movieClip 1758 __Packages.entities.Obstacles.Ring { #initclip if (!_global.entities) { _global.entities = new Object(); } if (!_global.entities.Obstacles) { _global.entities.Obstacles = new Object(); } if (!_global.entities.Obstacles.Ring) { var v1 = function (myWorld, skyType, args) { var v4; v4 = (args[entities.Obstacles.Ring.C_ARG_TYPE_GROUP_ID] == undefined) ? GrpMan.C_DEFAULT_GROUP_ID : args[entities.Obstacles.Ring.C_ARG_TYPE_GROUP_ID]; this.__groupId = GrpMan.registerInGroup(v4); mx.events.EventDispatcher.initialize(this); super.constructor.apply(this, undefined); ++entities.Obstacles.Ring.INSTANCES_COUNT; this.__currInstanceId = entities.Obstacles.Ring.INSTANCES_COUNT; this.__myWorld = myWorld; this.__clipBkg = LayMan.RegisterClip('S_RING_BKG', LayMan.C_S_COLLIDE_FAR); enums.SkyTypes.AdjustTint(this.__clipBkg, skyType, enums.SkyTypes.C_OBJ_COLOR_AMOUNT); this.__clipFgd = LayMan.RegisterClip('S_RING_FGD', LayMan.C_S_FGD_FAR); enums.SkyTypes.AdjustTint(this.__clipFgd, skyType, enums.SkyTypes.C_OBJ_COLOR_AMOUNT); this.__hitAreaClip = LayMan.RegisterClip('S_RING_BBOX', LayMan.C_S_OTHER); this.__hitAreaClip._visible = false; this.__currentState = entities.Obstacles.Ring.C_STATE_INIT; this.__obstacleType = args[entities.Obstacles.Ring.C_ARG_TYPE_OBSTACLE_TYPE]; this.setXY(args[entities.Obstacles.Ring.C_ARG_TYPE_X], args[entities.Obstacles.Ring.C_ARG_TYPE_Y]); this.__rotation = args[entities.Obstacles.Ring.C_ARG_TYPE_ROTATION]; this.__targetType = (args[entities.Obstacles.Ring.C_ARG_TYPE_TARGET_TYPE] == undefined) ? enums.TargetTypes.NONE : args[entities.Obstacles.Ring.C_ARG_TYPE_TARGET_TYPE]; this.Init(); this.__myWorld.addEventListener(World.EVT_GAME_PAUSED, mx.utils.Delegate.create(this, this.Pause)); }; entities.Obstacles.Ring = v1; entities.Obstacles.Ring extends entities.basic.MovingEntity; var v2 = v1.prototype; _global.entities.Obstacles.Ring implements _global.entities.Obstacles.ObstacleInterface; v2.Init = function () { this.__clipBkg._x = this.__x; this.__clipBkg._y = this.__y; this.__clipBkg._rotation = this.__rotation; this.__clipFgd._x = this.__clipBkg._x; this.__clipFgd._y = this.__clipBkg._y; this.__clipFgd._rotation = this.__clipBkg._rotation; this.__hitAreaClip._x = this.__clipBkg._x; this.__hitAreaClip._y = this.__clipBkg._y; this.__hitAreaClip._rotation = this.__clipBkg._rotation; if (this.__myIdx == undefined) { this.__myIdx = World.RegMObsArr(this); } }; v2.Update = function (idx) { this.__myIdx = idx; this.HandleStateActions(); }; v2.Destroy = function () { if (this.__myIdx != undefined) { World.UnRegMObsArr(this.__myIdx); } LayMan.RemoveClip(this.__clipBkg); LayMan.RemoveClip(this.__clipFgd); LayMan.RemoveClip(this.__hitAreaClip); }; v2.getObstacleType = function () { return this.__obstacleType; }; v2.Scroll = function (scrollCoef, xDiff, yDiff) { this.__x += Math.round(scrollCoef * xDiff, 2); this.__y += Math.round(scrollCoef * yDiff, 2); LayMan.ScrollClip(this.__clipBkg, scrollCoef, xDiff, yDiff); LayMan.ScrollClip(this.__clipFgd, scrollCoef, xDiff, yDiff); LayMan.ScrollClip(this.__hitAreaClip, scrollCoef, xDiff, yDiff); }; v2.HitTestByPlanesAndProjectiles = function (planeObj) { if (this.__currentState != entities.Obstacles.Ring.C_STATE_FLYING) { return undefined; } this.HitTestByPlanes(planeObj); }; v2.HitTestByProjectiles2 = function (mpArr, mpSize) {}; v2.HitTestByPlanes = function (planeObj) { if (this.__currentState != entities.Obstacles.Ring.C_STATE_FLYING) { return undefined; } var v2; var v3; v3 = planeObj.getBBoxClip(); v2 = this.__hitAreaClip.hitTest(v3); if (v2) { this.ReactToCollisionWithPlanes(planeObj); } }; v2.ReactToCollisionWithPlanes = function (planeObj) { this.ChangeState(entities.Obstacles.Ring.C_STATE_EXPLODING); }; v2.HandleStateActions = function () { switch (this.__currentState) { case entities.Obstacles.Ring.C_STATE_INIT: this.ChangeState(entities.Obstacles.Ring.C_STATE_FLYING); break; case entities.Obstacles.Ring.C_STATE_EXPLODING: this.__clipBkg._alpha -= this.C_FADE_OUT_STEP; this.__clipFgd._alpha -= this.C_FADE_OUT_STEP; if (this.__clipBkg._alpha <= 0) { this.ChangeState(entities.Obstacles.Ring.C_STATE_END); } } }; v2.ChangeState = function (newState) { this.HandleStatesTransition(this.__currentState, newState); this.__currentState = newState; }; v2.HandleStatesTransition = function (oldState, newState) { if (oldState == entities.Obstacles.Ring.C_STATE_INIT && newState == entities.Obstacles.Ring.C_STATE_FLYING) { this.__clipBkg._visible = true; this.__clipFgd._visible = true; } if (oldState == entities.Obstacles.Ring.C_STATE_FLYING && newState == entities.Obstacles.Ring.C_STATE_EXPLODING) { GrpMan.unregisterFromGroup(this.__groupId); } if (oldState == entities.Obstacles.Ring.C_STATE_EXPLODING && newState == entities.Obstacles.Ring.C_STATE_END) { this.__clipBkg._visible = false; this.__clipFgd._visible = false; this.dispatchEvent({'target': this, 'type': entities.Obstacles.Ring.EVT_UNIT_DESTROYED, 'objType': this.__obstacleType, 'targType': this.__targetType}); } }; v2.getTargetType = function () { return this.__targetType; }; v2.Pause = function (evtObj) { if (evtObj.state == true) { if (this.__clipBkg._visible) { } } else { if (this.__clipBkg._visible) { } } }; v2.getGroupId = function () { return this.__groupId; }; v2.getCurrentState = function () { return this.__currentState; }; v2.getClip = function () { return this.__hitAreaClip; }; v2.getYPos = function () { return this.__y; }; v2.getX = function () { return this.__x; }; v2.getDirection = function () { return this.__direction; }; v2.getVelocity = function () { return this.__velocity; }; v1.EVT_UNIT_DESTROYED = 'EVT_UNIT_DESTROYED'; v1.INSTANCES_COUNT = 0; v1.C_STATE_INIT = entities.Obstacles.Obstacle.C_STATE_INIT; v1.C_STATE_FLYING = entities.Obstacles.Obstacle.C_STATE_FLYING; v1.C_STATE_EXPLODING = entities.Obstacles.Obstacle.C_STATE_EXPLODING; v1.C_STATE_END = entities.Obstacles.Obstacle.C_STATE_END; v2.C_FADE_OUT_STEP = 3; v1.C_ARG_TYPE_OBSTACLE_TYPE = 0; v1.C_ARG_TYPE_X = 1; v1.C_ARG_TYPE_Y = 2; v1.C_ARG_TYPE_ROTATION = 3; v1.C_ARG_TYPE_TARGET_TYPE = 4; v1.C_ARG_TYPE_GROUP_ID = 5; v2.__myIdx = undefined; ASSetPropFlags(entities.Obstacles.Ring.prototype, null, 1); } #endinitclip } movieClip 1759 __Packages.entities.Obstacles.Target { #initclip if (!_global.entities) { _global.entities = new Object(); } if (!_global.entities.Obstacles) { _global.entities.Obstacles = new Object(); } if (!_global.entities.Obstacles.Target) { var v1 = function (myWorld, skyType, args) { var v4; v4 = (args[entities.Obstacles.Target.C_ARG_TYPE_GROUP_ID] == undefined) ? GrpMan.C_DEFAULT_GROUP_ID : args[entities.Obstacles.Target.C_ARG_TYPE_GROUP_ID]; this.__groupId = GrpMan.registerInGroup(v4); mx.events.EventDispatcher.initialize(this); super.constructor.apply(this, undefined); ++entities.Obstacles.Target.INSTANCES_COUNT; this.__currInstanceId = entities.Obstacles.Target.INSTANCES_COUNT; this.__myWorld = myWorld; this.__currHitPoints = (args[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] == undefined) ? 1 : args[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS]; this.C_MAX_HITPOINTS = this.__currHitPoints; this.__clip = LayMan.RegisterClip('S_TARGET', LayMan.C_S_COLLIDE_FAR); this.__clip.gotoAndStop('F_BEGIN'); enums.SkyTypes.AdjustTint(this.__clip, skyType, enums.SkyTypes.C_OBJ_COLOR_AMOUNT); this.__hitAreaClip = LayMan.RegisterClip('S_TARGET_BBOX', LayMan.C_S_OTHER); this.__hitAreaClip._visible = false; this.__currentState = entities.Obstacles.Target.C_STATE_INIT; this.__obstacleType = args[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE]; this.setXY(args[entities.Obstacles.Target.C_ARG_TYPE_X], args[entities.Obstacles.Target.C_ARG_TYPE_Y]); this.setDirXY(0, -1); this.setVelocity(0); this.__targetType = (args[entities.Obstacles.Target.C_ARG_TYPE_TARGET_TYPE] == undefined) ? enums.TargetTypes.NONE : args[entities.Obstacles.Target.C_ARG_TYPE_TARGET_TYPE]; this.__fallingTimer = new Timer(this.C_FALLING_TIME); this.Init(); this.__myWorld.addEventListener(World.EVT_GAME_PAUSED, mx.utils.Delegate.create(this, this.Pause)); }; entities.Obstacles.Target = v1; entities.Obstacles.Target extends entities.basic.MovingEntity; var v2 = v1.prototype; _global.entities.Obstacles.Target implements _global.entities.Obstacles.ObstacleInterface; v2.Init = function () { this.__currHitPoints = this.C_MAX_HITPOINTS; this.__clip._x = this.__x; this.__clip._y = this.__y; this.__hitAreaClip._x = this.__clip._x; this.__hitAreaClip._y = this.__clip._y; if (this.__myIdx == undefined) { this.__myIdx = World.RegMObsArr(this); } }; v2.Update = function (idx) { this.__myIdx = idx; this.HandleStateActions(); }; v2.Destroy = function () { if (this.__myIdx != undefined) { World.UnRegMObsArr(this.__myIdx); } LayMan.RemoveClip(this.__clip); LayMan.RemoveClip(this.__hitAreaClip); }; v2.getObstacleType = function () { return this.__obstacleType; }; v2.Scroll = function (scrollCoef, xDiff, yDiff) { this.__x += scrollCoef * xDiff; this.__y += scrollCoef * yDiff; LayMan.ScrollClip(this.__clip, scrollCoef, xDiff, yDiff); LayMan.ScrollClip(this.__hitAreaClip, scrollCoef, xDiff, yDiff); }; v2.HitTestByPlanes = function (planeObj) {}; v2.HitTestByProjectiles2 = function (mpArr, mpSize) { var v4; var v3; var v7; var v2; v3 = 0; while (v3 < mpSize) { v2 = mpArr[v3]; v4 = v2.isCollision(this.__hitAreaClip); if (v4) { this.ReactToCollisionWithProjectiles2(v2, v2.getParentPlane()); } ++v3; } }; v2.ReactToCollisionWithProjectiles2 = function (prj, planeObj) { planeObj.ScoreAddProjectileHit(); var v3; v3 = prj.getDamageTypeCausedArray(this.__x, this.__y, this.__direction); var v13; v13 = v3.length; var v12; v12 = v3[0].length; v12 = (v12 == undefined) ? 1 : v12; var v10 = false; var v11 = v12; if (v12 > 1) { v10 = true; v11 = v13; } var v2; var v8; var v4; v2 = 0; while (v2 < v11) { if (v10) { v8 = v3[v2][0]; v4 = v3[v2][1]; } else { v8 = v3[0]; v4 = v3[1]; } if (this.TakeDamage(v4)) { var v7; v7 = String(enums.ObstacleTypes.getObstacleInfo(this.__obstacleType, enums.ObstacleTypes.INFO_NAME)); var v6; var v5; v6 = this.__x; v5 = this.__y - 10 - 20 * Math.random(); planeObj.ScoreAddKills(this.__obstacleType); planeObj.PlaceDamageLabel(v7 + ' destroyed', v6, v5, FlyLabels.C_FNT_SIZE_DAMAGE_INFO); this.ChangeState(entities.Obstacles.Target.C_STATE_FALLING); return undefined; } ++v2; } }; v2.TakeDamage = function (damageSize) { if (this.__currentState != entities.Obstacles.Target.C_STATE_FLYING) { return undefined; } this.__currHitPoints -= damageSize; if (this.__currHitPoints <= 0) { return true; } else { return false; } }; v2.HandleStateActions = function () { switch (this.__currentState) { case entities.Obstacles.Target.C_STATE_INIT: this.ChangeState(entities.Obstacles.Target.C_STATE_FLYING); break; break; case entities.Obstacles.Target.C_STATE_FLYING: case entities.Obstacles.Target.C_STATE_FALLING: if (this.__fallingTimer.TimeIntervalElapsed()) { this.ChangeState(entities.Obstacles.Target.C_STATE_EXPLODING); } this.setVelocity(this.__velocity + 0.1); super.Move(); this.SyncClipAttributes(this.__x, this.__y); if (this.__y <= -50) { this.ChangeState(entities.Obstacles.Target.C_STATE_EXPLODING); } break; case entities.Obstacles.Target.C_STATE_EXPLODING: this.setVelocity(this.__velocity + 0.1); super.Move(); this.SyncClipAttributes(this.__x, this.__y); if (this.__y <= -50) { this.ChangeState(entities.Obstacles.Target.C_STATE_END); } break; case entities.Obstacles.Target.C_STATE_END: } }; v2.ChangeState = function (newState) { this.HandleStatesTransition(this.__currentState, newState); this.__currentState = newState; }; v2.HandleStatesTransition = function (oldState, newState) { if (oldState == entities.Obstacles.Target.C_STATE_INIT && newState == entities.Obstacles.Target.C_STATE_FLYING) { this.__clip._visible = true; } if (oldState == entities.Obstacles.Target.C_STATE_FLYING && newState == entities.Obstacles.Target.C_STATE_FALLING) { this.__fallingTimer.StartTimer(); this.__clip.gotoAndStop('F_HIT'); } if (oldState == entities.Obstacles.Target.C_STATE_FALLING && newState == entities.Obstacles.Target.C_STATE_EXPLODING) { GrpMan.unregisterFromGroup(this.__groupId); this.dispatchEvent({'target': this, 'type': entities.Obstacles.Target.EVT_UNIT_DESTROYED, 'objType': this.__obstacleType, 'targType': this.__targetType}); } if (oldState == entities.Obstacles.Target.C_STATE_EXPLODING && newState == entities.Obstacles.Target.C_STATE_END) { this.__clip._visible = false; } }; v2.SyncClipAttributes = function (x, y) { this.__clip._x = this.__x; this.__clip._y = this.__y; this.__hitAreaClip._x = this.__clip._x; this.__hitAreaClip._y = this.__clip._y; }; v2.getTargetType = function () { return this.__targetType; }; v2.Pause = function (evtObj) { if (evtObj.state == true) { if (this.__clip._visible) { } } else { if (this.__clip._visible) { } } }; v2.getGroupId = function () { return this.__groupId; }; v2.getCurrentState = function () { return this.__currentState; }; v2.getClip = function () { return this.__hitAreaClip; }; v2.getYPos = function () { return this.__y; }; v2.getX = function () { return this.__x; }; v2.getDirection = function () { return this.__direction; }; v2.getVelocity = function () { return this.__velocity; }; v1.EVT_UNIT_DESTROYED = 'EVT_UNIT_DESTROYED'; v1.INSTANCES_COUNT = 0; v1.C_STATE_INIT = entities.Obstacles.Obstacle.C_STATE_INIT; v1.C_STATE_FLYING = entities.Obstacles.Obstacle.C_STATE_FLYING; v1.C_STATE_FALLING = entities.Obstacles.Obstacle.C_STATE_FALLING; v1.C_STATE_EXPLODING = entities.Obstacles.Obstacle.C_STATE_EXPLODING; v1.C_STATE_END = entities.Obstacles.Obstacle.C_STATE_END; v2.C_FADE_OUT_STEP = 3; v1.C_ARG_TYPE_OBSTACLE_TYPE = 0; v1.C_ARG_TYPE_X = 1; v1.C_ARG_TYPE_Y = 2; v1.C_ARG_TYPE_HITPOINTS = 3; v1.C_ARG_TYPE_TARGET_TYPE = 4; v1.C_ARG_TYPE_GROUP_ID = 5; v2.C_FALLING_TIME = 3000; v2.__myIdx = undefined; ASSetPropFlags(entities.Obstacles.Target.prototype, null, 1); } #endinitclip } movieClip 1760 __Packages.entities.Obstacles.Baloon { #initclip if (!_global.entities) { _global.entities = new Object(); } if (!_global.entities.Obstacles) { _global.entities.Obstacles = new Object(); } if (!_global.entities.Obstacles.Baloon) { var v1 = function (myWorld, skyType, args) { var v4; v4 = (args[entities.Obstacles.Baloon.C_ARG_TYPE_GROUP_ID] == undefined) ? GrpMan.C_DEFAULT_GROUP_ID : args[entities.Obstacles.Baloon.C_ARG_TYPE_GROUP_ID]; this.__groupId = GrpMan.registerInGroup(v4); mx.events.EventDispatcher.initialize(this); super.constructor.apply(this, undefined); ++entities.Obstacles.Baloon.INSTANCES_COUNT; this.__currInstanceId = entities.Obstacles.Baloon.INSTANCES_COUNT; this.__myWorld = myWorld; this.__currHitPoints = (args[entities.Obstacles.Baloon.C_ARG_TYPE_HITPOINTS] == undefined) ? 1 : args[entities.Obstacles.Baloon.C_ARG_TYPE_HITPOINTS]; this.C_MAX_HITPOINTS = this.__currHitPoints; this.__clip = LayMan.RegisterClip('S_BALOON_2', LayMan.C_S_BKG_NEAR); this.GenerateRandomTint(this.__clip); enums.SkyTypes.AdjustTint(this.__clip, skyType, enums.SkyTypes.C_OBJ_COLOR_AMOUNT); this.__clip2 = LayMan.RegisterClip('S_BALOON_BASKET', LayMan.C_S_BKG_NEAR); enums.SkyTypes.AdjustTint(this.__clip2, skyType, enums.SkyTypes.C_OBJ_COLOR_AMOUNT); this.__hitAreaClip = LayMan.RegisterClip('S_BALOON_BBOX_1', LayMan.C_S_OTHER); this.__hitAreaClip._visible = false; this.__currentState = entities.Obstacles.Baloon.C_STATE_INIT; this.__obstacleType = args[entities.Obstacles.Baloon.C_ARG_TYPE_OBSTACLE_TYPE]; this.setXY(args[entities.Obstacles.Baloon.C_ARG_TYPE_X], args[entities.Obstacles.Baloon.C_ARG_TYPE_Y]); this.setVelocity(args[entities.Obstacles.Baloon.C_ARG_TYPE_VELOCITY]); this.setDirVec(args[entities.Obstacles.Baloon.C_ARG_TYPE_DIRECTION]); this.__direction.Normalize(); this.__gravityVec = new Vector2D(0, Const.C_G * 0.1); this.__targetType = (args[entities.Obstacles.Baloon.C_ARG_TYPE_TARGET_TYPE] == undefined) ? enums.TargetTypes.NONE : args[entities.Obstacles.Baloon.C_ARG_TYPE_TARGET_TYPE]; if (this.__direction.getX() > 0) { this.__clip._xscale = 100; } else { this.__clip._xscale = -100; } this.__clip2._xscale = this.__clip._xscale; this.__hitAreaClip._xscale = this.__clip._xscale; this.__onText = (args[entities.Obstacles.Baloon.C_ARG_TYPE_ON_TEXT] == undefined) ? '' : args[entities.Obstacles.Baloon.C_ARG_TYPE_ON_TEXT]; this.__clip.bal.onText.text = this.__onText; if (this.__clip._xscale < 0) { this.__clip.bal.onText._xscale = -1 * this.__clip.bal.onText._xscale; this.__clip.bal.onText._x += 90; this.__clip.bal.onText._y -= 10; } this.__fallingTimer = new Timer(this.C_FALLING_TIME); this.Init(); this.InitGrpFlag(this.__clip2); this.__explosion = new entities.effects.Explosion(entities.effects.Explosion.C_TYPE_RECTANGLE, entities.effects.Explosion.C_DURTYPE_DURATION, 20, 35, 130, [this.__hitAreaClip._width, this.__hitAreaClip._height], entities.effects.Explosion.C_FADE_SPEED_SLOW); this.__explosion2 = new entities.effects.Explosion(entities.effects.Explosion.C_TYPE_SPHERE, entities.effects.Explosion.C_DURTYPE_ONCE, 20, 100, 300, new Array('100'), entities.effects.Explosion.C_FADE_SPEED_SLOW); this.__explosion.SetPauseListener(this.__myWorld, World.EVT_GAME_PAUSED); this.__explosion2.SetPauseListener(this.__myWorld, World.EVT_GAME_PAUSED); this.__myWorld.addEventListener(World.EVT_GAME_PAUSED, mx.utils.Delegate.create(this, this.Pause)); var v5; v5 = (args[entities.Obstacles.Baloon.C_ARG_TYPE_SHOW_HEALTH] == undefined) ? true : args[entities.Obstacles.Baloon.C_ARG_TYPE_SHOW_HEALTH]; if (v5) { this.__healthBar = new entities.other.HealthBar(this.__clip._x, this.__clip._y - 65, this.C_MAX_HITPOINTS, this.C_MAX_HITPOINTS); } this.__sndExplosion = LayMan.RegisterSound(Const.C_EXPLOSION_3_SND, this.__clip); this.SyncClipAttributes(this.__x, this.__y); }; entities.Obstacles.Baloon = v1; entities.Obstacles.Baloon extends entities.basic.MovingEntity; var v2 = v1.prototype; _global.entities.Obstacles.Baloon implements _global.entities.Obstacles.ObstacleInterface; v2.Init = function () { this.__currHitPoints = this.C_MAX_HITPOINTS; this.__clip._x = this.__x; this.__clip._y = this.__y; this.__clip.gotoAndStop('F_BEGIN'); this.__clip2._x = this.__clip._x; this.__clip2._y = this.__clip._y; this.__hitAreaClip._x = this.__clip._x; this.__hitAreaClip._y = this.__clip._y; if (this.__myIdx == undefined) { this.__myIdx = World.RegMObsArr(this); } }; v2.Update = function (idx) { this.__myIdx = idx; this.HandleStateActions(); }; v2.Destroy = function () { if (this.__myIdx != undefined) { World.UnRegMObsArr(this.__myIdx); } LayMan.RemoveClip(this.__clip); LayMan.RemoveClip(this.__clip2); LayMan.RemoveClip(this.__hitAreaClip); this.__healthBar.Destroy(); this.__explosion.Destroy(); this.__explosion2.Destroy(); delete this.__sndExplosion; }; v2.getObstacleType = function () { return this.__obstacleType; }; v2.Scroll = function (scrollCoef, xDiff, yDiff) { this.__x += Math.round(scrollCoef * xDiff, 2); this.__y += Math.round(scrollCoef * yDiff, 2); LayMan.ScrollClip(this.__clip, scrollCoef, xDiff, yDiff); LayMan.ScrollClip(this.__clip2, scrollCoef, xDiff, yDiff); LayMan.ScrollClip(this.__hitAreaClip, scrollCoef, xDiff, yDiff); this.__healthBar.Scroll(scrollCoef, xDiff, yDiff); }; v2.HitTestByPlanes = function (planeObj) {}; v2.HitTestByProjectiles2 = function (mpArr, mpSize) { if (this.__currentState != entities.Obstacles.Baloon.C_STATE_FLYING) { return undefined; } var v4; var v3; var v7; var v2; v3 = 0; while (v3 < mpSize) { v2 = mpArr[v3]; v4 = v2.isCollision(this.__hitAreaClip); if (v4) { this.ReactToCollisionWithProjectiles2(v2, v2.getParentPlane()); } ++v3; } }; v2.ReactToCollisionWithProjectiles = function (weapon, planeObj) { planeObj.ScoreAddProjectileHit(); var v3; v3 = weapon.getDamageTypeCausedArray(this.__x, this.__y, this.__direction); var v13; v13 = v3.length; var v12; v12 = v3[0].length; v12 = (v12 == undefined) ? 1 : v12; var v10 = false; var v11 = v12; if (v12 > 1) { v10 = true; v11 = v13; } var v2; var v8; var v4; v2 = 0; while (v2 < v11) { if (v10) { v8 = v3[v2][0]; v4 = v3[v2][1]; } else { v8 = v3[0]; v4 = v3[1]; } if (this.TakeDamage(v4)) { var v7; v7 = String(enums.ObstacleTypes.getObstacleInfo(this.__obstacleType, enums.ObstacleTypes.INFO_NAME)); var v6; var v5; v6 = this.__x; v5 = this.__y - 10 - 20 * Math.random(); planeObj.ScoreAddKills(this.__obstacleType); planeObj.PlaceDamageLabel(v7 + ' destroyed', v6, v5, FlyLabels.C_FNT_SIZE_DAMAGE_INFO); this.ChangeState(entities.Obstacles.Baloon.C_STATE_FALLING); return undefined; } ++v2; } }; v2.ReactToCollisionWithProjectiles2 = function (prj, planeObj) { planeObj.ScoreAddProjectileHit(); var v3; v3 = prj.getDamageTypeCausedArray(this.__x, this.__y, this.__direction); var v13; v13 = v3.length; var v12; v12 = v3[0].length; v12 = (v12 == undefined) ? 1 : v12; var v10 = false; var v11 = v12; if (v12 > 1) { v10 = true; v11 = v13; } var v2; var v8; var v4; v2 = 0; while (v2 < v11) { if (v10) { v8 = v3[v2][0]; v4 = v3[v2][1]; } else { v8 = v3[0]; v4 = v3[1]; } if (this.TakeDamage(v4)) { var v7; v7 = String(enums.ObstacleTypes.getObstacleInfo(this.__obstacleType, enums.ObstacleTypes.INFO_NAME)); var v6; var v5; v6 = this.__x; v5 = this.__y - 10 - 20 * Math.random(); planeObj.ScoreAddKills(this.__obstacleType); planeObj.PlaceDamageLabel(v7 + ' destroyed', v6, v5, FlyLabels.C_FNT_SIZE_DAMAGE_INFO); this.ChangeState(entities.Obstacles.Baloon.C_STATE_FALLING); return undefined; } ++v2; } }; v2.TakeDamage = function (damageSize) { if (this.__currentState != entities.Obstacles.Baloon.C_STATE_FLYING) { return undefined; } this.__currHitPoints -= damageSize; this.__healthBar.setHealth(this.__currHitPoints, this.C_MAX_HITPOINTS); if (this.__currHitPoints <= 0) { return true; } else { return false; } }; v2.HandleStateActions = function () { switch (this.__currentState) { case entities.Obstacles.Baloon.C_STATE_INIT: this.ChangeState(entities.Obstacles.Baloon.C_STATE_FLYING); break; case entities.Obstacles.Baloon.C_STATE_FLYING: if (this.__velocity != 0) { super.Move(); this.SyncClipAttributes(this.__x, this.__y); this.CheckScreenBordersFunction(); } break; case entities.Obstacles.Baloon.C_STATE_FALLING: if (this.__fallingTimer.TimeIntervalElapsed()) { this.ChangeState(entities.Obstacles.Baloon.C_STATE_EXPLODING); } super.Move(); this.SyncClipAttributes(this.__x, this.__y); this.AlignDirToGravity(); this.CheckScreenBordersFunction(); if (this.__y >= Const.C_SCENE_HEIGHT) { this.ChangeState(entities.Obstacles.Baloon.C_STATE_EXPLODING); } if (this.__direction.getX() > 0) { if (this.__clip._rotation < 45) { this.__clip._rotation += 0.1; this.__clip2._rotation += 0.1; this.__hitAreaClip._rotation += 0.1; } } else { if (this.__clip._rotation > -45) { this.__clip._rotation -= 0.1; this.__clip2._rotation -= 0.1; this.__hitAreaClip._rotation -= 0.1; } } this.__explosion.SetXY(this.__x, this.__y); break; case entities.Obstacles.Baloon.C_STATE_EXPLODING: super.Move(); this.SyncClipAttributes(this.__x, this.__y); this.AlignDirToGravity(); this.CheckScreenBordersFunction(); if (this.__y >= 1.5 * Const.C_SCENE_HEIGHT) { this.ChangeState(entities.Obstacles.Baloon.C_STATE_END); } if (this.__direction.getX() > 0) { if (this.__clip._rotation < 45) { this.__clip._rotation += 0.1; this.__clip2._rotation += 0.1; this.__hitAreaClip._rotation += 0.1; } } else { if (this.__clip._rotation > -45) { this.__clip._rotation -= 0.1; this.__clip2._rotation -= 0.1; this.__hitAreaClip._rotation -= 0.1; } } this.__explosion.SetXY(this.__x, this.__y); break; case entities.Obstacles.Baloon.C_STATE_END: } }; v2.ChangeState = function (newState) { this.HandleStatesTransition(this.__currentState, newState); this.__currentState = newState; }; v2.HandleStatesTransition = function (oldState, newState) { if (oldState == entities.Obstacles.Baloon.C_STATE_INIT && newState == entities.Obstacles.Baloon.C_STATE_FLYING) { this.__clip._visible = true; this.__clip2._visible = true; } if (oldState == entities.Obstacles.Baloon.C_STATE_FLYING && newState == entities.Obstacles.Baloon.C_STATE_FALLING) { this.__fallingTimer.StartTimer(); this.__clip.gotoAndPlay('F_HIT'); this.__explosion.SetXY(this.__x, this.__y); this.__explosion.Play(); this.__healthBar.FadeOut(); } if (oldState == entities.Obstacles.Baloon.C_STATE_FALLING && newState == entities.Obstacles.Baloon.C_STATE_EXPLODING) { GrpMan.unregisterFromGroup(this.__groupId); this.dispatchEvent({'target': this, 'type': entities.Obstacles.Baloon.EVT_UNIT_DESTROYED, 'objType': this.__obstacleType, 'targType': this.__targetType}); this.__clip._visible = false; this.__clip2._visible = false; this.__explosion2.SetXY(this.__x, this.__y); this.__explosion2.Play(); if (_global.GameConf.isSoundFXEnabled()) { this.__sndExplosion.start(); } } if (oldState == entities.Obstacles.Baloon.C_STATE_EXPLODING && newState == entities.Obstacles.Baloon.C_STATE_END) { this.__clip._visible = false; this.__clip2._visible = false; this.__explosion.Stop(); this.Destroy(); } }; v2.SyncClipAttributes = function (x, y) { this.__clip._x = x; this.__clip._y = y; this.__clip2._x = x; this.__clip2._y = y; this.__hitAreaClip._x = this.__clip._x; this.__hitAreaClip._y = this.__clip._y; if (this.__healthBar != undefined) { this.__healthBar.setXY(x, y - 65); } }; v2.CheckScreenBordersFunction = function () { if (this.__x > Const.C_SCENE_MAX_WIDTH + this.__clip._width + 80) { this.__x = Const.C_SCENE_MIN_WIDTH - this.__clip._width; this.__y = UtilMath.getRandomNaturalNumber(0, Const.C_SCENE_HEIGHT * 0.5); } if (this.__x < Const.C_SCENE_MIN_WIDTH - this.__clip._width - 80) { this.__x = Const.C_SCENE_MAX_WIDTH + this.__clip._width; this.__y = UtilMath.getRandomNaturalNumber(0, Const.C_SCENE_HEIGHT * 0.5); } }; v2.AlignDirToGravity = function () { this.__direction.Multiply(this.__velocity); this.__direction.Add(this.__gravityVec); this.__velocity = this.__direction.Length(); this.__direction.Normalize(); }; v2.getTargetType = function () { return this.__targetType; }; v2.GenerateRandomTint = function (mc) { var v2; v2 = UtilMath.getRandomNaturalNumber(0, this.C_COLOR_ARRAY.length - 1); this.SetTint(mc, this.C_COLOR_ARRAY[v2][0], this.C_COLOR_ARRAY[v2][1], this.C_COLOR_ARRAY[v2][2], this.C_COLOR_ARRAY[v2][3]); }; v2.SetTint = function (mc, r, g, b, amount) {}; v2.Pause = function (evtObj) { if (evtObj.state == true) { if (this.__clip._visible) { } } else { if (this.__clip._visible) { } } }; v2.getGroupId = function () { return this.__groupId; }; v2.getCurrentState = function () { return this.__currentState; }; v2.getClip = function () { return this.__hitAreaClip; }; v2.getYPos = function () { return this.__y; }; v2.getX = function () { return this.__x; }; v2.getDirection = function () { return this.__direction; }; v2.getVelocity = function () { return this.__velocity; }; v2.InitGrpFlag = function (clip) { if (GrpMan.getIsGroupColorShowed() && this.__groupId != GrpMan.C_DEFAULT_GROUP_ID) { var v2; v2 = GrpMan.getGroupColor(this.__groupId); LayMan.SetTint(clip.grpFlag, v2, 100); clip.grpFlag.gotoAndPlay('F_BEGIN'); } }; v2.C_COLOR_ARRAY = [[0, 51, 0, 40], [107, 67, 1, 40], [102, 102, 102, 0]]; v1.EVT_UNIT_DESTROYED = 'EVT_UNIT_DESTROYED'; v1.INSTANCES_COUNT = 0; v1.C_STATE_INIT = entities.Obstacles.Obstacle.C_STATE_INIT; v1.C_STATE_FLYING = entities.Obstacles.Obstacle.C_STATE_FLYING; v1.C_STATE_FALLING = entities.Obstacles.Obstacle.C_STATE_FALLING; v1.C_STATE_EXPLODING = entities.Obstacles.Obstacle.C_STATE_EXPLODING; v1.C_STATE_END = entities.Obstacles.Obstacle.C_STATE_END; v2.C_FADE_OUT_STEP = 3; v1.C_ARG_TYPE_OBSTACLE_TYPE = 0; v1.C_ARG_TYPE_X = 1; v1.C_ARG_TYPE_Y = 2; v1.C_ARG_TYPE_VELOCITY = 3; v1.C_ARG_TYPE_DIRECTION = 4; v1.C_ARG_TYPE_HITPOINTS = 5; v1.C_ARG_TYPE_TARGET_TYPE = 6; v1.C_ARG_TYPE_ON_TEXT = 7; v1.C_ARG_TYPE_GROUP_ID = 8; v1.C_ARG_TYPE_SHOW_HEALTH = 9; v2.C_FALLING_TIME = 3000; v2.__myIdx = undefined; ASSetPropFlags(entities.Obstacles.Baloon.prototype, null, 1); } #endinitclip } movieClip 1761 __Packages.entities.other.HealthBar { #initclip if (!_global.entities) { _global.entities = new Object(); } if (!_global.entities.other) { _global.entities.other = new Object(); } if (!_global.entities.other.HealthBar) { var v1 = function (x, y, maxHealth, curHealth) { this.setXY(x, y); this.__clip = LayMan.RegisterClip('S_HEALTH_BAR', LayMan.C_S_BKG_NEAR); this.FadeIn(); this.setHealth(curHealth, maxHealth); }; entities.other.HealthBar = v1; var v2 = v1.prototype; v2.FadeIn = function () { this.__clip._visible = true; }; v2.FadeOut = function (destroyAfterFadeOut) { this.__clip._visible = false; if (destroyAfterFadeOut == true) { this.Destroy(); } }; v2.Destroy = function () { LayMan.RemoveClip(this.__clip); }; v2.setHealth = function (curHealth, maxHealth) { var v6; v6 = curHealth / maxHealth; this.__clip.fill._xscale = v6 * 100; var v10; var v4; var v2; var v5; var v3; v3 = new Array(); if (v6 >= 0.5) { v4 = UtilMath.getDirectRatioFncValue(v6, 0.5, 1); v2 = entities.other.HealthBar.getRGBFromColor(this.C_MID_HEALTH_COLOR); v5 = entities.other.HealthBar.getRGBFromColor(this.C_MAX_HEALTH_COLOR); v3[0] = v2[0] + (v5[0] - v2[0]) * v4; v3[1] = v2[1] + (v5[1] - v2[1]) * v4; v3[2] = v2[2] + (v5[2] - v2[2]) * v4; } else { v4 = UtilMath.getDirectRatioFncValue(v6, 0, 0.5); v2 = entities.other.HealthBar.getRGBFromColor(this.C_MIN_HEALTH_COLOR); v5 = entities.other.HealthBar.getRGBFromColor(this.C_MID_HEALTH_COLOR); v3[0] = v2[0] + (v5[0] - v2[0]) * v4; v3[1] = v2[1] + (v5[1] - v2[1]) * v4; v3[2] = v2[2] + (v5[2] - v2[2]) * v4; } var v8; var v9; var v7; v8 = v3[0]; v9 = v3[1]; v7 = v3[2]; LayMan.SetTintRGB(this.__clip.fill, v8, v9, v7, 50); }; v2.setXY = function (x, y) { this.__x = x; this.__y = y; this.__clip._x = this.__x; this.__clip._y = this.__y; }; v2.Scroll = function (scrollCoef, xDiff, yDiff) { this.__x += Math.round(scrollCoef * xDiff, 2); this.__y += Math.round(scrollCoef * yDiff, 2); LayMan.ScrollClip(this.__clip, scrollCoef, xDiff, yDiff); }; v1.getRGBFromColor = function (color) { var v2; var v4; var v1; v2 = color >> 16; v4 = color >> 8 & 255; v1 = color & 255; return [v2, v4, v1]; }; v1.setColorFromRGB = function (r, g, b) { var v1; v1 = r << 16 + g << 8 + b; return v1; }; v2.C_MAX_HEALTH_COLOR = Const.C_COLOR_GREEN; v2.C_MID_HEALTH_COLOR = Const.C_COLOR_YELLOW; v2.C_MIN_HEALTH_COLOR = Const.C_COLOR_RED; ASSetPropFlags(entities.other.HealthBar.prototype, null, 1); } #endinitclip } movieClip 1762 __Packages.entities.Obstacles.InfoTable { #initclip if (!_global.entities) { _global.entities = new Object(); } if (!_global.entities.Obstacles) { _global.entities.Obstacles = new Object(); } if (!_global.entities.Obstacles.InfoTable) { var v1 = function (myWorld, skyType, args) { var v5; v5 = (args[entities.Obstacles.InfoTable.C_ARG_TYPE_GROUP_ID] == undefined) ? 0 : args[entities.Obstacles.InfoTable.C_ARG_TYPE_GROUP_ID]; this.__groupId = GrpMan.registerInGroup(v5); mx.events.EventDispatcher.initialize(this); super.constructor.apply(this, undefined); ++entities.Obstacles.InfoTable.INSTANCES_COUNT; this.__currInstanceId = entities.Obstacles.InfoTable.INSTANCES_COUNT; this.__myWorld = myWorld; this.InitGroupListener(this.__myWorld); this.__clip = LayMan.RegisterClip(args[entities.Obstacles.InfoTable.C_ARG_TYPE_CLIP_NAME], LayMan.C_S_BKG_FAR); LayMan.SetTint(this.__clip, this.C_TINT_FADE_COLOR, this.C_TINT_FADE_STRENGTH); this.__currentState = entities.Obstacles.InfoTable.C_STATE_INIT; this.__obstacleType = args[entities.Obstacles.InfoTable.C_ARG_TYPE_OBSTACLE_TYPE]; this.setXY(args[entities.Obstacles.InfoTable.C_ARG_TYPE_X], args[entities.Obstacles.InfoTable.C_ARG_TYPE_Y]); this.__staticOriginY = args[entities.Obstacles.InfoTable.C_ARG_TYPE_Y]; this.setDirXY(0, -1); this.setVelocity(0); this.__flyInTime = (args[entities.Obstacles.InfoTable.C_ARG_TYPE_AUTO_FLY_IN_TIME] == undefined) ? undefined : args[entities.Obstacles.InfoTable.C_ARG_TYPE_AUTO_FLY_IN_TIME] * 1000; this.__flyOutTime = (args[entities.Obstacles.InfoTable.C_ARG_TYPE_AUTO_FLY_OUT_TIME] == undefined) ? undefined : args[entities.Obstacles.InfoTable.C_ARG_TYPE_AUTO_FLY_OUT_TIME] * 1000; this.__flyInOriginY = -(2 * this.__clip._height); this.__cycleTime = (args[entities.Obstacles.InfoTable.C_ARG_TYPE_CYCLE_TIME] == undefined) ? undefined : args[entities.Obstacles.InfoTable.C_ARG_TYPE_CYCLE_TIME] * 1000; if (this.__cycleTime != undefined) { this.__cycleTimer = new Timer(this.__cycleTime); } this.__flyInGroupId = args[entities.Obstacles.InfoTable.C_ARG_TYPE_FLY_IN_GROUP_ID]; this.__flyOutGroupId = args[entities.Obstacles.InfoTable.C_ARG_TYPE_FLY_OUT_GROUP_ID]; if (this.__flyInTime != undefined || this.__flyOutTime != undefined) { this.__durationTimer = new Timer(0); } var v6; var v4; v4 = this.C_FLY_IN_INITIAL_VELOCITY; v6 = -1 * this.__flyInOriginY + this.__staticOriginY; this.__flyInDeccel = 0.95 * v4 * v4 / 2 * v6; this.__targetType = enums.TargetTypes.NONE; this.Init(); this.__myWorld.addEventListener(World.EVT_GAME_PAUSED, mx.utils.Delegate.create(this, this.Pause)); }; entities.Obstacles.InfoTable = v1; entities.Obstacles.InfoTable extends entities.basic.MovingEntity; var v2 = v1.prototype; _global.entities.Obstacles.InfoTable implements _global.entities.Obstacles.ObstacleInterface; v2.Init = function () { if (this.__flyInTime != undefined) { this.__durationTimer.StopTimer(); this.__durationTimer.SetTriggerTime(this.__flyInTime); this.__durationTimer.StartTimer(); this.__y = this.__flyInOriginY; this.setDirXY(0, 1); } else { this.__y = this.__staticOriginY; this.setDirXY(0, -1); } if (this.__flyOutTime != undefined) { this.__durationTimer.StopTimer(); this.__durationTimer.SetTriggerTime(this.__flyOutTime); this.__durationTimer.StartTimer(); } if (this.__flyInGroupId != undefined) { this.__y = this.__flyInOriginY; this.setDirXY(0, 1); } else { this.__y = this.__staticOriginY; this.setDirXY(0, -1); } this.SyncClipAttributes(this.__x, this.__y); this.__currentState = entities.Obstacles.InfoTable.C_STATE_INIT; if (this.__flyInTime != undefined || this.__flyOutTime != undefined || this.__cycleTime != undefined || this.__flyInGroupId != undefined || this.__flyOutGroupId != undefined) { if (this.__myIdx == undefined) { this.__myIdx = World.RegMObsArr(this); } } }; v2.Update = function (idx) { this.__myIdx = idx; this.HandleStateActions(); }; v2.Destroy = function () { if (this.__myIdx != undefined) { World.UnRegMObsArr(this.__myIdx); } LayMan.RemoveClip(this.__clip); }; v2.getObstacleType = function () { return this.__obstacleType; }; v2.Scroll = function (scrollCoef, xDiff, yDiff) { this.__x += Math.round(scrollCoef * xDiff, 2); this.__y += Math.round(scrollCoef * yDiff, 2); LayMan.ScrollClip(this.__clip, scrollCoef, xDiff, yDiff); }; v2.HitTestByPlanesAndProjectiles = function (planeObj) {}; v2.HitTestByPlanes = function (planeObj) {}; v2.HitTestByProjectiles2 = function (mpArr, mpSize) {}; v2.HitTestByProjectiles = function (planeObj) {}; v2.HandleStateActions = function () { switch (this.__currentState) { case entities.Obstacles.InfoTable.C_STATE_INIT: if (this.__flyInTime != undefined) { if (this.__durationTimer.isTimerStarted() && this.__durationTimer.TimeIntervalElapsed()) { this.__durationTimer.StopTimer(); this.ChangeState(entities.Obstacles.InfoTable.C_STATE_FLY_IN); return undefined; } } if (this.__flyInGroupId != undefined) { } else { this.ChangeState(entities.Obstacles.InfoTable.C_STATE_STATIC); } break; case entities.Obstacles.InfoTable.C_STATE_FLY_IN: this.setVelocity(this.__velocity - this.__flyInDeccel); if (this.__velocity < 0.3) { this.__velocity = 0.3; } super.Move(); this.SyncClipAttributes(this.__x, this.__y); if (this.__y > this.__staticOriginY) { this.ChangeState(entities.Obstacles.InfoTable.C_STATE_STATIC); } break; case entities.Obstacles.InfoTable.C_STATE_STATIC: if (this.__isFlyOutGroupDestroyed) { this.ChangeState(entities.Obstacles.InfoTable.C_STATE_FLY_OUT); } if (this.__flyOutTime != undefined) { if (this.__durationTimer.isTimerStarted() && this.__durationTimer.TimeIntervalElapsed()) { this.__durationTimer.StopTimer(); this.ChangeState(entities.Obstacles.InfoTable.C_STATE_FLY_OUT); } } if (this.__cycleTime != undefined) { if (!this.__cycleTimer.isTimerStarted()) { this.__cycleTimer.StartTimer(); } else { if (this.__cycleTimer.TimeIntervalElapsed()) { this.__cycleTimer.StopTimer(); LayMan.CycleFrame(this.__clip); } } } break; case entities.Obstacles.InfoTable.C_STATE_FLY_OUT: this.setVelocity(this.__velocity + this.__flyInDeccel); super.Move(); this.SyncClipAttributes(this.__x, this.__y); if (this.__y < this.__flyInOriginY) { this.ChangeState(entities.Obstacles.InfoTable.C_STATE_END); } } }; v2.ChangeState = function (newState) { this.HandleStatesTransition(this.__currentState, newState); this.__currentState = newState; }; v2.HandleStatesTransition = function (oldState, newState) { if (oldState == entities.Obstacles.InfoTable.C_STATE_INIT && newState == entities.Obstacles.InfoTable.C_STATE_STATIC) { this.__clip._visible = true; } if (oldState == entities.Obstacles.InfoTable.C_STATE_INIT && newState == entities.Obstacles.InfoTable.C_STATE_FLY_IN) { this.__clip._visible = true; this.__velocity = this.C_FLY_IN_INITIAL_VELOCITY; } if (oldState == entities.Obstacles.InfoTable.C_STATE_FLY_IN && newState == entities.Obstacles.InfoTable.C_STATE_STATIC) { this.__y = this.__staticOriginY; super.Move(); this.SyncClipAttributes(this.__x, this.__y); if (this.__flyOutTime != undefined) { this.__durationTimer.SetTriggerTime(this.__flyOutTime); this.__durationTimer.StartTimer(); } } if (oldState == entities.Obstacles.InfoTable.C_STATE_STATIC && newState == entities.Obstacles.InfoTable.C_STATE_FLY_OUT) { this.setDirXY(0, -1); this.__velocity = 0; } if (oldState == entities.Obstacles.InfoTable.C_STATE_FLY_OUT && newState == entities.Obstacles.InfoTable.C_STATE_END) { this.__clip._visible = false; GrpMan.unregisterFromGroup(this.__groupId); this.dispatchEvent({'target': this, 'type': entities.Obstacles.InfoTable.EVT_UNIT_DESTROYED, 'objType': this.__obstacleType, 'targType': this.__targetType}); this.Destroy(); } }; v2.SyncClipAttributes = function (x, y) { this.__clip._x = this.__x; this.__clip._y = this.__y; }; v2.getTargetType = function () { return this.__targetType; }; v2.InitGroupListener = function (world) { world.addEventListener(World.EVT_GROUP_DESTROYED, mx.utils.Delegate.create(this, this.ReactToGroupDestroy)); }; v2.ReactToGroupDestroy = function (evtObj) { if (evtObj.groupId == this.__flyInGroupId) { if (this.__currentState == entities.Obstacles.InfoTable.C_STATE_INIT) { this.ChangeState(entities.Obstacles.InfoTable.C_STATE_FLY_IN); } } if (evtObj.groupId == this.__flyOutGroupId) { this.__isFlyOutGroupDestroyed = true; if (this.__currentState == entities.Obstacles.InfoTable.C_STATE_STATIC) { this.ChangeState(entities.Obstacles.InfoTable.C_STATE_FLY_OUT); } } }; v2.Pause = function (evtObj) { if (evtObj.state == true) { if (this.__clip._visible) { } } else { if (this.__clip._visible) { } } }; v2.getGroupId = function () { return -1; }; v2.getCurrentState = function () { return this.__currentState; }; v2.getClip = function () { return this.__clip; }; v2.getYPos = function () { return this.__y; }; v2.getX = function () { return this.__x; }; v2.getDirection = function () { return this.__direction; }; v2.getVelocity = function () { return this.__velocity; }; v1.EVT_UNIT_DESTROYED = 'EVT_UNIT_DESTROYED'; v1.INSTANCES_COUNT = 0; v1.C_STATE_INIT = entities.Obstacles.Obstacle.C_STATE_INIT; v1.C_STATE_FLY_IN = entities.Obstacles.Obstacle.C_STATE_FLY_IN; v1.C_STATE_STATIC = entities.Obstacles.Obstacle.C_STATE_STATIC; v1.C_STATE_FLY_OUT = entities.Obstacles.Obstacle.C_STATE_FLY_OUT; v1.C_STATE_END = entities.Obstacles.Obstacle.C_STATE_END; v2.C_FADE_OUT_STEP = 3; v1.C_ARG_TYPE_OBSTACLE_TYPE = 0; v1.C_ARG_TYPE_X = 1; v1.C_ARG_TYPE_Y = 2; v1.C_ARG_TYPE_CLIP_NAME = 3; v1.C_ARG_TYPE_AUTO_FLY_IN_TIME = 4; v1.C_ARG_TYPE_AUTO_FLY_OUT_TIME = 5; v1.C_ARG_TYPE_CYCLE_TIME = 6; v1.C_ARG_TYPE_FLY_IN_GROUP_ID = 7; v1.C_ARG_TYPE_FLY_OUT_GROUP_ID = 8; v1.C_ARG_TYPE_GROUP_ID = 9; v2.__isFlyOutGroupDestroyed = false; v2.C_FLY_IN_INITIAL_VELOCITY = 8; v2.__myIdx = undefined; v2.C_TINT_FADE_COLOR = Const.C_COLOR_GRAY; v2.C_TINT_FADE_STRENGTH = 30; ASSetPropFlags(entities.Obstacles.InfoTable.prototype, null, 1); } #endinitclip } movieClip 1763 __Packages.entities.Obstacles.StaticObs { #initclip if (!_global.entities) { _global.entities = new Object(); } if (!_global.entities.Obstacles) { _global.entities.Obstacles = new Object(); } if (!_global.entities.Obstacles.StaticObs) { var v1 = function (myWorld, skyType, args, windx) { mx.events.EventDispatcher.initialize(this); super.constructor.apply(this, undefined); ++entities.Obstacles.StaticObs.INSTANCES_COUNT; this.__currInstanceId = entities.Obstacles.StaticObs.INSTANCES_COUNT; this.__targetType = enums.TargetTypes.NONE; this.__myWorld = myWorld; var v5; v5 = args[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME]; this.__clipName = v5; this.__clip = LayMan.RegisterClip(v5, LayMan.C_S_BKG_NEAR); var v4; v4 = (args[entities.Obstacles.StaticObs.C_ARG_SCALE] == undefined) ? 100 : args[entities.Obstacles.StaticObs.C_ARG_SCALE]; this.__clip._xscale = v4; this.__clip._yscale = Math.abs(v4); this.__clip.play(); enums.SkyTypes.AdjustTint(this.__clip, skyType, enums.SkyTypes.C_OBJ_COLOR_AMOUNT); this.__currentState = entities.Obstacles.StaticObs.C_STATE_INIT; this.__obstacleType = args[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE]; this.setXY(args[entities.Obstacles.StaticObs.C_ARG_TYPE_X], args[entities.Obstacles.StaticObs.C_ARG_TYPE_Y]); this.setDirXY(0, -1); this.setVelocity(0); this.Init(); this.InitWindSock(this.__clipName, windx); this.__myWorld.addEventListener(World.EVT_GAME_PAUSED, mx.utils.Delegate.create(this, this.Pause)); }; entities.Obstacles.StaticObs = v1; entities.Obstacles.StaticObs extends entities.basic.MovingEntity; var v2 = v1.prototype; _global.entities.Obstacles.StaticObs implements _global.entities.Obstacles.ObstacleInterface; v2.HitTestByPlanesAndProjectiles = function (planeObj) {}; v2.HitTestByPlanes = function (planeObj) {}; v2.HitTestByProjectiles2 = function (mpArr, mpSize) {}; v2.Init = function () { this.__clip._x = this.__x; this.__clip._y = this.__y; if (this.__myIdx == undefined) { this.__myIdx = World.RegMObsArr(this); } }; v2.Update = function (idx) { this.__myIdx = idx; }; v2.Destroy = function () { if (this.__myIdx != undefined) { World.UnRegMObsArr(this.__myIdx); } LayMan.RemoveClip(this.__clip); }; v2.getObstacleType = function () { return this.__obstacleType; }; v2.Scroll = function (scrollCoef, xDiff, yDiff) { this.__x += Math.round(scrollCoef * xDiff, 2); this.__y += Math.round(scrollCoef * yDiff, 2); LayMan.ScrollClip(this.__clip, scrollCoef, xDiff, yDiff); }; v2.getTargetType = function () { return this.__targetType; }; v2.Pause = function (evtObj) { if (evtObj.state == true) { if (this.__clip._visible) { this.__clip.stop(); } } else { if (this.__clip._visible) { this.__clip.play(); } } }; v2.getGroupId = function () { return undefined; }; v2.getCurrentState = function () { return this.__currentState; }; v2.getClip = function () { return this.__clip; }; v2.getClipName = function () { return this.__clipName; }; v2.getYPos = function () { return this.__y; }; v2.getX = function () { return this.__x; }; v2.getDirection = function () { return this.__direction; }; v2.getVelocity = function () { return this.__velocity; }; v2.InitWindSock = function (clipname, windx) { if (windx == undefined) { windx = 0; } if (clipname == 'S_WIND_RIBBON') { var v3; v3 = LayMan.RegisterClipInClip(this.__clip, 'S_WIND_RIBBON_SEM'); if (Math.abs(windx) <= 0.3) { v3.semaphore.gotoAndStop('F_GREEN'); } if (Math.abs(windx) > 0.6) { v3.semaphore.gotoAndStop('F_ORANGE'); } if (Math.abs(windx) > 0.9) { v3.semaphore.gotoAndStop('F_RED'); } if (Math.abs(windx) == 0) { this.__clip.gotoAndStop('F_START'); } if (Math.abs(windx) > 0) { this.__clip.gotoAndPlay('F_BEGIN'); } } }; v1.EVT_UNIT_DESTROYED = 'EVT_UNIT_DESTROYED'; v1.INSTANCES_COUNT = 0; v1.C_STATE_INIT = entities.Obstacles.Obstacle.C_STATE_INIT; v2.C_FADE_OUT_STEP = 3; v1.C_ARG_TYPE_OBSTACLE_TYPE = 0; v1.C_ARG_TYPE_X = 1; v1.C_ARG_TYPE_Y = 2; v1.C_ARG_CLIP_NAME = 3; v1.C_ARG_SCALE = 4; v2.__myIdx = undefined; ASSetPropFlags(entities.Obstacles.StaticObs.prototype, null, 1); } #endinitclip } movieClip 1764 __Packages.enums.PlaneStartPosTypes { #initclip if (!_global.enums) { _global.enums = new Object(); } if (!_global.enums.PlaneStartPosTypes) { var v1 = function () {}; enums.PlaneStartPosTypes = v1; var v2 = v1.prototype; v1.FIRST = 0; v1.SECOND = 1; v1.THIRD = 2; v1.FOURTH = 3; v1.AIRSHIP = 4; ASSetPropFlags(enums.PlaneStartPosTypes.prototype, null, 1); } #endinitclip } movieClip 1765 __Packages.enums.ArenaSizeTypes { #initclip if (!_global.enums) { _global.enums = new Object(); } if (!_global.enums.ArenaSizeTypes) { var v1 = function () {}; enums.ArenaSizeTypes = v1; var v2 = v1.prototype; v1.getWidth = function (arenaSizeType, widthType) { return enums.ArenaSizeTypes.ARENA_SIZES[arenaSizeType][widthType]; }; v1.COUNT = 3; v1.SMALL = 0; v1.MEDIUM = 1; v1.LARGE = 2; v1.WIDTH_MIN = 0; v1.WIDTH_MAX = 1; v1.ARENA_SIZES = [[-100, 900], [-300, 1100], [-700, 1500]]; ASSetPropFlags(enums.ArenaSizeTypes.prototype, null, 1); } #endinitclip } movieClip 1766 __Packages.entities.Obstacles.StormCloud { #initclip if (!_global.entities) { _global.entities = new Object(); } if (!_global.entities.Obstacles) { _global.entities.Obstacles = new Object(); } if (!_global.entities.Obstacles.StormCloud) { var v1 = function (myWorld, skyType, args) { super(); mx.events.EventDispatcher.initialize(this); ++entities.Obstacles.StormCloud.INSTANCES_COUNT; this.__currInstanceId = entities.Obstacles.StormCloud.INSTANCES_COUNT; this.__myWorld = myWorld; this.__clip = LayMan.RegisterClip('S_STORM_CLOUD', LayMan.C_S_OTHER); enums.SkyTypes.AdjustTint(this.__clip, skyType, enums.SkyTypes.C_OBJ_COLOR_AMOUNT); this.__flashClip = LayMan.RegisterClip('S_STORM_CLOUD_FLASH', LayMan.C_S_COLLIDE_FAR); this.__flashHitAreaClip = LayMan.RegisterClip('S_STORM_CLOUD_FLASH_BBOX', LayMan.C_S_OTHER); this.__flashHitAreaClip._visible = false; this.__hitAreaClip = LayMan.RegisterClip('S_STORM_CLOUD_BBOX', LayMan.C_S_OTHER); this.__hitAreaClip._visible = false; this.__currentState = entities.Obstacles.StormCloud.C_STATE_INIT; this.__obstacleType = args[entities.Obstacles.StormCloud.C_ARG_TYPE_OBSTACLE_TYPE]; this.setXY(args[entities.Obstacles.StormCloud.C_ARG_TYPE_X], args[entities.Obstacles.StormCloud.C_ARG_TYPE_Y]); this.setVelocity(args[entities.Obstacles.StormCloud.C_ARG_TYPE_VELOCITY]); this.setDirVec(args[entities.Obstacles.StormCloud.C_ARG_TYPE_DIRECTION]); entities.Obstacles.StormCloud.C_MAX_FLASH_X_POS_VARIATION = this.__clip._width * 0.7; this.Init(); this.__myWorld.addEventListener(World.EVT_GAME_PAUSED, mx.utils.Delegate.create(this, this.Pause)); this.InitSounds(); }; entities.Obstacles.StormCloud = v1; entities.Obstacles.StormCloud extends entities.basic.MovingEntity; var v2 = v1.prototype; _global.entities.Obstacles.StormCloud implements _global.entities.Obstacles.ObstacleInterface; v2.Init = function () { this.__clip._x = this.__x; this.__clip._y = this.__y; this.__flashClip._x = this.__clip._x + entities.Obstacles.StormCloud.__randomFlashXPosVariation; this.__flashClip._y = this.__clip._y; this.__flashHitAreaClip._x = this.__clip._x + entities.Obstacles.StormCloud.__randomFlashXPosVariation; this.__flashHitAreaClip._y = this.__clip._y; this.__hitAreaClip._x = this.__clip._x; this.__hitAreaClip._y = this.__clip._y; if (this.__myIdx == undefined) { this.__myIdx = World.RegMObsArr(this); } }; v2.Update = function (idx) { this.__myIdx = idx; this.HandleStateActions(); }; v2.Destroy = function () { if (this.__myIdx != undefined) { World.UnRegMObsArr(this.__myIdx); } LayMan.RemoveClip(this.__clip); LayMan.RemoveClip(this.__flashClip); LayMan.RemoveClip(this.__flashHitAreaClip); LayMan.RemoveClip(this.__hitAreaClip); this.DestroySounds(); }; v2.Scroll = function (scrollCoef, xDiff, yDiff) { this.__x += Math.round(scrollCoef * xDiff, 2); this.__y += Math.round(scrollCoef * yDiff, 2); LayMan.ScrollClip(this.__clip, scrollCoef, xDiff, yDiff); LayMan.ScrollClip(this.__flashClip, scrollCoef, xDiff, yDiff); LayMan.ScrollClip(this.__flashHitAreaClip, scrollCoef, xDiff, yDiff); LayMan.ScrollClip(this.__hitAreaClip, scrollCoef, xDiff, yDiff); }; v2.HitTestByPlanesAndProjectiles = function (planeObj) { this.HitTestByPlanes(planeObj); }; v2.HitTestByProjectiles2 = function (mpArr, mpSize) {}; v2.HitTestByPlanes = function (planeObj) { if (planeObj.getCurrentState() != enums.PlaneStates.FLYING && planeObj.getCurrentState() != enums.PlaneStates.BREAKDOWN) { return undefined; } if (!planeObj.isCollidingWithBullets()) { return undefined; } var v3; var v4; v4 = planeObj.getBBoxClip(); v3 = this.__hitAreaClip.hitTest(v4); if (v3) { this.ReactToCollisionWithPlanes(planeObj); } if (this.__flashClip._currentframe > 1) { v3 = this.__flashHitAreaClip.hitTest(v4); if (v3) { planeObj.ForceToBulletHit(planeObj); planeObj.PlaceDamageLabel('Lightning strike', planeObj.getXPos(), planeObj.getYPos() - 15, FlyLabels.C_FNT_SIZE_DAMAGE_INFO); } } }; v2.ReactToCollisionWithPlanes = function (planeObj) { planeObj.SetVelocity(entities.Obstacles.StormCloud.C_SLOW_EFFECT_VELOCITY); }; v2.HandleStateActions = function () { switch (this.__currentState) { case entities.Obstacles.StormCloud.C_STATE_INIT: this.ChangeState(entities.Obstacles.StormCloud.C_STATE_FLYING); break; case entities.Obstacles.StormCloud.C_STATE_FLYING: super.Move(); this.SyncClipAttributes(this.__x, this.__y); this.CheckScreenBordersFunction(); this.RandomizeFlashLightning(); break; case entities.Obstacles.StormCloud.C_STATE_EXPLODING: break; case entities.Obstacles.StormCloud.C_STATE_EXPLODING: } }; v2.ChangeState = function (newState) { this.HandleStatesTransition(this.__currentState, newState); this.__currentState = newState; }; v2.HandleStatesTransition = function (oldState, newState) { if (oldState == entities.Obstacles.StormCloud.C_STATE_INIT && newState == entities.Obstacles.StormCloud.C_STATE_FLYING) { this.__clip._visible = true; } if (oldState == entities.Obstacles.StormCloud.C_STATE_FLYING && newState == entities.Obstacles.StormCloud.C_STATE_EXPLODING) { this.dispatchEvent({'target': this, 'type': 'EVT_OBSTACLE_DESTROYED'}); } if (oldState == entities.Obstacles.StormCloud.C_STATE_EXPLODING && newState == entities.Obstacles.StormCloud.C_STATE_END) { this.__clip._visible = false; } }; v2.SyncClipAttributes = function (x, y) { this.__clip._x = this.__x; this.__clip._y = this.__y; this.__flashClip._x = this.__clip._x + entities.Obstacles.StormCloud.__randomFlashXPosVariation; this.__flashClip._y = this.__clip._y; this.__flashHitAreaClip._x = this.__clip._x + entities.Obstacles.StormCloud.__randomFlashXPosVariation; this.__flashHitAreaClip._y = this.__clip._y; this.__hitAreaClip._x = this.__clip._x; this.__hitAreaClip._y = this.__clip._y; }; v2.CheckScreenBordersFunction = function () { if (this.__x > Const.C_SCENE_MAX_WIDTH + this.__clip._width + 80) { this.__x = Const.C_SCENE_MIN_WIDTH - this.__clip._width; this.__y = UtilMath.getRandomNaturalNumber(0, Const.C_SCENE_HEIGHT * 0.6); } if (this.__x < Const.C_SCENE_MIN_WIDTH - this.__clip._width - 80) { this.__x = Const.C_SCENE_MAX_WIDTH + this.__clip._width; this.__y = UtilMath.getRandomNaturalNumber(0, Const.C_SCENE_HEIGHT * 0.6); } }; v2.RandomizeFlashLightning = function () { if (FrameMan.isNthFrame(entities.Obstacles.StormCloud.C_NTH_FRAME_RANDOMIZING)) { if (Math.random() <= entities.Obstacles.StormCloud.C_FLASH_PROBABILITY) { entities.Obstacles.StormCloud.__randomFlashXPosVariation = UtilMath.getRandomNaturalNumber(-1 * entities.Obstacles.StormCloud.C_MAX_FLASH_X_POS_VARIATION / 2, entities.Obstacles.StormCloud.C_MAX_FLASH_X_POS_VARIATION / 2); this.__flashClip.gotoAndPlay('F_BEGIN'); this.__flashHitAreaClip.gotoAndPlay('F_BEGIN'); this.__clip.gotoAndPlay('F_BEGIN'); if (Math.random() <= entities.Obstacles.StormCloud.C_FLASH_PROBABILITY) { this.PlaySound(); } } } }; v2.Pause = function (evtObj) { if (evtObj.state == true) { if (this.__clip._visible) { } } else { if (this.__clip._visible) { } } }; v2.getGroupId = function () { return -1; }; v2.getCurrentState = function () { return this.__currentState; }; v2.getClip = function () { return this.__hitAreaClip; }; v2.getObstacleType = function () { return this.__obstacleType; }; v2.getYPos = function () { return this.__y; }; v2.getX = function () { return this.__x; }; v2.getDirection = function () { return this.__direction; }; v2.getVelocity = function () { return this.__velocity; }; v2.InitSounds = function () { this.__sndClipArray = new Array(); this.__sndArray = new Array(); this.__sndArray[0] = this.RegisterSound(this.__sndClipArray, 'snd_thunder1'); this.__sndArray[1] = this.RegisterSound(this.__sndClipArray, 'snd_thunder2'); this.__sndArray[2] = this.RegisterSound(this.__sndClipArray, 'snd_thunder3'); this.__sndCount = this.__sndArray.length; }; v2.DestroySounds = function () { var v2; v2 = 0; while (v2 < this.__sndClipArray.length) { LayMan.RemoveClip(this.__sndClipArray[v2]); ++v2; } }; v2.PlaySound = function () { if (!_global.GameConf.isSoundFXEnabled()) { return undefined; } var v3; v3 = UtilMath.getRandomNaturalNumber(0, this.__sndCount - 1); this.__sndArray[v3].start(); }; v2.RegisterSound = function (clipArray, soundName) { var v1; v1 = LayMan.RegisterEmptyClip('', LayMan.C_SND_EMPTY_CLIP_DEPTH_TYPE); clipArray.push(v1); var v2; v2 = new Sound(v1); v2.attachSound(soundName); return v2; }; v1.INSTANCES_COUNT = 0; v1.C_STATE_INIT = entities.Obstacles.Obstacle.C_STATE_INIT; v1.C_STATE_FLYING = entities.Obstacles.Obstacle.C_STATE_FLYING; v1.C_STATE_EXPLODING = entities.Obstacles.Obstacle.C_STATE_EXPLODING; v1.C_STATE_END = entities.Obstacles.Obstacle.C_STATE_END; v1.C_ARG_TYPE_OBSTACLE_TYPE = 0; v1.C_ARG_TYPE_X = 1; v1.C_ARG_TYPE_Y = 2; v1.C_ARG_TYPE_VELOCITY = 3; v1.C_ARG_TYPE_DIRECTION = 4; v1.C_SLOW_EFFECT_VELOCITY = 1.3; v1.C_NTH_FRAME_RANDOMIZING = 30; v1.C_FLASH_PROBABILITY = 0.3; v1.__randomFlashXPosVariation = 0; v2.__myIdx = undefined; ASSetPropFlags(entities.Obstacles.StormCloud.prototype, null, 1); } #endinitclip } movieClip 1767 __Packages.entities.Obstacles.BirdFormation { #initclip if (!_global.entities) { _global.entities = new Object(); } if (!_global.entities.Obstacles) { _global.entities.Obstacles = new Object(); } if (!_global.entities.Obstacles.BirdFormation) { var v1 = function (myWorld, skyType, args) { super(); mx.events.EventDispatcher.initialize(this); ++entities.Obstacles.BirdFormation.INSTANCES_COUNT; this.__currInstanceId = entities.Obstacles.BirdFormation.INSTANCES_COUNT; this.__myWorld = myWorld; this.__hitAreaClip = LayMan.RegisterClip('S_BIRD_FORMATION_BBOX', LayMan.C_S_OTHER); this.__hitAreaClip._visible = false; this.InitBirdClips(); this.__currentState = entities.Obstacles.BirdFormation.C_STATE_INIT; this.__obstacleType = args[entities.Obstacles.BirdFormation.C_ARG_TYPE_OBSTACLE_TYPE]; this.setXY(args[entities.Obstacles.BirdFormation.C_ARG_TYPE_X], args[entities.Obstacles.BirdFormation.C_ARG_TYPE_Y]); this.setVelocity(args[entities.Obstacles.BirdFormation.C_ARG_TYPE_VELOCITY]); this.setDirXY(args[entities.Obstacles.BirdFormation.C_ARG_TYPE_DIRECTION].getX(), args[entities.Obstacles.BirdFormation.C_ARG_TYPE_DIRECTION].getY()); this.Init(); this.__myWorld.addEventListener(World.EVT_GAME_PAUSED, mx.utils.Delegate.create(this, this.Pause)); this.InitSounds(); }; entities.Obstacles.BirdFormation = v1; entities.Obstacles.BirdFormation extends entities.basic.MovingEntity; var v2 = v1.prototype; _global.entities.Obstacles.BirdFormation implements _global.entities.Obstacles.ObstacleInterface; v2.InitBirdClips = function () { var v2; var v3; this.__birdClipArray = new Array(); v3 = 0; while (v3 < this.C_BIRDS_COUNT) { v2 = LayMan.RegisterClip('S_BIRD', LayMan.C_S_COLLIDE_NEAR); v2.gotoAndPlay(UtilMath.getRandomNaturalNumber(1, v2._totalframes)); this.__birdClipArray.push(v2); ++v3; } }; v2.Init = function () { this.__hitAreaClip._x = this.__x; this.__hitAreaClip._y = this.__y; var v4; v4 = new Vector2D(1, 0); var v2; var v3; v3 = 0; while (v3 < this.C_BIRDS_COUNT) { v2 = this.__birdClipArray[v3]; if (v3 <= 3) { switch (v3) { case 0: v2._x = this.__hitAreaClip._x - 0.5 * this.__hitAreaClip._width + 10 * Math.random(); v2._y = this.__hitAreaClip._y - 0.5 * this.__hitAreaClip._height + 10 * Math.random(); break; case 1: v2._x = this.__hitAreaClip._x + 0.5 * this.__hitAreaClip._width - 10 * Math.random(); v2._y = this.__hitAreaClip._y - 0.5 * this.__hitAreaClip._height + 10 * Math.random(); break; case 2: v2._x = this.__hitAreaClip._x - 0.5 * this.__hitAreaClip._width + 10 * Math.random(); v2._y = this.__hitAreaClip._y + 0.5 * this.__hitAreaClip._height - 10 * Math.random(); break; case 3: v2._x = this.__hitAreaClip._x + 0.5 * this.__hitAreaClip._width - 10 * Math.random(); v2._y = this.__hitAreaClip._y + 0.5 * this.__hitAreaClip._height - 10 * Math.random(); } } else { var v5; v5 = 2 * Math.round(); v4.setXY(1, 0); v4.Rotate(UtilMath.getRandomNaturalNumber(0, 360)); v2._x = this.__hitAreaClip._x + 0.5 * Math.random() * v4.getX() * this.__hitAreaClip._width; v2._y = this.__hitAreaClip._y + 0.5 * Math.random() * v4.getY() * this.__hitAreaClip._height; } v2._xscale = 50 + 30 * Math.random(); v2._yscale = 50 + 30 * Math.random(); if (this.__direction.getX() > 0) { v2._xscale = _xscale * 1; } else { v2._xscale = _xscale * -1; } v2._visible = true; ++v3; } if (this.__myIdx == undefined) { this.__myIdx = World.RegMObsArr(this); } this.__hitAreaClip._xscale = 90; this.__hitAreaClip._yscale = 90; }; v2.Update = function (idx) { this.__myIdx = idx; this.HandleStateActions(); }; v2.Destroy = function () { if (this.__myIdx != undefined) { World.UnRegMObsArr(this.__myIdx); } LayMan.RemoveClip(this.__hitAreaClip); var v2; v2 = 0; while (v2 < this.C_BIRDS_COUNT) { LayMan.RemoveClip(this.__birdClipArray[v2]); ++v2; } this.DestroySounds(); }; v2.Scroll = function (scrollCoef, xDiff, yDiff) { this.__x += Math.round(scrollCoef * xDiff, 2); this.__y += Math.round(scrollCoef * yDiff, 2); LayMan.ScrollClip(this.__hitAreaClip, scrollCoef, xDiff, yDiff); var v2; v2 = 0; while (v2 < this.C_BIRDS_COUNT) { LayMan.ScrollClip(this.__birdClipArray[v2], scrollCoef, xDiff, yDiff); ++v2; } }; v2.HitTestByPlanesAndProjectiles = function (planeObj) { this.HitTestByPlanes(planeObj); }; v2.HitTestByPlanes = function (planeObj) { if (planeObj.getCurrentState() != enums.PlaneStates.FLYING && planeObj.getCurrentState() != enums.PlaneStates.BREAKDOWN) { return undefined; } if (!planeObj.isCollidingWithBullets()) { return undefined; } var v3; var v4; v4 = planeObj.getBBoxClip(); v3 = this.__hitAreaClip.hitTest(v4); if (v3) { this.ReactToCollisionWithPlanes(planeObj); } }; v2.HitTestByProjectiles2 = function (mpArr, mpSize) {}; v2.ReactToCollisionWithPlanes = function (planeObj) { if (FrameMan.isNthFrame(entities.Obstacles.BirdFormation.C_NTH_FRAME_RANDOMIZING)) { var v4; v4 = planeObj.getDamageObj(); var v2; v2 = UtilMath.getRandomNaturalNumber(0, enums.DamageTypes.COUNT - 1); var v3; v3 = UtilMath.getDirectRatioFncValue(planeObj.getVelocity(), 0, Const.C_MAXIMAL_VELOCITY); if (Math.random() < v3) { v4.AddDamage(v2, 1); planeObj.ApplyDamageTypeAndSizeOnPlane(v2, 1); if (Math.random() < v3 / 2) { this.PlaySound(); } } } }; v2.HandleStateActions = function () { switch (this.__currentState) { case entities.Obstacles.BirdFormation.C_STATE_INIT: this.ChangeState(entities.Obstacles.BirdFormation.C_STATE_FLYING); break; case entities.Obstacles.BirdFormation.C_STATE_FLYING: super.Move(); this.SyncClipAttributes(this.__x, this.__y); this.CheckScreenBordersFunction(); break; case entities.Obstacles.BirdFormation.C_STATE_EXPLODING: break; case entities.Obstacles.BirdFormation.C_STATE_EXPLODING: } }; v2.ChangeState = function (newState) { this.HandleStatesTransition(this.__currentState, newState); this.__currentState = newState; }; v2.HandleStatesTransition = function (oldState, newState) { if (oldState == entities.Obstacles.BirdFormation.C_STATE_INIT && newState == entities.Obstacles.BirdFormation.C_STATE_FLYING) { } if (oldState == entities.Obstacles.BirdFormation.C_STATE_FLYING && newState == entities.Obstacles.BirdFormation.C_STATE_EXPLODING) { this.dispatchEvent({'target': this, 'type': 'EVT_OBSTACLE_DESTROYED'}); } if (oldState == entities.Obstacles.BirdFormation.C_STATE_EXPLODING && newState == entities.Obstacles.BirdFormation.C_STATE_END) { } }; v2.SyncClipAttributes = function (x, y) { var v4; var v3; var v2; v2 = 0; while (v2 < this.C_BIRDS_COUNT) { v4 = this.__birdClipArray[v2]._x - this.__hitAreaClip._x; v3 = this.__birdClipArray[v2]._y - this.__hitAreaClip._y; this.__birdClipArray[v2]._x = x + v4; this.__birdClipArray[v2]._y = y + v3; ++v2; } this.__hitAreaClip._x = x; this.__hitAreaClip._y = y; }; v2.CheckScreenBordersFunction = function () { if (this.__x > Const.C_SCENE_MAX_WIDTH + this.__hitAreaClip._width + 80) { this.__x = Const.C_SCENE_MIN_WIDTH - this.__hitAreaClip._width; this.__y = UtilMath.getRandomNaturalNumber(0, Const.C_SCENE_HEIGHT * 0.7); } if (this.__x < Const.C_SCENE_MIN_WIDTH - this.__hitAreaClip._width - 80) { this.__x = Const.C_SCENE_MAX_WIDTH + this.__hitAreaClip._width; this.__y = UtilMath.getRandomNaturalNumber(0, Const.C_SCENE_HEIGHT * 0.7); } }; v2.Pause = function (evtObj) { if (evtObj.state == true) { if (this.__birdClipArray[0]._visible) { var v2; var v3; v3 = this.C_BIRDS_COUNT; v2 = 0; while (v2 < v3) { this.__birdClipArray[v2].stop(); ++v2; } } } else { if (this.__birdClipArray[0]._visible) { var v3 = this.C_BIRDS_COUNT; var v2 = 0; while (v2 < v3) { this.__birdClipArray[v2].play(); ++v2; } } } }; v2.getGroupId = function () { return -1; }; v2.getCurrentState = function () { return this.__currentState; }; v2.getClip = function () { return this.__hitAreaClip; }; v2.getObstacleType = function () { return this.__obstacleType; }; v2.getYPos = function () { return this.__y; }; v2.getX = function () { return this.__x; }; v2.getDirection = function () { return this.__direction; }; v2.getVelocity = function () { return this.__velocity; }; v2.InitSounds = function () { this.__sndClipArray = new Array(); this.__sndArray = new Array(); this.__sndArray[0] = this.RegisterSound(this.__sndClipArray, 'snd_birds'); this.__sndCount = this.__sndArray.length; }; v2.DestroySounds = function () { var v2; v2 = 0; while (v2 < this.__sndClipArray.length) { LayMan.RemoveClip(this.__sndClipArray[v2]); ++v2; } }; v2.PlaySound = function () { if (!_global.GameConf.isSoundFXEnabled()) { return undefined; } var v3; v3 = UtilMath.getRandomNaturalNumber(0, this.__sndCount - 1); this.__sndArray[v3].start(); }; v2.RegisterSound = function (clipArray, soundName) { var v1; v1 = LayMan.RegisterEmptyClip('', LayMan.C_SND_EMPTY_CLIP_DEPTH_TYPE); clipArray.push(v1); var v2; v2 = new Sound(v1); v2.attachSound(soundName); return v2; }; v1.INSTANCES_COUNT = 0; v1.C_STATE_INIT = entities.Obstacles.Obstacle.C_STATE_INIT; v1.C_STATE_FLYING = entities.Obstacles.Obstacle.C_STATE_FLYING; v1.C_STATE_EXPLODING = entities.Obstacles.Obstacle.C_STATE_EXPLODING; v1.C_STATE_END = entities.Obstacles.Obstacle.C_STATE_END; v2.C_BIRDS_COUNT = 41; v1.C_ARG_TYPE_OBSTACLE_TYPE = 0; v1.C_ARG_TYPE_X = 1; v1.C_ARG_TYPE_Y = 2; v1.C_ARG_TYPE_VELOCITY = 3; v1.C_ARG_TYPE_DIRECTION = 4; v1.C_NTH_FRAME_RANDOMIZING = 10; v2.__myIdx = undefined; ASSetPropFlags(entities.Obstacles.BirdFormation.prototype, null, 1); } #endinitclip } movieClip 1768 __Packages.Damage { #initclip if (!_global.Damage) { var v1 = function (plane, planeIdx, planePosType, planeIndicatorX, planeIndicatorY) { this.__parentPlane = plane; this.__indicatorClipArray = new Array(); this.__damagesCount = 0; var v6; this.__planeGraphicsClip = LayMan.RegisterClip(enums.PlaneTypes.C_PLAYER_PLANE_CLIP_NAME[planeIdx] || '_STATIC', LayMan.C_S_OTHER); if (planePosType == enums.PlaneStartPosTypes.AIRSHIP) { this.__planeGraphicsClip._x = 220 * (planePosType - 1) + 65 - 40 - 50 - 80; } else { this.__planeGraphicsClip._x = 220 * planePosType + 65 - 40; } this.__planeGraphicsClip._y = Const.C_DEFAULT_Y_POS + 25; this.__planeGraphicsClip._xscale = 55; this.__planeGraphicsClip._yscale = 55; this.__planeGraphicsClip._visible = true; this.__planeGraphicsClip.stop(); var v4; v4 = this.__parentPlane.getClip(); var v3; var v2; var v7; v3 = 0; while (v3 < enums.DamageTypes.COUNT) { v2 = LayMan.RegisterClipInClip(v4, Const.C_DMG_INDICATOR_CLIP_NAME); v2._xscale = this.C_INDICATOR_DEFAULT_SIZE; v2._yscale = this.C_INDICATOR_DEFAULT_SIZE; v2.gotoAndStop(1); v2._visible = false; switch (v3) { case enums.DamageTypes.ENGINE: v2._x = -29; v2._y = -3; break; case enums.DamageTypes.TAIL: v2._x = 20; v2._y = -3; break; case enums.DamageTypes.GUN: v2._x = -26; v2._y = -3; } this.__indicatorClipArray.push(v2); ++v3; } this.__isEngineDamaged = false; }; _global.Damage = v1; var v2 = v1.prototype; v2.AddDamage = function (damageType, damageOutput) { var v3; v3 = (damageOutput == undefined) ? enums.DamageOutputs.SMALL : damageOutput; if (damageType == enums.DamageTypes.GUN) { this.__gunHitsCnt += v3; this.ResizeIndicator(damageType, this.__gunHitsCnt); this.__damagesCount = this.__gunHitsCnt + this.__engineHitsCnt + this.__tailHitsCnt; return this.__gunHitsCnt; } if (damageType == enums.DamageTypes.ENGINE) { this.__engineHitsCnt += v3; this.__isEngineDamaged = true; this.ResizeIndicator(damageType, this.__engineHitsCnt); this.__damagesCount = this.__gunHitsCnt + this.__engineHitsCnt + this.__tailHitsCnt; return this.__engineHitsCnt; } if (damageType == enums.DamageTypes.TAIL) { this.__tailHitsCnt += v3; this.ResizeIndicator(damageType, this.__tailHitsCnt); this.__damagesCount = this.__gunHitsCnt + this.__engineHitsCnt + this.__tailHitsCnt; return this.__tailHitsCnt; } }; v2.ResizeIndicator = function (damageType, hitsCount) { var v4; var v6; v6 = hitsCount >= 7 ? 7 : hitsCount; v4 = this.C_INDICATOR_DEFAULT_SIZE + this.C_INDICATOR_RESIZE_STEP * v6; var v2; v2 = this.__indicatorClipArray[damageType]; v2._visible = true; v2.gotoAndPlay('F_BLINK'); v2._xscale = v4; v2._yscale = v4; if (damageType == enums.DamageTypes.GUN) { if (this.__gunHitsCnt <= 0) { v2.gotoAndStop('F_BEGIN'); } } if (damageType == enums.DamageTypes.ENGINE) { if (this.__engineHitsCnt <= 0) { v2.gotoAndStop('F_BEGIN'); } } if (damageType == enums.DamageTypes.TAIL) { if (this.__tailHitsCnt <= 0) { v2.gotoAndStop('F_BEGIN'); } } }; v2.RemoveAllDamage = function () { var v3; var v2; v3 = 0; while (v3 < enums.DamageTypes.COUNT) { v2 = this.__indicatorClipArray[v3]; v2._xscale = this.C_INDICATOR_DEFAULT_SIZE; v2._yscale = this.C_INDICATOR_DEFAULT_SIZE; v2.gotoAndStop('F_BEGIN'); v2._visible = false; ++v3; } this.__damagesCount = 0; this.__gunHitsCnt = 0; this.__engineHitsCnt = 0; this.__tailHitsCnt = 0; this.__isEngineDamaged = false; }; v2.RemoveDamage = function (damageType, dmgSize) { if (damageType == enums.DamageTypes.GUN) { this.__gunHitsCnt -= dmgSize; if (this.__gunHitsCnt < 0) { this.__gunHitsCnt = 0; } } if (damageType == enums.DamageTypes.ENGINE) { this.__engineHitsCnt -= dmgSize; if (this.__engineHitsCnt < 0) { this.__engineHitsCnt = 0; } if (this.__engineHitsCnt <= 0) { this.__isEngineDamaged = false; } } if (damageType == enums.DamageTypes.TAIL) { this.__tailHitsCnt -= dmgSize; if (this.__tailHitsCnt < 0) { this.__tailHitsCnt = 0; } } this.__damagesCount = this.__gunHitsCnt + this.__engineHitsCnt + this.__tailHitsCnt; var v2; v2 = this.__engineHitsCnt; damageType = enums.DamageTypes.ENGINE && v2 == 0; if (damageType) { this.__isEngineDamaged = false; } if (v2 > 0) { this.__parentPlane.SetVelocity(this.__parentPlane.getCNormalVelocity() * Math.pow(Damage.C_SPEED_CRIPPLE_COEF, v2)); this.ResizeIndicator(damageType, v2); } v2 = this.__tailHitsCnt; if (v2 > 0) { this.__parentPlane.setRotationStep(this.__parentPlane.getCRotationStep() * Math.pow(Damage.C_AGILITY_CRIPPLE_COEF, v2)); this.ResizeIndicator(damageType, v2); } v2 = this.__gunHitsCnt; if (v2 > 0) { this.__parentPlane.SetCooldownOnWeapon(entities.weapons.Weapon.C_DECREASE_COOLDOWN, v2); this.ResizeIndicator(damageType, v2); } }; v2.HideIndicators = function () { var v2; v2 = 0; while (v2 < enums.DamageTypes.COUNT) { this.__indicatorClipArray[v2].gotoAndStop(1); this.__indicatorClipArray[v2]._visible = false; ++v2; } }; v2.isDamaged = function (damageType) { if (damageType == undefined) { if (this.__damagesCount > 0) { return true; } else { return false; } } if (damageType == enums.DamageTypes.GUN) { if (this.__gunHitsCnt > 0) { return true; } else { return false; } } if (damageType == enums.DamageTypes.ENGINE) { if (this.__engineHitsCnt > 0) { return true; } else { return false; } } if (damageType == enums.DamageTypes.TAIL) { if (this.__tailHitsCnt > 0) { return true; } else { return false; } } }; v2.getDamageHits = function (damageType) { if (this.__damagesCount == 0) { return 0; } if (damageType == enums.DamageTypes.GUN) { return this.__gunHitsCnt; } if (damageType == enums.DamageTypes.ENGINE) { return this.__engineHitsCnt; } if (damageType == enums.DamageTypes.TAIL) { return this.__tailHitsCnt; } }; v2.Destroy = function () { LayMan.RemoveClip(this.__planeGraphicsClip); var v2; var v3; v3 = this.__indicatorClipArray.length; v2 = 0; while (v2 < v3) { LayMan.RemoveClip(this.__indicatorClipArray[v2]); ++v2; } }; v2.C_INDICATOR_DEFAULT_SIZE = 20; v2.C_INDICATOR_RESIZE_STEP = 20; v1.C_SPEED_CRIPPLE_COEF = 0.95; v1.C_AGILITY_CRIPPLE_COEF = 0.95; v2.__gunHitsCnt = 0; v2.__engineHitsCnt = 0; v2.__tailHitsCnt = 0; ASSetPropFlags(_global.Damage.prototype, null, 1); } #endinitclip } movieClip 1769 __Packages.DamageItem { #initclip if (!_global.DamageItem) { var v1 = function (damageType) { this.__damageType = damageType; this.__hitsCount = 0; }; _global.DamageItem = v1; var v2 = v1.prototype; v2.AddHit = function (dmgValue) { if (dmgValue != undefined) { dmgValue = dmgValue; this.__hitsCount += dmgValue; return this.__hitsCount; } dmgValue = enums.DamageOutputs.SMALL; this.__hitsCount += dmgValue; return this.__hitsCount; }; v2.SubHit = function (dmgValue) { dmgValue = (dmgValue == undefined) ? 1 : dmgValue; this.__hitsCount -= dmgValue; if (this.__hitsCount >= 0) { this.__hitsCount = this.__hitsCount; return this.__hitsCount; } this.__hitsCount = 0; return this.__hitsCount; }; v2.ResetHit = function () { this.__hitsCount = 0; }; v2.getHitsCount = function () { return this.__hitsCount; }; v2.getDamageType = function () { return this.__damageType; }; ASSetPropFlags(_global.DamageItem.prototype, null, 1); } #endinitclip } movieClip 1770 __Packages.entities.Obstacles.Tornado { #initclip if (!_global.entities) { _global.entities = new Object(); } if (!_global.entities.Obstacles) { _global.entities.Obstacles = new Object(); } if (!_global.entities.Obstacles.Tornado) { var v1 = function (myWorld, skyType, args) { super(); mx.events.EventDispatcher.initialize(this); ++entities.Obstacles.Tornado.INSTANCES_COUNT; this.__currInstanceId = entities.Obstacles.Tornado.INSTANCES_COUNT; this.__myWorld = myWorld; this.__clip = LayMan.RegisterClip('S_TORNADO', LayMan.C_S_COLLIDE_FAR); enums.SkyTypes.AdjustTint(this.__clip, skyType, enums.SkyTypes.C_OBJ_COLOR_AMOUNT); this.__dustClip = LayMan.RegisterClip('S_TORNADO_DUST', LayMan.C_S_COLLIDE_NEAR); this.__hitAreaClip = LayMan.RegisterClip('S_TORNADO_BBOX', LayMan.C_S_OTHER); this.__hitAreaClip._visible = false; this.__currentState = entities.Obstacles.Tornado.C_STATE_INIT; this.__obstacleType = args[entities.Obstacles.Tornado.C_ARG_TYPE_OBSTACLE_TYPE]; this.setXY(args[entities.Obstacles.Tornado.C_ARG_TYPE_X], this.C_DEFAULT_Y_POS); this.setVelocity(args[entities.Obstacles.Tornado.C_ARG_TYPE_VELOCITY]); this.setDirXY(args[entities.Obstacles.Tornado.C_ARG_TYPE_DIRECTION].getX(), 0); this.__suckFromLeftVec = new Vector2D(1, 0); this.__suckFromLeftVec.Rotate(-1 * this.C_SUCK_FORCE_ANGLE_DEG); this.__suckFromRightVec = new Vector2D(1, 0); this.__suckFromRightVec.Rotate(180 + this.C_SUCK_FORCE_ANGLE_DEG); this.__suckDriftVec = new Vector2D(1, 0); this.Init(); this.__myWorld.addEventListener(World.EVT_GAME_PAUSED, mx.utils.Delegate.create(this, this.Pause)); this.InitSounds(); }; entities.Obstacles.Tornado = v1; entities.Obstacles.Tornado extends entities.basic.MovingEntity; var v2 = v1.prototype; _global.entities.Obstacles.Tornado implements _global.entities.Obstacles.ObstacleInterface; v2.Init = function () { this.__clip._x = this.__x; this.__clip._y = this.__y; this.__dustClip._x = this.__x; this.__dustClip._y = this.__y; this.__hitAreaClip._x = this.__clip._x; this.__hitAreaClip._y = this.__clip._y; this.__randomCoef = 1; if (this.__myIdx == undefined) { this.__myIdx = World.RegMObsArr(this); } }; v2.Update = function (idx) { this.__myIdx = idx; this.HandleStateActions(); }; v2.Destroy = function () { if (this.__myIdx != undefined) { World.UnRegMObsArr(this.__myIdx); } LayMan.RemoveClip(this.__clip); LayMan.RemoveClip(this.__dustClip); LayMan.RemoveClip(this.__hitAreaClip); this.DestroySounds(); }; v2.Scroll = function (scrollCoef, xDiff, yDiff) { this.__x += Math.round(scrollCoef * xDiff, 2); this.__y += Math.round(scrollCoef * yDiff, 2); LayMan.ScrollClip(this.__clip, scrollCoef, xDiff, yDiff); LayMan.ScrollClip(this.__dustClip, scrollCoef, xDiff, yDiff); LayMan.ScrollClip(this.__hitAreaClip, scrollCoef, xDiff, yDiff); }; v2.HitTestByPlanesAndProjectiles = function (planeObj) { this.HitTestByPlanes(planeObj); }; v2.HitTestByPlanes = function (planeObj) { if (planeObj.getCurrentState() == enums.PlaneStates.INIT || planeObj.getCurrentState() == enums.PlaneStates.ROLLING || planeObj.getCurrentState() == enums.PlaneStates.EXPLODING) { return undefined; } if (!planeObj.isCollidingWithBullets()) { return undefined; } var v3; var v4; v4 = planeObj.getBBoxClip(); v3 = this.__hitAreaClip.hitTest(v4); if (v3) { this.ReactToCollisionWithPlanes(planeObj); } }; v2.HitTestByProjectiles2 = function (mpArr, mpSize) {}; v2.ReactToCollisionWithPlanes = function (planeObj) { this.__suckDriftVec.setXY(0, 0); var v4; v4 = planeObj.getXPos(); var v2; if (Math.random() < 0.8) { v2 = this.__x - v4; } else { v2 = this.__x - 0.5 * this.__hitAreaClip._width / 4 + 2 * this.__randomCoef * this.__hitAreaClip._width / 4 - v4; } var v5; if (FrameMan.isNthFrame(5)) { if (Math.random() < 0.6) { this.__randomCoef = 0.8 + Math.random() / 5; } else { this.__randomCoef = 4.5 * Math.random(); } } v5 = this.C_MAX_SUCK_FORCE * this.__randomCoef * UtilMath.getDirectRatioFncValue(Math.abs(v2), 30 * this.__randomCoef, this.__hitAreaClip._width / 2); if (v2 > 0) { this.__suckDriftVec.setVec(this.__suckFromLeftVec); } else { this.__suckDriftVec.setVec(this.__suckFromRightVec); } this.__suckDriftVec.Multiply(v5); var v6; v6 = Const.C_DEFAULT_Y_POS - planeObj.getYPos(); if (FrameMan.isNthFrame(5)) { if (Math.random() < 0.9) { this.__randomCoef = 0.8 + Math.random() / 5; } else { this.__randomCoef = 4.5 * Math.random(); } } var v7; v7 = this.C_MAX_TORNADO_LIFT * this.__randomCoef * UtilMath.getIndirectRatioFncValue(v6, 50 * this.__randomCoef, (this.__hitAreaClip._height + 100) * this.__randomCoef); this.__suckDriftVec.setY(this.__suckDriftVec.getY() - v7); planeObj.AddDrift(this.__suckDriftVec); if (FrameMan.isNthFrame(5)) { if (Math.random() < 0.05) { planeObj.ForceStallEngine(1000); this.PlaySound(); } } }; v2.HandleStateActions = function () { switch (this.__currentState) { case entities.Obstacles.Tornado.C_STATE_INIT: this.ChangeState(entities.Obstacles.Tornado.C_STATE_FLYING); break; case entities.Obstacles.Tornado.C_STATE_FLYING: super.Move(); this.SyncClipAttributes(this.__x, this.__y); this.CheckScreenBordersFunction(); break; break; case entities.Obstacles.Tornado.C_STATE_EXPLODING: case entities.Obstacles.Tornado.C_STATE_EXPLODING: } }; v2.ChangeState = function (newState) { this.HandleStatesTransition(this.__currentState, newState); this.__currentState = newState; }; v2.HandleStatesTransition = function (oldState, newState) { if (oldState == entities.Obstacles.Tornado.C_STATE_INIT && newState == entities.Obstacles.Tornado.C_STATE_FLYING) { this.__clip._visible = true; } if (oldState == entities.Obstacles.Tornado.C_STATE_FLYING && newState == entities.Obstacles.Tornado.C_STATE_EXPLODING) { } if (oldState == entities.Obstacles.Tornado.C_STATE_EXPLODING && newState == entities.Obstacles.Tornado.C_STATE_END) { this.__clip._visible = false; } }; v2.SyncClipAttributes = function (x, y) { this.__clip._x = this.__x; this.__clip._y = this.__y; this.__dustClip._x = this.__x; this.__dustClip._y = this.__y; this.__hitAreaClip._x = this.__clip._x; this.__hitAreaClip._y = this.__clip._y; }; v2.CheckScreenBordersFunction = function () { if (this.__x > Const.C_SCENE_MAX_WIDTH + this.__clip._width + 80) { this.__x = Const.C_SCENE_MIN_WIDTH - this.__clip._width; } if (this.__x < Const.C_SCENE_MIN_WIDTH - this.__clip._width - 80) { this.__x = Const.C_SCENE_MAX_WIDTH + this.__clip._width; } }; v2.Pause = function (evtObj) { if (evtObj.state == true) { if (this.__clip._visible) { this.__clip.stop(); } } else { if (this.__clip._visible) { this.__clip.play(); } } }; v2.getGroupId = function () { return -1; }; v2.getCurrentState = function () { return this.__currentState; }; v2.getClip = function () { return this.__hitAreaClip; }; v2.getObstacleType = function () { return this.__obstacleType; }; v2.getYPos = function () { return this.__y; }; v2.getX = function () { return this.__x; }; v2.getDirection = function () { return this.__direction; }; v2.getVelocity = function () { return this.__velocity; }; v2.InitSounds = function () { this.__sndClipArray = new Array(); this.__sndArray = new Array(); this.__sndArray[0] = this.RegisterSound(this.__sndClipArray, 'snd_tornado'); this.__sndCount = this.__sndArray.length; }; v2.DestroySounds = function () { var v2; v2 = 0; while (v2 < this.__sndClipArray.length) { LayMan.RemoveClip(this.__sndClipArray[v2]); ++v2; } }; v2.PlaySound = function () { if (!_global.GameConf.isSoundFXEnabled()) { return undefined; } var v3; v3 = UtilMath.getRandomNaturalNumber(0, this.__sndCount - 1); this.__sndArray[v3].start(); }; v2.RegisterSound = function (clipArray, soundName) { var v1; v1 = LayMan.RegisterEmptyClip('', LayMan.C_SND_EMPTY_CLIP_DEPTH_TYPE); clipArray.push(v1); var v2; v2 = new Sound(v1); v2.attachSound(soundName); return v2; }; v1.INSTANCES_COUNT = 0; v1.C_STATE_INIT = entities.Obstacles.Obstacle.C_STATE_INIT; v1.C_STATE_FLYING = entities.Obstacles.Obstacle.C_STATE_FLYING; v1.C_STATE_EXPLODING = entities.Obstacles.Obstacle.C_STATE_EXPLODING; v1.C_STATE_END = entities.Obstacles.Obstacle.C_STATE_END; v1.C_ARG_TYPE_OBSTACLE_TYPE = 0; v1.C_ARG_TYPE_X = 1; v1.C_ARG_TYPE_VELOCITY = 2; v1.C_ARG_TYPE_DIRECTION = 3; v2.C_MAX_SUCK_FORCE = 3; v2.C_SUCK_FORCE_ANGLE_DEG = 0; v2.C_DEFAULT_Y_POS = 575; v2.C_MAX_TORNADO_LIFT = 1; v2.__myIdx = undefined; ASSetPropFlags(entities.Obstacles.Tornado.prototype, null, 1); } #endinitclip } movieClip 1771 __Packages.entities.other.GameClock { #initclip if (!_global.entities) { _global.entities = new Object(); } if (!_global.entities.other) { _global.entities.other = new Object(); } if (!_global.entities.other.GameClock) { var v1 = function (timeLimit, isTimeoutPositive, xpos, ypos, w, fontSize, textAlign, showMinutes, clipName, h) { mx.events.EventDispatcher.initialize(this); this.__timeLimit = timeLimit; this.__isTimeoutPositive = isTimeoutPositive; fontSize = (fontSize == undefined) ? this.C_FONT_SIZE : fontSize; h = (h == undefined) ? fontSize : h; textAlign = (textAlign == undefined) ? 'center' : textAlign; xpos = (xpos == undefined) ? this.C_X_POS : xpos; ypos = (ypos == undefined) ? this.C_Y_POS : ypos; w = (w == undefined) ? this.C_W : w; showMinutes = (showMinutes == undefined) ? true : showMinutes; this.__showMinutes = showMinutes; clipName = (clipName == undefined) ? '' : clipName; this.__timeDraw = new MenuButton(MenuButton.C_CLIP_BTN, clipName, xpos, ypos, w, h, 0, 0, '0:00', 0, true, this.C_DEPTH_TYPE, undefined); this.__curColor = this.C_COLOR; this.__timeDraw.SetLabelColor(this.__curColor); this.__timeDraw.SetLabelFormat(fontSize, true, textAlign); this.__timer = new Timer(1000 * timeLimit); this.Init(); }; entities.other.GameClock = v1; var v2 = v1.prototype; v2.Init = function () { this.__oldTimeRemainSec = this.__timeLimit; this.SetTimerLabel(1000 * this.__timeLimit); this.__isTimeOut = false; }; v2.SetTimeText = function (txt) { this.__timeText = txt; this.SetTimerLabel(this.__timeLimit); }; v2.SetColors = function (okColor, lowTimeColor, criticalTimeColor) { this.C_COLOR = okColor; this.C_LOWTIME_COLOR = lowTimeColor; this.C_CRITICALTIME_COLOR = criticalTimeColor; this.__curColor = okColor; this.__timeDraw.SetLabelColor(this.__curColor); }; v2.FadeIn = function () { this.__timeDraw.FadeIn(); }; v2.FadeOut = function (destroyAfterFadeOut) { this.__timeDraw.FadeOut(destroyAfterFadeOut); }; v2.Destroy = function () { this.__timeDraw.Destroy(); }; v2.Start = function () { this.__isTimeOut = false; this.__timer.StopTimer(); this.__timer.StartTimer(); this.__timeDraw.FadeIn(); this.SetTimerLabel(1000 * this.__timeLimit); }; v2.Restart = function () { this.__isTimeOut = false; this.__timer.StopTimer(); this.__timer.StartTimer(); var v4; v4 = this.__timer.GetElapsedTime(); var v2; v2 = this.__timeLimit * 1000 - v4; var v3; v3 = Math.round(v2 * 0.001); if (this.__oldTimeRemainSec != v3) { this.SetTimerLabel(v2); } else { this.__oldTimeRemainSec = v3; } }; v2.Stop = function () { this.__timer.StartTimer(); this.__timeDraw.FadeOut(); }; v2.Update = function () { if (FrameMan.isNthFrame(this.C_REFRESH_AFTER_FRAMES)) { if (!this.__timer.isTimerStarted()) { return undefined; } if (this.__isTimeOut) { return undefined; } var v2; v2 = this.__timer.GetElapsedTime(); var v3; v3 = this.__timeLimit * 1000 - v2; var v4; v4 = Math.round(v3 * 0.001); if (this.__oldTimeRemainSec != v4) { this.SetTimerLabel(v3); } else { this.__oldTimeRemainSec = v4; } if (v2 > this.__timeLimit * 1000) { this.__isTimeOut = true; this.dispatchEvent({'target': this, 'type': entities.other.GameClock.EVT_TIMEOUT, 'objType': enums.ObstacleTypes.GAME_CLOCK, 'targType': enums.TargetTypes.NONE}); } } }; v2.SetTimerLabel = function (timeMs) { var v2; v2 = this.__timeText + ' ' + entities.other.GameClock.convertMillisecondsToMMSS(timeMs, this.__showMinutes); this.__timeDraw.SetLabel(v2); if (timeMs < this.C_CRITICALTIME_TRESHOLD * 1000 && this.__curColor != this.C_CRITICALTIME_COLOR) { this.__curColor = this.C_CRITICALTIME_COLOR; this.__timeDraw.SetLabelColor(this.__curColor); } else { if (timeMs < this.C_LOWTIME_TRESHOLD * 1000 && this.__curColor != this.C_LOWTIME_TRESHOLD) { this.__curColor = this.C_LOWTIME_COLOR; this.__timeDraw.SetLabelColor(this.__curColor); } } }; v1.convertMillisecondsToMMSS = function (millisecs, showMinutes) { var v6; var v5; var v2; var v1; var v3 = millisecs / 1000; var v7 = ':'; if (v3 == undefined || v3 <= 0) { if (showMinutes || showMinutes == undefined) { return '00:00'; } else { return '00'; } } else { if (v3 > 5999) { if (showMinutes || showMinutes == undefined) { return '99:59'; } else { return '59'; } } else { v6 = Math.floor(v3 / 60); v5 = Math.floor(v3 % 60); v2 = v6.toString(); v1 = v5.toString(); if (v2.length == 1) { v2 = '0' + v2; } else { if (v2.length > 2) { v2 = '99'; } } if (v1.length == 1) { v1 = '0' + v1; } else { if (v1.length > 2) { v1 = '59'; } } if (showMinutes || showMinutes == undefined) { return v2 + ':' + v1; } else { return v1; } } } }; v2.getTimeFromClock = function () { var v3; v3 = this.__timer.GetElapsedTime(); var v2; v2 = Math.floor((this.__timeLimit * 1000 - v3) / 1000); if (v2 < 0) { v2 = 0; } return v2; }; v2.isTimeoutPositive = function () { return this.__isTimeoutPositive; }; v2.getClip = function () { return this.__timeDraw.__skin; }; v1.EVT_TIMEOUT = 'EVT_TIMEOUT'; v2.C_X_POS = Const.C_SCENE_WIDTH / 2 - 100; v2.C_Y_POS = 10; v2.C_W = 200; v2.C_REFRESH_AFTER_FRAMES = 10; v2.C_FONT_SIZE = 30; v2.C_COLOR = Const.C_COLOR_WHITE; v2.C_LOWTIME_COLOR = Const.C_COLOR_ORANGE; v2.C_CRITICALTIME_COLOR = Const.C_COLOR_RED; v2.C_DEPTH_TYPE = LayMan.C_S_MENU; v2.C_LOWTIME_TRESHOLD = 30; v2.C_CRITICALTIME_TRESHOLD = 10; v2.__timeText = ''; ASSetPropFlags(entities.other.GameClock.prototype, null, 1); } #endinitclip } movieClip 1772 __Packages.entities.Obstacles.Airship { #initclip if (!_global.entities) { _global.entities = new Object(); } if (!_global.entities.Obstacles) { _global.entities.Obstacles = new Object(); } if (!_global.entities.Obstacles.Airship) { var v1 = function (myWorld, skyType, args) { var v4; v4 = (args[entities.Obstacles.Airship.C_ARG_TYPE_GROUP_ID] == undefined) ? GrpMan.C_DEFAULT_GROUP_ID : args[entities.Obstacles.Airship.C_ARG_TYPE_GROUP_ID]; this.__groupId = GrpMan.registerInGroup(v4); mx.events.EventDispatcher.initialize(this); super.constructor.apply(this, undefined); ++entities.Obstacles.Airship.INSTANCES_COUNT; this.__currInstanceId = entities.Obstacles.Airship.INSTANCES_COUNT; this.__myWorld = myWorld; this.__currHitPoints = (args[entities.Obstacles.Airship.C_ARG_TYPE_HITPOINTS] == undefined) ? 1 : args[entities.Obstacles.Airship.C_ARG_TYPE_HITPOINTS]; this.C_MAX_HITPOINTS = this.__currHitPoints; this.__currentState = entities.Obstacles.Airship.C_STATE_INIT; this.__obstacleType = args[entities.Obstacles.Airship.C_ARG_TYPE_OBSTACLE_TYPE]; this.setXY(args[entities.Obstacles.Airship.C_ARG_TYPE_X], args[entities.Obstacles.Airship.C_ARG_TYPE_Y]); this.setVelocity(args[entities.Obstacles.Airship.C_ARG_TYPE_VELOCITY]); this.setDirVec(args[entities.Obstacles.Airship.C_ARG_TYPE_DIRECTION]); this.__direction.Normalize(); this.__clip = LayMan.RegisterClip('S_AIRSHIP', LayMan.C_S_BKG_FAR); this.__clip2 = LayMan.RegisterClip('S_AIRSHIP_PLANE_HOLDER', LayMan.C_S_FGD_NEAR); enums.SkyTypes.AdjustTint(this.__clip, skyType, enums.SkyTypes.C_OBJ_COLOR_AMOUNT); if (this.__direction.getX() != 0) { this.__clip.gotoAndPlay('F_BEGIN'); } else { this.__clip.stop(); } if (this.__direction.getX() > 0) { this.__clip._xscale = 100; } else { this.__clip._xscale = -100; } this.__clip2._xscale = this.__clip._xscale; this.CreateHitAreaMovieClips(); this.__gravityVec = new Vector2D(0, Const.C_G * 0.05); this.__targetType = (args[entities.Obstacles.Airship.C_ARG_TYPE_TARGET_TYPE] == undefined) ? enums.TargetTypes.NONE : args[entities.Obstacles.Airship.C_ARG_TYPE_TARGET_TYPE]; this.__fallingTimer = new Timer(this.C_FALLING_TIME); this.__onText = (args[entities.Obstacles.Airship.C_ARG_TYPE_ON_TEXT] == undefined) ? '' : args[entities.Obstacles.Airship.C_ARG_TYPE_ON_TEXT]; this.__clip.onText.text = this.__onText; if (this.__clip._xscale < 0) { this.__clip.onText._xscale = -1 * this.__clip.onText._xscale; this.__clip.onText._x += 70; } this.Init(); this.InitGrpFlag(this.__clip); this.__explosion = new entities.effects.Explosion(entities.effects.Explosion.C_TYPE_RECTANGLE, entities.effects.Explosion.C_DURTYPE_DURATION, 20, 40, 130, [this.__clip._width * 0.7, this.__clip._height * 0.7], entities.effects.Explosion.C_FADE_SPEED_SLOW); this.__explosion2 = new entities.effects.Explosion(entities.effects.Explosion.C_TYPE_RECTANGLE, entities.effects.Explosion.C_DURTYPE_ONCE, 25, 100, 450, [0.7 * this.__clip._width, 0.7 * this.__clip._height], entities.effects.Explosion.C_FADE_SPEED_SLOW); this.__explosion.SetPauseListener(this.__myWorld, World.EVT_GAME_PAUSED); this.__explosion2.SetPauseListener(this.__myWorld, World.EVT_GAME_PAUSED); this.__myWorld.addEventListener(World.EVT_GAME_PAUSED, mx.utils.Delegate.create(this, this.Pause)); this.__sndExplosion = LayMan.RegisterSound(Const.C_EXPLOSION_3_SND, this.__clip); this.InitGrpFlag(this.__clip); }; entities.Obstacles.Airship = v1; entities.Obstacles.Airship extends entities.basic.MovingEntity; var v2 = v1.prototype; _global.entities.Obstacles.Airship implements _global.entities.Obstacles.ObstacleInterface; v2.Init = function () { this.__currHitPoints = this.C_MAX_HITPOINTS; this.__clip._x = this.__x; this.__clip._y = this.__y; this.__clip2._x = this.__clip._x; this.__clip2._y = this.__clip._y; this.__clip2._rotation = this.__clip._rotation; this.__clip2._xscale = this.__clip._xscale; this.SyncHitAreaMovieClips(); World.RegMObsArr(this); if (this.__myIdx == undefined) { this.__myIdx = World.RegMObsArr(this); } }; v2.Update = function (idx) { this.__myIdx = idx; this.HandleStateActions(); }; v2.Destroy = function () { if (this.__myIdx != undefined) { World.UnRegMObsArr(this.__myIdx); } LayMan.RemoveClip(this.__clip); LayMan.RemoveClip(this.__clip2); var v2; v2 = 0; while (v2 < this.__hitAreaClipsCount) { LayMan.RemoveClip(this.__hitAreaClipArray[v2]); ++v2; } this.__explosion.Destroy(); this.__explosion2.Destroy(); delete this.__sndExplosion; }; v2.getObstacleType = function () { return this.__obstacleType; }; v2.Scroll = function (scrollCoef, xDiff, yDiff) { this.__x += scrollCoef * xDiff * 0.5; this.__y += scrollCoef * yDiff * 0.5; LayMan.ScrollClip(this.__clip, scrollCoef, xDiff, yDiff); }; v2.HitTestByPlanes = function (planeObj) { if (!(planeObj.getCurrentState() == enums.PlaneStates.FLYING || planeObj.getCurrentState() == enums.PlaneStates.BREAKDOWN)) { return undefined; } var v4; var v6; v6 = planeObj.getBBoxClip(); var v3; var v2; v2 = 0; while (v2 < this.__hitAreaClipsCount) { v3 = this.__hitAreaClipArray[v2]; v4 = v3.hitTest(v6); if (v4) { this.ReactToCollisionWithPlanes(planeObj); return undefined; } ++v2; } }; v2.HitTestByProjectiles2 = function (mpArr, mpSize) { if (this.__currentState != entities.Obstacles.Airship.C_STATE_FLYING) { return undefined; } var v4; var v6; var v9; var v2; var v5; var v3; v6 = 0; while (v6 < mpSize) { v3 = mpArr[v6]; v2 = 0; while (v2 < this.__hitAreaClipsCount) { v5 = this.__hitAreaClipArray[v2]; v4 = v3.isCollision(v5); if (v4) { this.ReactToCollisionWithProjectiles2(v3, v3.getParentPlane()); } ++v2; } ++v6; } }; v2.ReactToCollisionWithPlanes = function (planeObj) { planeObj.ForceToExploding(); if (this.TakeDamage(this.C_WITH_PLANE_COLLISION_DAMAGE)) { var v5; v5 = String(enums.ObstacleTypes.getObstacleInfo(this.__obstacleType, enums.ObstacleTypes.INFO_NAME)); var v3; var v2; v3 = this.__x; v2 = this.__y - 10 - 20 * Math.random(); planeObj.PlaceDamageLabel(v5 + ' destroyed', v3, v2, FlyLabels.C_FNT_SIZE_DAMAGE_INFO); planeObj.ScoreAddKills(this.__obstacleType); this.ChangeState(entities.Obstacles.Airship.C_STATE_FALLING); return undefined; } }; v2.ReactToCollisionWithProjectiles = function (weapon, planeObj) { planeObj.ScoreAddProjectileHit(); var v3; v3 = weapon.getDamageTypeCausedArray(this.__x, this.__y, this.__direction); var v13; v13 = v3.length; var v12; v12 = v3[0].length; v12 = (v12 == undefined) ? 1 : v12; var v10 = false; var v11 = v12; if (v12 > 1) { v10 = true; v11 = v13; } var v2; var v8; var v4; v2 = 0; while (v2 < v11) { if (v10) { v8 = v3[v2][0]; v4 = v3[v2][1]; } else { v8 = v3[0]; v4 = v3[1]; } if (this.TakeDamage(v4)) { var v7; v7 = String(enums.ObstacleTypes.getObstacleInfo(this.__obstacleType, enums.ObstacleTypes.INFO_NAME)); var v6; var v5; v6 = this.__x; v5 = this.__y - 10 - 20 * Math.random(); planeObj.PlaceDamageLabel(v7 + ' destroyed', v6, v5, FlyLabels.C_FNT_SIZE_DAMAGE_INFO); planeObj.ScoreAddKills(this.__obstacleType); this.ChangeState(entities.Obstacles.Airship.C_STATE_FALLING); return undefined; } ++v2; } }; v2.ReactToCollisionWithProjectiles2 = function (prj, planeObj) { planeObj.ScoreAddProjectileHit(); var v3; v3 = prj.getDamageTypeCausedArray(this.__x, this.__y, this.__direction); var v13; v13 = v3.length; var v12; v12 = v3[0].length; v12 = (v12 == undefined) ? 1 : v12; var v10 = false; var v11 = v12; if (v12 > 1) { v10 = true; v11 = v13; } var v2; var v8; var v4; v2 = 0; while (v2 < v11) { if (v10) { v8 = v3[v2][0]; v4 = v3[v2][1]; } else { v8 = v3[0]; v4 = v3[1]; } if (this.TakeDamage(v4)) { var v7; v7 = String(enums.ObstacleTypes.getObstacleInfo(this.__obstacleType, enums.ObstacleTypes.INFO_NAME)); var v6; var v5; v6 = this.__x; v5 = this.__y - 10 - 20 * Math.random(); planeObj.PlaceDamageLabel(v7 + ' destroyed', v6, v5, FlyLabels.C_FNT_SIZE_DAMAGE_INFO); planeObj.ScoreAddKills(this.__obstacleType); this.ChangeState(entities.Obstacles.Airship.C_STATE_FALLING); return undefined; } ++v2; } }; v2.TakeDamage = function (damageSize) { if (this.__currentState != entities.Obstacles.Airship.C_STATE_FLYING) { return undefined; } this.__currHitPoints -= damageSize; if (this.__currHitPoints <= 0) { return true; } else { return false; } }; v2.HandleStateActions = function () { switch (this.__currentState) { case entities.Obstacles.Airship.C_STATE_INIT: this.ChangeState(entities.Obstacles.Airship.C_STATE_FLYING); break; case entities.Obstacles.Airship.C_STATE_FLYING: super.Move(); this.SyncClipAttributes(this.__x, this.__y); this.CheckScreenBordersFunction(); break; case entities.Obstacles.Airship.C_STATE_FALLING: if (this.__fallingTimer.TimeIntervalElapsed()) { this.ChangeState(entities.Obstacles.Airship.C_STATE_EXPLODING); } super.Move(); this.SyncClipAttributes(this.__x, this.__y); this.AlignDirToGravity(); this.CheckScreenBordersFunction(); if (this.__y >= Const.C_SCENE_HEIGHT - this.__clip._height * 0.25) { this.ChangeState(entities.Obstacles.Airship.C_STATE_EXPLODING); } if (this.__direction.getX() > 0) { if (this.__clip._rotation < 45) { this.__clip._rotation += 0.1; } } else { if (this.__clip._rotation > -45) { this.__clip._rotation -= 0.1; } } this.__explosion.SetXY(this.__x, this.__y); break; case entities.Obstacles.Airship.C_STATE_EXPLODING: super.Move(); this.SyncClipAttributes(this.__x, this.__y); this.AlignDirToGravity(); this.CheckScreenBordersFunction(); if (this.__y >= 2 * Const.C_SCENE_HEIGHT) { this.ChangeState(entities.Obstacles.Airship.C_STATE_END); } if (this.__direction.getX() > 0) { if (this.__clip._rotation < 45) { this.__clip._rotation += 0.1; } } else { if (this.__clip._rotation > -45) { this.__clip._rotation -= 0.1; } } this.__explosion.SetXY(this.__x, this.__y); break; case entities.Obstacles.Airship.C_STATE_END: } }; v2.ChangeState = function (newState) { this.HandleStatesTransition(this.__currentState, newState); this.__currentState = newState; }; v2.HandleStatesTransition = function (oldState, newState) { if (oldState == entities.Obstacles.Airship.C_STATE_INIT && newState == entities.Obstacles.Airship.C_STATE_FLYING) { this.__clip._visible = true; } if (oldState == entities.Obstacles.Airship.C_STATE_FLYING && newState == entities.Obstacles.Airship.C_STATE_FALLING) { if (GameConfig.getGameType() == enums.GameTypes.INS_SINGLEPLAYER && (GameConfig.getCurrentLevelId() == 19 || GameConfig.getCurrentLevelId() == 20)) { World.__isRedBaronAirshipDestroyed = true; this.dispatchEvent({'target': this, 'type': entities.Obstacles.Airship.EVT_UNIT_DESTROYED, 'objType': this.__obstacleType, 'targType': this.__targetType}); } this.__fallingTimer.StartTimer(); LayMan.SetTint(this.__clip, 0, 70); LayMan.SetTint(this.__clip2, 0, 70); this.__explosion.SetXY(this.__x, this.__y); this.__explosion.Play(); } if (oldState == entities.Obstacles.Airship.C_STATE_FALLING && newState == entities.Obstacles.Airship.C_STATE_EXPLODING) { GrpMan.unregisterFromGroup(this.__groupId); if (!(GameConfig.getGameType() == enums.GameTypes.INS_SINGLEPLAYER && (GameConfig.getCurrentLevelId() == 19 || GameConfig.getCurrentLevelId() == 20))) { this.dispatchEvent({'target': this, 'type': entities.Obstacles.Airship.EVT_UNIT_DESTROYED, 'objType': this.__obstacleType, 'targType': this.__targetType}); } this.__clip._visible = false; this.__clip2._visible = false; this.__explosion2.SetXY(this.__x, this.__y); this.__explosion2.Play(); if (_global.GameConf.isSoundFXEnabled()) { this.__sndExplosion.start(); } } if (oldState == entities.Obstacles.Airship.C_STATE_EXPLODING && newState == entities.Obstacles.Airship.C_STATE_END) { this.__clip._visible = false; this.__explosion.Stop(); this.Destroy(); } }; v2.SyncClipAttributes = function (x, y) { this.__clip._x = this.__x; this.__clip._y = this.__y; this.__clip2._x = this.__x; this.__clip2._y = this.__y; this.__clip2._rotation = this.__clip._rotation; this.__clip2._xscale = this.__clip._xscale; this.SyncHitAreaMovieClips(); }; v2.CheckScreenBordersFunction = function () { if (this.__x > Const.C_SCENE_MAX_WIDTH + this.__clip._width + 80) { this.__x = Const.C_SCENE_MIN_WIDTH - this.__clip._width; this.__y = UtilMath.getRandomNaturalNumber(0, Const.C_SCENE_HEIGHT * 0.5); this.RandomizeCrusingDirection(); } if (this.__x < Const.C_SCENE_MIN_WIDTH - this.__clip._width - 80) { this.__x = Const.C_SCENE_MAX_WIDTH + this.__clip._width; this.__y = UtilMath.getRandomNaturalNumber(0, Const.C_SCENE_HEIGHT * 0.5); this.RandomizeCrusingDirection(); } }; v2.RandomizeCrusingDirection = function () { var v2; v2 = 2 * (Math.round(Math.random()) - 0.5); this.__clip._xscale = v2 * 100; this.setDirX(v2); }; v2.AlignDirToGravity = function () { this.__direction.Multiply(this.__velocity); this.__direction.Add(this.__gravityVec); this.__velocity = this.__direction.Length(); this.__direction.Normalize(); }; v2.getTargetType = function () { return this.__targetType; }; v2.CreateHitAreaMovieClips = function () { this.__hitAreaClipArray = new Array(); var v2; var v3; var v4; v4 = this.C_HITAREA_CLIP_NAMES.length; v3 = 0; while (v3 < v4) { v2 = LayMan.RegisterClip(this.C_HITAREA_CLIP_NAMES[v3], LayMan.C_S_OTHER); if (v2 != undefined) { v2._visible = false; v2._xscale = this.__clip._xscale; this.__hitAreaClipArray.push(v2); } ++v3; } this.__hitAreaClipsCount = this.__hitAreaClipArray.length; this.SyncHitAreaMovieClips(); }; v2.SyncHitAreaMovieClips = function () { var v2; var v3; v3 = 0; while (v3 < this.__hitAreaClipsCount) { v2 = this.__hitAreaClipArray[v3]; v2._x = this.__clip._x; v2._y = this.__clip._y; v2._rotation = this.__clip._rotation; v2._xscale = this.__clip._xscale; v2._yscale = this.__clip._yscale; ++v3; } }; v2.Pause = function (evtObj) { if (evtObj.state == true) { if (this.__clip._visible) { this.__clip.stop(); } } else { if (this.__clip._visible) { this.__clip.stop(); } } }; v2.getGroupId = function () { return this.__groupId; }; v2.getCurrentState = function () { return this.__currentState; }; v2.getClip = function () { return this.__clip; }; v2.getYPos = function () { return this.__y; }; v2.getX = function () { return this.__x; }; v2.getDirection = function () { return this.__direction; }; v2.getVelocity = function () { return this.__velocity; }; v2.InitGrpFlag = function (clip) { if (GrpMan.getIsGroupColorShowed() && this.__groupId != GrpMan.C_DEFAULT_GROUP_ID) { var v2; v2 = GrpMan.getGroupColor(this.__groupId); LayMan.SetTint(clip.grpFlag, v2, 100); clip.grpFlag.gotoAndPlay('F_BEGIN'); } }; v2.getClosestXY = function () { var v2; v2 = new Vector2D(this.__x, this.__y); return v2; }; v1.EVT_UNIT_DESTROYED = 'EVT_UNIT_DESTROYED'; v2.C_WITH_PLANE_COLLISION_DAMAGE = 10; v1.INSTANCES_COUNT = 0; v1.C_STATE_INIT = entities.Obstacles.Obstacle.C_STATE_INIT; v1.C_STATE_FLYING = entities.Obstacles.Obstacle.C_STATE_FLYING; v1.C_STATE_FALLING = entities.Obstacles.Obstacle.C_STATE_FALLING; v1.C_STATE_EXPLODING = entities.Obstacles.Obstacle.C_STATE_EXPLODING; v1.C_STATE_END = entities.Obstacles.Obstacle.C_STATE_END; v2.C_HITAREA_CLIP_NAMES = ['S_AIRSHIP_BBOX_1', 'S_AIRSHIP_BBOX_2', 'S_AIRSHIP_BBOX_3', 'S_AIRSHIP_BBOX_4']; v2.C_FADE_OUT_STEP = 3; v1.C_ARG_TYPE_OBSTACLE_TYPE = 0; v1.C_ARG_TYPE_X = 1; v1.C_ARG_TYPE_Y = 2; v1.C_ARG_TYPE_VELOCITY = 3; v1.C_ARG_TYPE_DIRECTION = 4; v1.C_ARG_TYPE_HITPOINTS = 5; v1.C_ARG_TYPE_TARGET_TYPE = 6; v1.C_ARG_TYPE_ON_TEXT = 7; v1.C_ARG_TYPE_GROUP_ID = 8; v2.C_FALLING_TIME = 3000; v2.__myIdx = undefined; ASSetPropFlags(entities.Obstacles.Airship.prototype, null, 1); } #endinitclip } movieClip 1773 __Packages.gamemenu.components.HintDialog { #initclip if (!_global.gamemenu) { _global.gamemenu = new Object(); } if (!_global.gamemenu.components) { _global.gamemenu.components = new Object(); } if (!_global.gamemenu.components.HintDialog) { var v1 = function (hintClipNamesArr, wpnClipName, wpnName) { mx.events.EventDispatcher.initialize(this); this.__hintClipNamesArr = hintClipNamesArr; this.__hintCount = this.__hintClipNamesArr.length; this.__gameConfig = GameConfig.getInstance(); if (this.__hintClipNamesArr == undefined) { return undefined; } var v3; var v2; this.__hintClipsArr = new Array(); v3 = 0; while (v3 < this.__hintCount) { v2 = new MenuButton(MenuButton.C_CLIP_BTN, this.__hintClipNamesArr[v3], 0, 0, 400, 300, 0, 0, '', 5, true, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); v2.SetMaxAlpha(100); var v4; if (v2.__skin.wpnIcon != undefined) { v4 = LayMan.RegisterClipInClip(v2.__skin.wpnIcon, wpnClipName); v4._xscale = 150; v4._yscale = 150; } if (v2.__skin.wpnName != undefined) { v2.__skin.wpnName.text = wpnName; } this.__hintClipsArr.push(v2); ++v3; } this.UpdateActionBtnLabel(); this.__actionBtn = new MenuButton(MenuButton.C_RECT_BTN, '', 350, 405, 100, 40, this.C_CORNER_FEATHER, 0, this.__actionBtnLabel, 5, false, this.C_DEPTH_TYPE, this.C_HINT_DEPTH_TYPE); this.__actionBtn.SetLabelFormat(18, true, 'center'); this.__actionBtn.AllowFadeOutAfterClick(false); this.__actionBtn.SetMaxAlpha(50); this.__actionBtn.addEventListener(MenuButton.EVT_CLICK, DelegatePlus.create(this, this.NextDlgOrFadeOut)); }; gamemenu.components.HintDialog = v1; var v2 = v1.prototype; v2.UpdateActionBtnLabel = function () { if (this.__hintCount == 1) { this.__actionBtnLabel = gamemenu.components.HintDialog.C_FINISH_BTN_LABEL; } if (this.__hintCount > 1) { if (this.__curHintIdx == this.__hintCount - 1) { this.__actionBtnLabel = gamemenu.components.HintDialog.C_FINISH_BTN_LABEL; } else { this.__actionBtnLabel = gamemenu.components.HintDialog.C_NEXT_BTN_LABEL; } } this.__actionBtn.SetLabel(this.__actionBtnLabel); }; v2.FadeIn = function () { if (this.__curHintIdx >= this.__hintCount) { return undefined; } if (this.__curHintIdx == 0) { this.__actionBtn.FadeIn(); if (!this.__gameConfig.isGamePaused()) { this.__gameConfig.PauseGame(); } } this.UpdateActionBtnLabel(); this.__hintClipsArr[this.__curHintIdx].FadeIn(); }; v2.FadeOut = function (destroyAfterFadeOut) { this.__hintClipsArr[this.__curHintIdx].FadeOut(destroyAfterFadeOut); if (this.__curHintIdx == this.__hintCount - 1) { this.__actionBtn.FadeOut(); if (this.__gameConfig.isGamePaused()) { this.__gameConfig.UnPauseGame(); } } }; v2.Destroy = function () { var v2; v2 = 0; while (v2 < this.__hintCount) { this.__hintClipsArr[v2].DestroyBtn(); ++v2; } }; v2.NextDlgOrFadeOut = function () { this.FadeOut(true); ++this.__curHintIdx; this.FadeIn(); }; v1.C_NEXT_BTN_LABEL = 'Next'; v1.C_FINISH_BTN_LABEL = 'Play'; v2.C_DEPTH_TYPE = LayMan.C_S_MENU; v2.C_HINT_DEPTH_TYPE = LayMan.C_S_MENU_HINTS; v2.C_CORNER_FEATHER = 20; v2.__curHintIdx = 0; ASSetPropFlags(gamemenu.components.HintDialog.prototype, null, 1); } #endinitclip } movieClip 1774 __Packages.loopmusic.LoopMusic { #initclip if (!_global.loopmusic) { _global.loopmusic = new Object(); } if (!_global.loopmusic.LoopMusic) { var v1 = function () { this.__musicStoppedOnIdx = 0; this.__loopNodes = new Array(); }; loopmusic.LoopMusic = v1; var v2 = v1.prototype; v2.PlayMusic = function (replayFromStart) { var v2; if (replayFromStart == true) { v2 = 0; } else { v2 = this.__musicStoppedOnIdx; } this.__loopNodes[v2].Play(); }; v2.StopMusic = function () { var v3 = this.__loopNodes.length; var v2; v2 = 0; while (v2 < v3) { if (this.__loopNodes[v2].isPlaying()) { this.__musicStoppedOnIdx = v2; this.__loopNodes[v2].Stop(); } ++v2; } }; v2.Destroy = function () { this.StopMusic(); var v3 = this.__loopNodes.length; var v2; v2 = 0; while (v2 < v3) { this.__loopNodes[v2].Destroy(); ++v2; } }; v1.C_SND_MUSIC_LOOP_SYNC = 'snd_music_loop_sync'; ASSetPropFlags(loopmusic.LoopMusic.prototype, null, 1); } #endinitclip } movieClip 1775 __Packages.Music { #initclip if (!_global.Music) { var v1 = function () { super(); this.InitMusicGraph(); }; _global.Music = v1; _global.Music extends loopmusic.LoopMusic; var v2 = v1.prototype; v2.InitMusicGraph = function () { var v2; var v3; v2 = new loopmusic.LoopNode(0, this.__loopNodes, enums.MusicLoopNames.M010_pulse, 3, 4, 3, 8); this.__loopNodes.push(v2); v2 = new loopmusic.LoopNode(1, this.__loopNodes, enums.MusicLoopNames.M020, 1, 0, 0, 1); this.__loopNodes.push(v2); v2 = new loopmusic.LoopNode(2, this.__loopNodes, enums.MusicLoopNames.M030, 1, 1, 0, 2); this.__loopNodes.push(v2); v2 = new loopmusic.LoopNode(3, this.__loopNodes, enums.MusicLoopNames.M040, 1, 0, 0, 1); this.__loopNodes.push(v2); v2 = new loopmusic.LoopNode(4, this.__loopNodes, enums.MusicLoopNames.M050, 1, 0, 0, 1); this.__loopNodes.push(v2); v2 = new loopmusic.LoopNode(5, this.__loopNodes, enums.MusicLoopNames.M060a, 1, 1, 0, 2); this.__loopNodes.push(v2); v2 = new loopmusic.LoopNode(6, this.__loopNodes, enums.MusicLoopNames.M060b, 1, 1, 0, 2); this.__loopNodes.push(v2); v2 = new loopmusic.LoopNode(7, this.__loopNodes, enums.MusicLoopNames.M070, 1, 0, 0, 1); this.__loopNodes.push(v2); v2 = new loopmusic.LoopNode(8, this.__loopNodes, enums.MusicLoopNames.M080, 1, 1, 0, 2); this.__loopNodes.push(v2); v2 = new loopmusic.LoopNode(9, this.__loopNodes, enums.MusicLoopNames.M090, 1, 1, 0, 2); this.__loopNodes.push(v2); v2 = new loopmusic.LoopNode(10, this.__loopNodes, enums.MusicLoopNames.M100, 1, 0, 0, 1); this.__loopNodes.push(v2); v2 = new loopmusic.LoopNode(11, this.__loopNodes, enums.MusicLoopNames.M110, 1, 0, 0, 1); this.__loopNodes.push(v2); v2 = new loopmusic.LoopNode(12, this.__loopNodes, enums.MusicLoopNames.M120, 1, 1, 0, 2); this.__loopNodes.push(v2); v2 = new loopmusic.LoopNode(13, this.__loopNodes, enums.MusicLoopNames.M130_UL, 1, 0, 0, 1); this.__loopNodes.push(v2); v2 = new loopmusic.LoopNode(14, this.__loopNodes, enums.MusicLoopNames.M140, 1, 2, 0, 4); this.__loopNodes.push(v2); v2 = new loopmusic.LoopNode(15, this.__loopNodes, enums.MusicLoopNames.M150, 1, 0, 0, 1); this.__loopNodes.push(v2); v2 = new loopmusic.LoopNode(16, this.__loopNodes, enums.MusicLoopNames.M160_UL_long, 1, 0, 0, 1); this.__loopNodes.push(v2); v2 = new loopmusic.LoopNode(17, this.__loopNodes, enums.MusicLoopNames.M170, 1, 2, 0, 4); this.__loopNodes.push(v2); v2 = new loopmusic.LoopNode(18, this.__loopNodes, enums.MusicLoopNames.M175, 1, 0, 0, 1); this.__loopNodes.push(v2); v2 = new loopmusic.LoopNode(19, this.__loopNodes, enums.MusicLoopNames.M180_UL, 1, 0, 0, 1); this.__loopNodes.push(v2); this.__loopNodes[0].AddJoin(1, 1); this.__loopNodes[1].AddJoin(2, 1); this.__loopNodes[2].AddJoin(3, 1); this.__loopNodes[3].AddJoin(4, 0.8); this.__loopNodes[4].AddJoin(5, 1); this.__loopNodes[5].AddJoin(6, 1); this.__loopNodes[6].AddJoin(7, 1); this.__loopNodes[7].AddJoin(8, 0.7); this.__loopNodes[8].AddJoin(9, 1); this.__loopNodes[9].AddJoin(10, 0.5); this.__loopNodes[10].AddJoin(11, 0.8); this.__loopNodes[11].AddJoin(12, 1); this.__loopNodes[12].AddJoin(13, 1); this.__loopNodes[13].AddJoin(14, 1); this.__loopNodes[14].AddJoin(15, 0.6); this.__loopNodes[15].AddJoin(16, 0.6); this.__loopNodes[16].AddJoin(17, 1); this.__loopNodes[17].AddJoin(18, 1); this.__loopNodes[18].AddJoin(19, 0.6); this.__loopNodes[19].AddJoin(0, 1); this.__loopNodes[3].AddJoin(2, 0.2); this.__loopNodes[9].AddJoin(8, 0.25); this.__loopNodes[14].AddJoin(12, 0.2); this.__loopNodes[15].AddJoin(14, 0.2); this.__loopNodes[14].AddJoin(11, 0.1); this.__loopNodes[14].AddJoin(3, 0.1); this.__loopNodes[15].AddJoin(8, 0.2); this.__loopNodes[9].AddJoin(19, 0.25); this.__loopNodes[18].AddJoin(10, 0.1); this.__loopNodes[10].AddJoin(14, 0.2); this.__loopNodes[18].AddJoin(14, 0.1); this.__loopNodes[18].AddJoin(9, 0.2); this.__loopNodes[7].AddJoin(5, 0.3); }; ASSetPropFlags(_global.Music.prototype, null, 1); } #endinitclip } movieClip 1776 __Packages.loopmusic.LoopNode { #initclip if (!_global.loopmusic) { _global.loopmusic = new Object(); } if (!_global.loopmusic.LoopNode) { var v1 = function (idx, parentArray, soundName, mandatoryLoopsCount, moduloLoopsCount, moduloLoopsOffset, maxLoopsCount) { this.__idx = idx; this.__parentArray = parentArray; this.__sndClip = LayMan.RegisterEmptyClip('', LayMan.C_S_OTHER); this.__sound = new Sound(this.__sndClip); this.__sound.attachSound(soundName); this.__sndName = soundName; this.__syncCyclesElapsed = 0; this.__nextLoopJoinsArray = new Array(); this.__mandatoryLoopsCount = 1; this.__moduloLoopsCount = 0; this.__moduloLoopsOffset = 1; this.__maxLoopsCount = 1; this.__curLoopsDone = 0; this.SetNodeParams(mandatoryLoopsCount, moduloLoopsCount, moduloLoopsOffset, maxLoopsCount); }; loopmusic.LoopNode = v1; var v2 = v1.prototype; v2.SetNodeParams = function (mandatoryLoopsCount, moduloLoopsCount, moduloLoopsOffset, maxLoopsCount) { this.__mandatoryLoopsCount = (mandatoryLoopsCount == 0) ? 1 : mandatoryLoopsCount; this.__moduloLoopsCount = (moduloLoopsCount == 0) ? 1 : moduloLoopsCount; this.__moduloLoopsOffset = moduloLoopsOffset; this.__maxLoopsCount = (maxLoopsCount == 0) ? 1 : maxLoopsCount; }; v2.AddJoin = function (nextNodeIdx, transProbab) { this.__nextLoopJoinsArray.push(new loopmusic.LoopJoin(nextNodeIdx, transProbab)); if (this.__idx == 5) { var v2; v2 = 0; while (v2 < this.__nextLoopJoinsArray.length) { ++v2; } } }; v2.EqualizeJoinsProbab = function () { var v3 = this.__nextLoopJoinsArray.length; var v2; v2 == 0; while (v2 < v3) { this.__nextLoopJoinsArray[v2].SetTransProbab(1 / v3); ++v2; } }; v2.NormalizeJoinsProbab = function () { var v3 = this.__nextLoopJoinsArray.length; var v4 = 0; var v2; v2 == 0; while (v2 < v3) { v4 += this.__nextLoopJoinsArray[v2].GetTransProbab(); ++v2; } v2 == 0; while (v2 < v3) { this.__nextLoopJoinsArray[v2].SetTransProbab(this.__nextLoopJoinsArray[v2].GetTransProbab / v4); ++v2; } }; v2.Play = function (offset) { clearInterval(this.__myIntervalId); this.__myIntervalId = setInterval(mx.utils.Delegate.create(this, this.DoLoopNodeSynchronisation), loopmusic.LoopNode.C_INTERVAL_OFFSET_CHECK); this.__sound.start(offset / 1000); this.__syncCyclesElapsed = 0; if (this.__curLoopsDone == 0) { var v2; v2 = Math.round(this.__maxLoopsCount * Math.random()); if (v2 < this.__mandatoryLoopsCount) { v2 = this.__mandatoryLoopsCount; } else { var v3; v3 = v2 % this.__moduloLoopsCount; if (v3 == this.__moduloLoopsOffset) { } else { var v4; v4 = this.__moduloLoopsOffset - v3; v2 += v4; if (v2 > this.__maxLoopsCount) { v2 = this.__maxLoopsCount; } } } this.__totalLoopsToBePlayed = v2; } this.__nextNodeIdxPrefetched = this.PrefetchNextNodeIdx(); }; v2.PrefetchNextNodeIdx = function () { if (this.__curLoopsDone < this.__totalLoopsToBePlayed - 1) { return this.__idx; } var v9 = this.__nextLoopJoinsArray.length; var v2; var v8 = -1; var v5; v5 = Math.random(); var v3; var v4; var v6; var v7; v3 = 0; v2 = 0; while (v2 < v9) { v4 = this.__nextLoopJoinsArray[v2].GetTransProbab(); v7 = v3; v6 = v3 + v4; if (v5 >= v7 && v5 <= v6) { v8 = this.__nextLoopJoinsArray[v2].GetNextNodeIdx(); break; } v3 += v4; ++v2; } if (v8 == -1) { v8 = this.__nextLoopJoinsArray[0].GetNextNodeIdx(); } return v8; }; v2.Stop = function () { this.__sound.stop(this.__sndName); }; v2.isPlaying = function () { if (this.__sound.position == 0) { return false; } else { return true; } }; v2.IncLoopsAlreadyPlayed = function () { ++this.__curLoopsDone; if (this.__curLoopsDone > this.__totalLoopsToBePlayed) { this.__curLoopsDone = 0; } }; v2.DoLoopNodeSynchronisation = function () { var v2; v2 = this.__sound.duration - this.__sound.position; if (v2 < loopmusic.LoopNode.C_PREFIX_SILENCE_DURATION) { if (this.__idx == this.__nextNodeIdxPrefetched) { this.IncLoopsAlreadyPlayed(); } this.__nextNodePlayOffsetMs = loopmusic.LoopNode.C_PREFIX_SILENCE_DURATION - v2; var v3; v3 = this.__parentArray[this.__nextNodeIdxPrefetched].GetNodeName(); clearInterval(this.__myIntervalId); this.__parentArray[this.__nextNodeIdxPrefetched].Play(this.__nextNodePlayOffsetMs); } }; v2.GetNodeName = function () { return this.__sndName; }; v2.Destroy = function () { this.__sound.stop(); delete this.__sound; LayMan.RemoveClip(this.__sndClip); }; v1.C_PREFIX_SILENCE_DURATION = 500; v1.C_INTERVAL_OFFSET_CHECK = 311; ASSetPropFlags(loopmusic.LoopNode.prototype, null, 1); } #endinitclip } movieClip 1777 __Packages.loopmusic.LoopJoin { #initclip if (!_global.loopmusic) { _global.loopmusic = new Object(); } if (!_global.loopmusic.LoopJoin) { var v1 = function (nextNodeIdx, transProbab) { if (nextNodeIdx == undefined) { this.__nextNodeIdx = 0; } if (transProbab == undefined) { this.__transProbab = -1; } this.__nextNodeIdx = nextNodeIdx; this.__transProbab = transProbab; }; loopmusic.LoopJoin = v1; var v2 = v1.prototype; v2.SetNextNodeIdx = function (nextNodeIdx) { this.__nextNodeIdx = nextNodeIdx; }; v2.SetTransProbab = function (transProbab) { this.__transProbab = transProbab; }; v2.GetNextNodeIdx = function () { return this.__nextNodeIdx; }; v2.GetTransProbab = function () { return this.__transProbab; }; ASSetPropFlags(loopmusic.LoopJoin.prototype, null, 1); } #endinitclip } movieClip 1778 __Packages.enums.MusicLoopNames { #initclip if (!_global.enums) { _global.enums = new Object(); } if (!_global.enums.MusicLoopNames) { var v1 = function () {}; enums.MusicLoopNames = v1; var v2 = v1.prototype; v1.M010_pulse = 'M010_pulse'; v1.M020 = 'M020'; v1.M030 = 'M030'; v1.M040 = 'M040'; v1.M050 = 'M050'; v1.M060a = 'M060a'; v1.M060b = 'M060b'; v1.M070 = 'M070'; v1.M080 = 'M080'; v1.M090 = 'M090'; v1.M100 = 'M100'; v1.M110 = 'M110'; v1.M120 = 'M120'; v1.M130_UL = 'M130_UL'; v1.M140 = 'M140'; v1.M150 = 'M150'; v1.M160_UL_long = 'M160_UL_long'; v1.M170 = 'M170'; v1.M175 = 'M175'; v1.M180_UL = 'M180_UL'; ASSetPropFlags(enums.MusicLoopNames.prototype, null, 1); } #endinitclip } movieClip 1779 __Packages.Hint { #initclip if (!_global.Hint) { var v1 = function () { super.constructor.apply(this, arguments); }; _global.Hint = v1; _global.Hint extends MenuButton; var v2 = v1.prototype; v2.FadeInHint = function (hintIdx) { var v2; if (hintIdx == undefined) { var v3; v3 = this.__hintArray.length; v2 = Math.round((v3 - 1) * Math.random()); } else { v2 = hintIdx; } this.SetLabel('Hint of the day:\n\n' + this.__hintArray[v2]); this.FadeIn(); }; v2.FadeOutHint = function (destroyAfterFadeout) { this.FadeOut(destroyAfterFadeout); }; v2.__hintArray = ['Dive with your plane and gain more speed.', 'The more speed, the less maneuverability.', 'The more speed, the harder target to hunt down.', 'Don\'t raise too steeply. Your engine can shut off.', 'During engine shut off, turn your nose down and gain speed to start the engine.', 'Twist your nose or die.', 'Ambush from behind the cloud.', 'Take out your enemy even when you\'ve been already hit.', 'Seize the bonus crate and get an advantage!', 'There is only 25% chance to get bad bonus.', 'No one can hunt you down when in Afterburner mode.', 'Cut through your enemies with burning Air-screw when in Screwcutter mode.', 'Cut through the falling wrecks to get higher score when in Screwcutter mode.', 'Remember, the real gaming fun begins with your friends in multiplayer mode.', 'Bullets that travell a long distance have small pierce effect and cause just insignificant \'Minor Damage\'', 'If damaged, repair your plane with bonus', 'If tail of the plane is damaged, the plane maneuverability is reduced.', 'Reload time of a damaged gun is cut down drastically.', 'If engine of the plane is damaged, the plane speed is low without ability to speed up.', 'Hunt for easy targets such as damaged planes.', 'Always watch the damage indicators at the bottom of the screen.']; ASSetPropFlags(_global.Hint.prototype, null, 1); } #endinitclip } movieClip 1780 __Packages.enums.GameOverReasons { #initclip if (!_global.enums) { _global.enums = new Object(); } if (!_global.enums.GameOverReasons) { var v1 = function () {}; enums.GameOverReasons = v1; var v2 = v1.prototype; v1.getInfo = function (id, infoType) { return enums.GameOverReasons.InfoArray[id][infoType]; }; v1.SUCCESS = 0; v1.TIMEOUT = 1; v1.TIMEOUT_POSITIVE = 2; v1.OUT_OF_LIVES = 3; v1.ALLY_PRIMARY_DEAD = 4; v1.ALLY_SECONDARY_DEAD = 5; v1.TUTORIAL_COMPLETED = 6; v1.MULTIPLAYER = 7; v1.C_INFO_DESC = 0; v1.InfoArray = [['All objectives completed'], ['Time\'s up'], ['Time\'s up'], ['All lives depleted'], ['Important ally killed'], ['All secondary allies killed'], ['You have succesfully completed the tutorial'], ['Only one player survived']]; ASSetPropFlags(enums.GameOverReasons.prototype, null, 1); } #endinitclip } movieClip 1781 __Packages.enums.GameOverTypes { #initclip if (!_global.enums) { _global.enums = new Object(); } if (!_global.enums.GameOverTypes) { var v1 = function () {}; enums.GameOverTypes = v1; var v2 = v1.prototype; v1.MISSION_COMPLETED = 0; v1.MISSION_FAILED = 1; ASSetPropFlags(enums.GameOverTypes.prototype, null, 1); } #endinitclip } movieClip 1782 __Packages.SkyCloud { #initclip if (!_global.SkyCloud) { var v1 = function (isBkgCloud, windXDir, cloudTypeIdx, skyType, xpos) { this.__isBkgCloud = isBkgCloud; if (windXDir == 0 || windXDir == undefined) { this.__windDirX = -0.9; } else { this.__windDirX = 2 * windXDir; } this.__windFromLeft = this.__windDirX > 0 ? true : false; this.__direction = new Vector2D(this.__windDirX, 0); if (cloudTypeIdx > Const.C_SKYCLOUD_CLIP_COUNT) { } if (isBkgCloud) { this.__clip = LayMan.RegisterClip(Const.C_SKY_CLOUD_CLIP_NAME_MASK + cloudTypeIdx, LayMan.C_S_BKG_FAR); } else { this.__clip = LayMan.RegisterClip(Const.C_SKY_CLOUD_CLIP_NAME_MASK + cloudTypeIdx, LayMan.C_S_OTHER); } this.__skyType = skyType; this.__clip.cacheAsBitmap = true; this.setDefaultPosition(true, xpos); }; _global.SkyCloud = v1; var v2 = v1.prototype; v2.ShiftCloudColorFromSkyType = function (skyType) { enums.SkyTypes.AdjustTint(this.__clip, skyType, enums.SkyTypes.C_CLOUD_COLOR_AMOUNT); }; v2.setDefaultPosition = function (isInitialPos, xdef) { var v4 = Math.round((Const.C_SKYCLOUD_CLIP_COUNT - 1) * Math.random() + 1); this.__clip = LayMan.ReRegisterClipOnSameDepth(this.__clip, Const.C_SKY_CLOUD_CLIP_NAME_MASK + v4); this.ShiftCloudColorFromSkyType(this.__skyType); if (isInitialPos) { if (xdef != undefined) { this.__x = xdef; } else { this.__x = 2 * Const.C_SCENE_WIDTH * Math.random() - Const.C_SCENE_WIDTH / 4; } if (this.__isBkgCloud) { this.__y = this.C_BKG_CLOUD_Y_POS_MIN + (this.C_BKG_CLOUD_Y_POS_MAX - this.C_BKG_CLOUD_Y_POS_MIN) * Math.random(); } else { this.__y = this.C_FGD_CLOUD_Y_POS_MIN + (this.C_FGD_CLOUD_Y_POS_MAX - this.C_FGD_CLOUD_Y_POS_MIN) * Math.random(); } } else { if (this.__isBkgCloud) { if (this.__windFromLeft) { if (xdef != undefined) { this.__x = xdef; } else { this.__x = -1 * (this.C_BKG_CLOUD_Y_POS_MAX - this.C_BKG_CLOUD_Y_POS_MIN) * Math.random() - this.C_BKG_CLOUD_Y_POS_MIN; } } else { if (xdef != undefined) { this.__x = xdef; } else { this.__x = Const.C_SCENE_WIDTH + (this.C_BKG_CLOUD_Y_POS_MAX - this.C_BKG_CLOUD_Y_POS_MIN) * Math.random() + this.C_BKG_CLOUD_Y_POS_MIN; } } this.__y = this.C_BKG_CLOUD_Y_POS_MIN + (this.C_BKG_CLOUD_Y_POS_MAX - this.C_BKG_CLOUD_Y_POS_MIN) * Math.random(); } else { if (this.__windFromLeft) { if (xdef != undefined) { this.__x = xdef; } else { this.__x = -1 * (this.C_FGD_CLOUD_Y_POS_MAX - this.C_FGD_CLOUD_Y_POS_MIN) * Math.random() - this.C_BKG_CLOUD_Y_POS_MIN; } } else { if (xdef != undefined) { this.__x = xdef; } else { this.__x = Const.C_SCENE_WIDTH + (this.C_FGD_CLOUD_Y_POS_MAX - this.C_FGD_CLOUD_Y_POS_MIN) * Math.random() + this.C_BKG_CLOUD_Y_POS_MIN; } } this.__y = this.C_FGD_CLOUD_Y_POS_MIN + (this.C_FGD_CLOUD_Y_POS_MAX - this.C_FGD_CLOUD_Y_POS_MIN) * Math.random(); } } var v3; if (this.__isBkgCloud) { this.__velocity = this.C_BKG_CLOUD_VELOCITY_MIN + (this.C_BKG_CLOUD_VELOCITY_MAX - this.C_BKG_CLOUD_VELOCITY_MIN) * Math.random(); v3 = this.C_BKG_CLOUD_SIZE + this.C_BKG_CLOUD_SIZE_VARIATION * Math.random(); this.__clip._xscale = v3; this.__clip._yscale = v3; } else { this.__velocity = this.C_FGD_CLOUD_VELOCITY_MIN + (this.C_FGD_CLOUD_VELOCITY_MAX - this.C_FGD_CLOUD_VELOCITY_MIN) * Math.random(); v3 = this.C_FGD_CLOUD_SIZE + this.C_FGD_CLOUD_SIZE_VARIATION * Math.random(); this.__clip._xscale = v3; this.__clip._yscale = v3; } this.__clip._x = this.__x; this.__clip._y = this.__y; }; v2.Move = function () { this.__x += this.__direction.getX() * this.__velocity; this.__y -= this.__direction.getY() * this.__velocity; this.__clip._x = this.__x; this.__clip._y = this.__y; if (this.__windFromLeft) { if (this.__x > Const.C_SCENE_WIDTH + Const.C_SCENE_WIDTH / 2) { this.setDefaultPosition(false); } } else { if (this.__x < -1 * Const.C_SCENE_WIDTH / 2) { this.setDefaultPosition(false); } } }; v2.HideAll = function () { this.__clip._visible = false; }; v2.Destroy = function () { LayMan.RemoveClip(this.__clip); }; v2.Scroll = function (scrollCoef, xDiff, yDiff) { this.__x += Math.round(scrollCoef * xDiff, 2); this.__y += Math.round(scrollCoef * yDiff, 2); LayMan.ScrollClip(this.__clip, scrollCoef, xDiff, yDiff); }; v2.C_FGD_CLOUD_Y_POS_MIN = 50; v2.C_FGD_CLOUD_Y_POS_MAX = 300; v2.C_FGD_CLOUD_VELOCITY_MIN = 0.35; v2.C_FGD_CLOUD_VELOCITY_MAX = 0.45; v2.C_BKG_CLOUD_Y_POS_MIN = 300; v2.C_BKG_CLOUD_Y_POS_MAX = 400; v2.C_BKG_CLOUD_VELOCITY_MIN = 0.05; v2.C_BKG_CLOUD_VELOCITY_MAX = 0.2; v2.C_FGD_CLOUD_SIZE = 70; v2.C_FGD_CLOUD_SIZE_VARIATION = 10; v2.C_BKG_CLOUD_SIZE = 10; v2.C_BKG_CLOUD_SIZE_VARIATION = 8; ASSetPropFlags(_global.SkyCloud.prototype, null, 1); } #endinitclip } movieClip 1783 __Packages.entities.Obstacles.GroundFog { #initclip if (!_global.entities) { _global.entities = new Object(); } if (!_global.entities.Obstacles) { _global.entities.Obstacles = new Object(); } if (!_global.entities.Obstacles.GroundFog) { var v1 = function (myWorld, skyType, args) { super(); mx.events.EventDispatcher.initialize(this); ++entities.Obstacles.GroundFog.INSTANCES_COUNT; this.__currInstanceId = entities.Obstacles.GroundFog.INSTANCES_COUNT; this.__myWorld = myWorld; this.__clip = LayMan.RegisterClip('S_GROUND_FOG', LayMan.C_S_COLLIDE_NEAR); enums.SkyTypes.AdjustTint(this.__clip, skyType, enums.SkyTypes.C_OBJ_COLOR_AMOUNT); this.__currentState = entities.Obstacles.GroundFog.C_STATE_INIT; this.__obstacleType = args[entities.Obstacles.GroundFog.C_ARG_TYPE_OBSTACLE_TYPE]; this.setXY(args[entities.Obstacles.GroundFog.C_ARG_TYPE_X], args[entities.Obstacles.GroundFog.C_ARG_TYPE_Y]); this.setVelocity(args[entities.Obstacles.GroundFog.C_ARG_TYPE_VELOCITY]); this.setDirXY(args[entities.Obstacles.GroundFog.C_ARG_TYPE_DIRECTION].getX(), args[entities.Obstacles.GroundFog.C_ARG_TYPE_DIRECTION].getY()); this.Init(); this.__myWorld.addEventListener(World.EVT_GAME_PAUSED, mx.utils.Delegate.create(this, this.Pause)); }; entities.Obstacles.GroundFog = v1; entities.Obstacles.GroundFog extends entities.basic.MovingEntity; var v2 = v1.prototype; _global.entities.Obstacles.GroundFog implements _global.entities.Obstacles.ObstacleInterface; v2.HitTestByPlanesAndProjectiles = function (planeObj) {}; v2.HitTestByPlanes = function (planeObj) {}; v2.HitTestByProjectiles2 = function (mpArr, mpSize) {}; v2.Init = function () { this.__clip._x = this.__x; this.__clip._y = this.__y; if (this.__myIdx == undefined) { this.__myIdx = World.RegMObsArr(this); } }; v2.Update = function (idx) { this.__myIdx = idx; this.HandleStateActions(); }; v2.Destroy = function () { if (this.__myIdx != undefined) { World.UnRegMObsArr(this.__myIdx); } LayMan.RemoveClip(this.__clip); }; v2.Scroll = function (scrollCoef, xDiff, yDiff) { this.__x += Math.round(scrollCoef * xDiff, 2); this.__y += Math.round(scrollCoef * yDiff, 2); LayMan.ScrollClip(this.__clip, scrollCoef, xDiff, yDiff); }; v2.HandleStateActions = function () { switch (this.__currentState) { case entities.Obstacles.GroundFog.C_STATE_INIT: this.ChangeState(entities.Obstacles.GroundFog.C_STATE_FLYING); break; case entities.Obstacles.GroundFog.C_STATE_FLYING: super.Move(); this.SyncClipAttributes(this.__x, this.__y); this.CheckScreenBordersFunction(); break; case entities.Obstacles.GroundFog.C_STATE_EXPLODING: break; case entities.Obstacles.GroundFog.C_STATE_EXPLODING: } }; v2.ChangeState = function (newState) { this.HandleStatesTransition(this.__currentState, newState); this.__currentState = newState; }; v2.HandleStatesTransition = function (oldState, newState) { if (oldState == entities.Obstacles.GroundFog.C_STATE_INIT && newState == entities.Obstacles.GroundFog.C_STATE_FLYING) { this.__clip._visible = true; } if (oldState == entities.Obstacles.GroundFog.C_STATE_FLYING && newState == entities.Obstacles.GroundFog.C_STATE_EXPLODING) { this.dispatchEvent({'target': this, 'type': 'EVT_OBSTACLE_DESTROYED'}); } if (oldState == entities.Obstacles.GroundFog.C_STATE_EXPLODING && newState == entities.Obstacles.GroundFog.C_STATE_END) { this.__clip._visible = false; } }; v2.SyncClipAttributes = function (x, y) { this.__clip._x = this.__x; this.__clip._y = this.__y; }; v2.CheckScreenBordersFunction = function () { if (this.__x > Const.C_SCENE_MAX_WIDTH + this.__clip._width + 80) { this.__x = Const.C_SCENE_MIN_WIDTH - this.__clip._width; this.__y = UtilMath.getRandomNaturalNumber(Const.C_SCENE_HEIGHT * 0.8, Const.C_SCENE_HEIGHT * 0.95); } if (this.__x < Const.C_SCENE_MIN_WIDTH - this.__clip._width - 80) { this.__x = Const.C_SCENE_MAX_WIDTH + this.__clip._width; this.__y = UtilMath.getRandomNaturalNumber(Const.C_SCENE_HEIGHT * 0.8, Const.C_SCENE_HEIGHT * 0.95); } }; v2.Pause = function (evtObj) { if (evtObj.state == true) { if (this.__clip._visible) { this.__clip.stop(); } } else { if (this.__clip._visible) { this.__clip.play(); } } }; v2.getGroupId = function () { return -1; }; v2.getCurrentState = function () { return this.__currentState; }; v2.getClip = function () { return this.__clip; }; v2.getObstacleType = function () { return this.__obstacleType; }; v2.getYPos = function () { return this.__y; }; v2.getX = function () { return this.__x; }; v2.getDirection = function () { return this.__direction; }; v2.getVelocity = function () { return this.__velocity; }; v1.INSTANCES_COUNT = 0; v1.C_STATE_INIT = entities.Obstacles.Obstacle.C_STATE_INIT; v1.C_STATE_FLYING = entities.Obstacles.Obstacle.C_STATE_FLYING; v1.C_STATE_EXPLODING = entities.Obstacles.Obstacle.C_STATE_EXPLODING; v1.C_STATE_END = entities.Obstacles.Obstacle.C_STATE_END; v1.C_ARG_TYPE_OBSTACLE_TYPE = 0; v1.C_ARG_TYPE_X = 1; v1.C_ARG_TYPE_Y = 2; v1.C_ARG_TYPE_VELOCITY = 3; v1.C_ARG_TYPE_DIRECTION = 4; v2.__myIdx = undefined; ASSetPropFlags(entities.Obstacles.GroundFog.prototype, null, 1); } #endinitclip } movieClip 1784 __Packages.KeyControls { #initclip if (!_global.KeyControls) { var v1 = function (defaultKeys) { this.__CMD_FIRE_3 = undefined; this.__CMD_FIRE_SECONDARY_3 = undefined; switch (defaultKeys) { case enums.DefaultKeyTypes.A_W_D: this.__CMD_LEFT = 97 - this.key_offset; this.__CMD_RIGHT = 100 - this.key_offset; this.__CMD_LEFT_ALTERNATIVE = undefined; this.__CMD_RIGHT_ALTERNATIVE = undefined; this.__CMD_FIRE = 119 - this.key_offset; this.__CMD_FIRE_2 = this.__CMD_FIRE; this.__CMD_FIRE_SECONDARY = 115 - this.key_offset; this.__CMD_FIRE_SECONDARY_2 = this.__CMD_FIRE_SECONDARY; break; case enums.DefaultKeyTypes.J_I_L: this.__CMD_LEFT = 106 - this.key_offset; this.__CMD_RIGHT = 108 - this.key_offset; this.__CMD_LEFT_ALTERNATIVE = undefined; this.__CMD_RIGHT_ALTERNATIVE = undefined; this.__CMD_FIRE = 105 - this.key_offset; this.__CMD_FIRE_2 = this.__CMD_FIRE; this.__CMD_FIRE_SECONDARY = 107 - this.key_offset; this.__CMD_FIRE_SECONDARY_2 = this.__CMD_FIRE_SECONDARY; break; case enums.DefaultKeyTypes.LEFT_UP_RIGHT_ONLY: this.__CMD_LEFT = 37; this.__CMD_RIGHT = 39; this.__CMD_LEFT_ALTERNATIVE = undefined; this.__CMD_RIGHT_ALTERNATIVE = undefined; this.__CMD_FIRE = 38; this.__CMD_FIRE_2 = 32; this.__CMD_FIRE_SECONDARY = 40; this.__CMD_FIRE_SECONDARY_2 = 98 - this.key_offset; break; case enums.DefaultKeyTypes.LEFT_UP_RIGHT: this.__CMD_LEFT = 37; this.__CMD_RIGHT = 39; this.__CMD_LEFT_ALTERNATIVE = 97 - this.key_offset; this.__CMD_RIGHT_ALTERNATIVE = 100 - this.key_offset; this.__CMD_FIRE = 38; this.__CMD_FIRE_2 = 32; this.__CMD_FIRE_3 = 119 - this.key_offset; this.__CMD_FIRE_SECONDARY = 40; this.__CMD_FIRE_SECONDARY_2 = 115 - this.key_offset; this.__CMD_FIRE_SECONDARY_3 = 98 - this.key_offset; break; case enums.DefaultKeyTypes.NUMPAD_4_8_6: this.__CMD_LEFT = 100; this.__CMD_RIGHT = 102; this.__CMD_LEFT_ALTERNATIVE = undefined; this.__CMD_RIGHT_ALTERNATIVE = undefined; this.__CMD_FIRE = 104; this.__CMD_FIRE_2 = this.__CMD_FIRE; this.__CMD_FIRE_SECONDARY = 53 - this.key_offset; this.__CMD_FIRE_SECONDARY_2 = this.__CMD_FIRE_SECONDARY; break; case enums.DefaultKeyTypes.MOUSE_MULTI: this.__CMD_LEFT = undefined; this.__CMD_RIGHT = undefined; this.__CMD_LEFT_ALTERNATIVE = undefined; this.__CMD_RIGHT_ALTERNATIVE = undefined; this.__CMD_FIRE = undefined; this.__CMD_FIRE_2 = undefined; this.__CMD_FIRE_SECONDARY = 17; this.__CMD_FIRE_SECONDARY_2 = undefined; break; case enums.DefaultKeyTypes.MOUSE: this.__CMD_LEFT = undefined; this.__CMD_RIGHT = undefined; this.__CMD_LEFT_ALTERNATIVE = undefined; this.__CMD_RIGHT_ALTERNATIVE = undefined; this.__CMD_FIRE = undefined; this.__CMD_FIRE_2 = undefined; this.__CMD_FIRE_SECONDARY = 32; this.__CMD_FIRE_SECONDARY_2 = undefined; } }; _global.KeyControls = v1; var v2 = v1.prototype; v2.__set__cmdLeft = function (KeyCode) { this.__CMD_LEFT = KeyCode; return this.__get__cmdLeft(); }; v2.__set__cmdRight = function (KeyCode) { this.__CMD_RIGHT = KeyCode; return this.__get__cmdRight(); }; v2.__set__cmdLeft2 = function (KeyCode) { this.__CMD_LEFT_ALTERNATIVE = KeyCode; return this.__get__cmdLeft2(); }; v2.__set__cmdRight2 = function (KeyCode) { this.__CMD_RIGHT_ALTERNATIVE = KeyCode; return this.__get__cmdRight2(); }; v2.__set__cmdFire = function (KeyCode) { this.__CMD_FIRE = KeyCode; return this.__get__cmdFire(); }; v2.__set__cmdFire2 = function (KeyCode) { this.__CMD_FIRE_2 = KeyCode; return this.__get__cmdFire2(); }; v2.__set__cmdFire3 = function (KeyCode) { this.__CMD_FIRE_3 = KeyCode; return this.__get__cmdFire3(); }; v2.__get__cmdLeft = function () { return this.__CMD_LEFT; }; v2.__get__cmdRight = function () { return this.__CMD_RIGHT; }; v2.__get__cmdLeft2 = function () { return this.__CMD_LEFT_ALTERNATIVE; }; v2.__get__cmdRight2 = function () { return this.__CMD_RIGHT_ALTERNATIVE; }; v2.__get__cmdFire = function () { return this.__CMD_FIRE; }; v2.__get__cmdFire2 = function () { return this.__CMD_FIRE_2; }; v2.__get__cmdFire3 = function () { return this.__CMD_FIRE_3; }; v2.__get__cmdFireSecondary = function () { return this.__CMD_FIRE_SECONDARY; }; v2.__get__cmdFireSecondary2 = function () { return this.__CMD_FIRE_SECONDARY_2; }; v2.__get__cmdFireSecondary3 = function () { return this.__CMD_FIRE_SECONDARY_3; }; v2.key_offset = 32; v2.addProperty('cmdFire', v2.__get__cmdFire, v2.__set__cmdFire); v2.addProperty('cmdFire2', v2.__get__cmdFire2, v2.__set__cmdFire2); v2.addProperty('cmdFire3', v2.__get__cmdFire3, v2.__set__cmdFire3); v2.addProperty('cmdFireSecondary', v2.__get__cmdFireSecondary, function () {}); v2.addProperty('cmdFireSecondary2', v2.__get__cmdFireSecondary2, function () {}); v2.addProperty('cmdFireSecondary3', v2.__get__cmdFireSecondary3, function () {}); v2.addProperty('cmdLeft', v2.__get__cmdLeft, v2.__set__cmdLeft); v2.addProperty('cmdLeft2', v2.__get__cmdLeft2, v2.__set__cmdLeft2); v2.addProperty('cmdRight', v2.__get__cmdRight, v2.__set__cmdRight); v2.addProperty('cmdRight2', v2.__get__cmdRight2, v2.__set__cmdRight2); ASSetPropFlags(_global.KeyControls.prototype, null, 1); } #endinitclip } movieClip 1785 __Packages.AI.Agent { #initclip if (!_global.AI) { _global.AI = new Object(); } if (!_global.AI.Agent) { var v1 = function (dataModel) { this.fsm = new AI.StateMachine(this, dataModel); this.dataModel = dataModel; }; AI.Agent = v1; var v2 = v1.prototype; v2.Update = function (time) { this.fsm.Update(time); }; v2.getStateMachine = function () { return this.fsm; }; ASSetPropFlags(AI.Agent.prototype, null, 1); } #endinitclip } movieClip 1786 __Packages.AI.StateMachine { #initclip if (!_global.AI) { _global.AI = new Object(); } if (!_global.AI.StateMachine) { var v1 = function (agent, dataModel) { this.currentState = null; this.previousState = null; this.nextState = null; this.agent = agent; this.dataModel = dataModel; }; AI.StateMachine = v1; var v2 = v1.prototype; v2.setNextState = function (s) { this.nextState = s; this.curStateName = s.getStateName(); }; v2.setCurrentState = function (s) { this.currentState = s; this.curStateName = s.getStateName(); }; v2.setPreviousState = function (s) { this.previousState = s; this.curStateName = s.getStateName(); }; v2.Update = function (time) { if (this.currentState) { this.currentState.Update(time); } }; v2.ChangeState = function (s) { this.currentState.Exit(); this.previousState = this.currentState; this.currentState = s; this.curStateName = s.getStateName(); this.currentState.Enter(); }; v2.GoToPreviousState = function () { this.ChangeState(this.previousState); }; v2.GoToNextState = function () { this.ChangeState(this.nextState); }; v2.getDataModel = function () { return this.dataModel; }; v2.getAgent = function () { return this.agent; }; v2.getCurrentState = function () { return this.currentState; }; v2.getCurStateName = function () { return this.curStateName; }; v2.curStateName = ''; ASSetPropFlags(AI.StateMachine.prototype, null, 1); } #endinitclip } movieClip 1787 __Packages.AI.IState { #initclip if (!_global.AI) { _global.AI = new Object(); } if (!_global.AI.IState) { _global.AI.IState = function () {}; } #endinitclip } movieClip 1788 __Packages.PlaneAI { #initclip if (!_global.PlaneAI) { var v1 = function (AIProfile, dataModel) { super(dataModel); this.fsm.setCurrentState(new AI.States.Init(this.fsm)); this.__AIProfile = AIProfile; this.Init(); }; _global.PlaneAI = v1; _global.PlaneAI extends AI.Agent; var v2 = v1.prototype; v2.Init = function () { this.__controlDecisionResult = 0; this.__isFiringPrimary = false; this.__isFiringSecondary = false; }; v2.Update = function (time) { super.Update(time); }; v2.FollowForce = function (force, p) { if (force.__x == 0 && force.__y == 0) { this.__controlDecisionResult = 0; return undefined; } var v3; var v2; v3 = p.__direction.getAlphaDeg(); v2 = force.getAlphaDeg(); var v9; v9 = p.getAltitude(); var v8; v8 = p.getCRotationStep(); var v5; var v4; v5 = p.__direction.__x; v4 = force.__y; if (v3 < 0) { v3 = 360 + v3; } if (v2 < 0) { v2 = 360 + v2; } if (Math.abs(v3 - v2) < v8) { this.__controlDecisionResult = 0; return undefined; } if (v5 > 0 && v4 > 0 || v5 < 0 && v4 < 0 || v9 < 150) { if (v2 > v3) { if (Math.abs(v2 - v3) > 180) { this.__controlDecisionResult = 1; } else { this.__controlDecisionResult = 2; } return undefined; } else { if (Math.abs(v2 - v3) > 180) { this.__controlDecisionResult = 2; } else { this.__controlDecisionResult = 1; } return undefined; } this.__controlDecisionResult = 0; return undefined; } if (v5 < 0 && v4 > 0) { this.__controlDecisionResult = 1; return undefined; } if (v5 > 0 && v4 < 0) { this.__controlDecisionResult = 2; return undefined; } this.__controlDecisionResult = 0; return undefined; }; v2.isLeftPressed = function () { if (this.__controlDecisionResult == 1) { return true; } else { return false; } }; v2.isRightPressed = function () { if (this.__controlDecisionResult == 2) { return true; } else { return false; } }; v2.isFirePressed = function () { return this.__isFiringPrimary; }; v2.isFireSecondaryPressed = function () { return this.__isFiringSecondary; }; v2.ForceChangeState = function (newPlaneState) { switch (newPlaneState) { case enums.PlaneStates.INIT: this.fsm.ChangeState(new this.Init(this.fsm)); break; case enums.PlaneStates.ROLLING: this.fsm.ChangeState(new AI.States.Rolling(this.fsm)); break; case enums.PlaneStates.FLYING: this.fsm.ChangeState(new AI.States.Flying(this.fsm)); break; case enums.PlaneStates.BREAKDOWN: this.fsm.ChangeState(new AI.States.Breakdown(this.fsm)); break; case enums.PlaneStates.BULLETHIT: this.fsm.ChangeState(new AI.States.Bullethit(this.fsm)); break; case enums.PlaneStates.EXPLODING: this.fsm.ChangeState(new AI.States.Exploding(this.fsm)); break; case enums.PlaneStates.END: this.fsm.ChangeState(new AI.States.End(this.fsm)); } }; v2.Destroy = function () {}; v2.getAIProfile = function () { return this.__AIProfile; }; v2.setFirePrimPressed = function (val) { this.__isFiringPrimary = val; }; v2.setFireSecPressed = function (val) { this.__isFiringSecondary = val; }; ASSetPropFlags(_global.PlaneAI.prototype, null, 1); } #endinitclip } movieClip 1789 __Packages.AI.States.Init { #initclip if (!_global.AI) { _global.AI = new Object(); } if (!_global.AI.States) { _global.AI.States = new Object(); } if (!_global.AI.States.Init) { var v1 = function (fsm) { this.fsm = fsm; this.plane = AirPlane(fsm.getDataModel()); this.agent = PlaneAI(fsm.getAgent()); var v3; v3 = this.C_MAX_START_TIME * Math.random(); this.startTimer = new Timer(v3); this.startTimer.StartTimer(); }; AI.States.Init = v1; var v2 = v1.prototype; _global.AI.States.Init implements _global.AI.IState; v2.Enter = function () {}; v2.Exit = function () { this.agent.setFirePrimPressed(false); }; v2.Update = function (time) { if (this.startTimer.TimeIntervalElapsed()) { this.agent.setFirePrimPressed(true); } }; v2.getStateName = function () { return this.stateName; }; v2.stateName = 'Init'; v2.C_MAX_START_TIME = 5000; ASSetPropFlags(AI.States.Init.prototype, null, 1); } #endinitclip } movieClip 1790 __Packages.AI.States.Rolling { #initclip if (!_global.AI) { _global.AI = new Object(); } if (!_global.AI.States) { _global.AI.States = new Object(); } if (!_global.AI.States.Rolling) { var v1 = function (fsm) { this.fsm = fsm; this.plane = AirPlane(fsm.getDataModel()); this.agent = PlaneAI(fsm.getAgent()); }; AI.States.Rolling = v1; var v2 = v1.prototype; _global.AI.States.Rolling implements _global.AI.IState; v2.Enter = function () { this.raiseDir = AI.States.Rolling.GenRandomRaiseVector(this.plane, AI.States.Rolling.C_MIN_RAISE_DEGREE, AI.States.Rolling.C_MIN_RAISE_DEGREE_DIFF); }; v2.Exit = function () {}; v2.Update = function (time) { this.agent.FollowForce(this.raiseDir, this.plane); }; v1.GenRandomRaiseVector = function (plane, minRaiseDeg, raiseDegDiff) { var v1; v1 = new Vector2D(1, 0); var v4; v4 = plane.getFaceRightOrientation(); var v2; v2 = minRaiseDeg + raiseDegDiff * Math.random(); if (plane.__direction.__x > 0) { v1.Rotate(-1 * v2); return v1; } v1.Rotate(180 + v2); return v1; }; v2.getStateName = function () { return this.stateName; }; v2.stateName = 'Rolling'; v1.C_MIN_RAISE_DEGREE = 20; v1.C_MIN_RAISE_DEGREE_DIFF = 20; ASSetPropFlags(AI.States.Rolling.prototype, null, 1); } #endinitclip } movieClip 1791 __Packages.AI.States.Flying { #initclip if (!_global.AI) { _global.AI = new Object(); } if (!_global.AI.States) { _global.AI.States = new Object(); } if (!_global.AI.States.Flying) { var v1 = function (fsm) { this.fsm = fsm; this.plane = AirPlane(fsm.getDataModel()); this.agent = PlaneAI(fsm.getAgent()); this.flyAgent = new AI.Agent(Object(this.plane)); this.flyFsm = this.flyAgent.getStateMachine(); }; AI.States.Flying = v1; var v2 = v1.prototype; _global.AI.States.Flying implements _global.AI.IState; v2.Enter = function () { this.flyFsm.setCurrentState(new AI.States.FlyingSubStates.Init(this.flyFsm)); }; v2.Exit = function () {}; v2.Update = function (time) { this.flyFsm.Update(); }; v2.getFlyAgent = function () { return this.flyAgent; }; v2.getStateName = function () { return this.stateName; }; v2.stateName = 'Flying'; ASSetPropFlags(AI.States.Flying.prototype, null, 1); } #endinitclip } movieClip 1792 __Packages.AI.States.FlyingSubStates.Init { #initclip if (!_global.AI) { _global.AI = new Object(); } if (!_global.AI.States) { _global.AI.States = new Object(); } if (!_global.AI.States.FlyingSubStates) { _global.AI.States.FlyingSubStates = new Object(); } if (!_global.AI.States.FlyingSubStates.Init) { var v1 = function (fsm) { this.fsm = fsm; this.dataModel = fsm.getDataModel(); this.plane = AirPlane(this.dataModel); }; AI.States.FlyingSubStates.Init = v1; var v2 = v1.prototype; _global.AI.States.FlyingSubStates.Init implements _global.AI.IState; v2.Enter = function () {}; v2.Exit = function () {}; v2.Update = function (time) { this.SetNextRandomState(this.plane); }; v2.SetNextRandomState = function (p) { var v2; v2 = Math.random(); if (v2 < 0.5) { this.fsm.ChangeState(new AI.States.FlyingSubStates.Seek(this.fsm)); return undefined; } else { this.fsm.ChangeState(new AI.States.FlyingSubStates.Wander(this.fsm)); return undefined; } }; v2.getStateName = function () { return this.stateName; }; v2.stateName = 'Init'; ASSetPropFlags(AI.States.FlyingSubStates.Init.prototype, null, 1); } #endinitclip } movieClip 1793 __Packages.AI.States.FlyingSubStates.Seek { #initclip if (!_global.AI) { _global.AI = new Object(); } if (!_global.AI.States) { _global.AI.States = new Object(); } if (!_global.AI.States.FlyingSubStates) { _global.AI.States.FlyingSubStates = new Object(); } if (!_global.AI.States.FlyingSubStates.Seek) { var v1 = function (fsm) { this.fsm = fsm; this.dataModel = fsm.getDataModel(); this.plane = AirPlane(this.dataModel); this.planeAIAgent = this.plane.getAIAgent(); }; AI.States.FlyingSubStates.Seek = v1; var v2 = v1.prototype; _global.AI.States.FlyingSubStates.Seek implements _global.AI.IState; v2.Enter = function () {}; v2.Exit = function () {}; v2.Update = function (time) { var v11; v11 = Math.random(); var v7; v7 = World.getInstance(); var v10; v10 = v7.getBonusObj(); var v5; v5 = this.getSeekTargetBonus(v10); var v12; v12 = v7.getPlanesArray(); var v2; v2 = this.getSeekTargetPlane(v12); var v13; v13 = v7.getObstaclesArray(); var v3; v3 = this.getSeekTargetObstacle(v13); if (v2 != undefined && v3 != undefined) { var v6; var v9; var v8; var v4; v4 = new Vector2D(0, 0); v4.setXY(v2.__x, v2.__y); v6 = v4.Length(); v4.setXY(v3.__x, v3.__y); v9 = v4.Length(); if (v5 != undefined && this.planeAIAgent.getAIProfile() != enums.AIProfiles.DUMB && this.planeAIAgent.getAIProfile() != enums.AIProfiles.WEAK) { v4.setXY(v5.__x, v5.__y); v8 = v4.Length(); if (v8 < 200) { this.fsm.ChangeState(new AI.States.FlyingSubStates.Follow(this.fsm, v5)); return undefined; } if (v8 < 500) { v11 = Math.random(); if (v11 < 0.5) { this.fsm.ChangeState(new AI.States.FlyingSubStates.Follow(this.fsm, v5)); return undefined; } } } if (v6 < 500) { this.fsm.ChangeState(new AI.States.FlyingSubStates.Follow(this.fsm, v2)); return undefined; } if (v9 < v6) { if (2 * v9 < v6) { this.fsm.ChangeState(new AI.States.FlyingSubStates.Follow(this.fsm, v3)); return undefined; } else { this.fsm.ChangeState(new AI.States.FlyingSubStates.Follow(this.fsm, v2)); return undefined; } } } if (v2 != undefined && v3 == undefined) { this.fsm.ChangeState(new AI.States.FlyingSubStates.Follow(this.fsm, v2)); return undefined; } if (v3 != undefined && v2 == undefined) { this.fsm.ChangeState(new AI.States.FlyingSubStates.Follow(this.fsm, v3)); return undefined; } if (v2 == undefined && v3 == undefined) { this.fsm.ChangeState(new AI.States.FlyingSubStates.Wander(this.fsm)); return undefined; } this.fsm.ChangeState(new AI.States.FlyingSubStates.Wander(this.fsm)); }; v2.getSeekTargetPlane = function (p) { var v2; v2 = this.getEnemyPlanesArray(p); if (v2 == undefined) { return undefined; } else { var v3; v3 = v2.length; if (v3 == 1) { return v2[0][1]; } if (v3 > 1) { var v4; v4 = Math.random(); if (v4 < 0.9) { return v2[0][1]; } else { return v2[1][1]; } } } }; v2.getEnemyPlanesArray = function (planesArray) { var v7; v7 = new Array(); var v5; v5 = new Vector2D(0, 0); var v10; v10 = World.getInstance(); planesArray = v10.getPlanesArray(); var v4; var v9; v9 = planesArray.length; v4 = 0; while (v4 < v9) { var v2; v2 = planesArray[v4]; if (v2.getPlaneIdx() == this.plane.getPlaneIdx()) { } else { var v3; v3 = v2.getCurrentState(); if (!(v3 == enums.PlaneStates.FLYING || v3 == enums.PlaneStates.BREAKDOWN || v3 == enums.PlaneStates.ROLLING)) { } else { if (v2.getGroupId() != this.plane.getGroupId() || v2.getGroupId() == GrpMan.C_DEFAULT_GROUP_ID) { v5.setXY(v2.__x, v2.__y); v5.SubXY(this.plane.__x, this.plane.__y); var v6; v6 = v5.Length(); v7.push([v6, v2]); } } } ++v4; } v7.sortOn('0', Array.NUMERIC | Array.ASCENDING); if (v7.length == 0) { return undefined; } else { return v7; } }; v2.getSeekTargetObstacle = function (obstaclesArray) { var v2; v2 = this.getEnemyObstaclesArray(obstaclesArray); if (v2 == undefined) { return undefined; } else { var v3; v3 = v2.length; if (v3 == 1) { return v2[0][1]; } if (v3 > 1) { var v4; v4 = Math.random(); if (v4 < 0.9) { return v2[0][1]; } else { return v2[1][1]; } } } }; v2.getEnemyObstaclesArray = function (obstaclesArray) { var v8; v8 = new Array(); var v4; v4 = new Vector2D(0, 0); var v3; var v9; v9 = obstaclesArray.length; var v6; v3 = 0; while (v3 < v9) { v6 = obstaclesArray[v3].getObstacleType(); var v2; v2 = obstaclesArray[v3]; if ((v2.getGroupId() != this.plane.getGroupId() || v2.getGroupId() == GrpMan.C_DEFAULT_GROUP_ID) && enums.AIProfiles.isObstacleInAttackList(v6)) { v4.setXY(v2.__x, v2.__y); v4.SubXY(this.plane.__x, this.plane.__y); var v5; v5 = v4.Length(); v8.push([v5, v2]); } ++v3; } v8.sortOn('0', Array.NUMERIC | Array.ASCENDING); if (v8.length == 0) { return undefined; } else { return v8; } }; v2.getSeekTargetBonus = function (b) { var v6; v6 = b.GetBonusCurrentState(); if (v6 == enums.BonusStates.PARACHUTING) { return b; var v5; v5 = b.GetBonusType(); var v3; v3 = this.planeAIAgent.getAIProfile(); if (v3 <= enums.AIProfiles.WEAK) { return b; } var v8; var v4; v4 = new Vector2D(0, 0); v4.setXY(b.__x, b.__y); v8 = v4.Length(); if (v8 > 500) { return undefined; } if (v3 == enums.AIProfiles.NORMAL) { if (v5 > enums.BonusTypes.NUM_OF_GOOD_BONUSES) { var v7; v7 = Math.random(); if (v7 < 0.5) { return b; } else { return undefined; } } else { return b; } } if (v3 == enums.AIProfiles.CLEVER) { if (v5 > enums.BonusTypes.NUM_OF_GOOD_BONUSES) { return undefined; } else { return b; } } return undefined; } return undefined; }; v2.getStateName = function () { return this.stateName; }; v2.stateName = 'Seek'; v1.C_MIN_RAISE_DEGREE = 10; v1.C_MIN_RAISE_DEGREE_DIFF = 20; v1.C_MODERATE_ALTITUDE = 120; v1.C_SAFE_ALTITUDE_GAIN = 0.25; ASSetPropFlags(AI.States.FlyingSubStates.Seek.prototype, null, 1); } #endinitclip } movieClip 1794 __Packages.AI.States.FlyingSubStates.Follow { #initclip if (!_global.AI) { _global.AI = new Object(); } if (!_global.AI.States) { _global.AI.States = new Object(); } if (!_global.AI.States.FlyingSubStates) { _global.AI.States.FlyingSubStates = new Object(); } if (!_global.AI.States.FlyingSubStates.Follow) { var v1 = function (fsm, enemy) { this.fsm = fsm; this.dataModel = fsm.getDataModel(); this.plane = AirPlane(this.dataModel); this.planeAIAgent = this.plane.getAIAgent(); this.enemy = enemy; this.retargetTimer = new Timer(this.C_RETARGET_TIME); this.primWeaponsAgent = new AI.Agent(Object(this.plane)); this.primWeaponsFsm = this.primWeaponsAgent.getStateMachine(); this.secWeaponsAgent = new AI.Agent(Object(this.plane)); this.secWeaponsFsm = this.secWeaponsAgent.getStateMachine(); }; AI.States.FlyingSubStates.Follow = v1; var v2 = v1.prototype; _global.AI.States.FlyingSubStates.Follow implements _global.AI.IState; v2.Enter = function () { var v2; v2 = this.getWpnList(this.plane, enums.ItemTypes.CLASS_NO_PRIMARY_WEAPON); this.primWeaponsFsm.setCurrentState(new AI.States.FlyingSubStates.WeaponStates.Aim(this.primWeaponsFsm, this.enemy, v2)); v2 = this.getWpnList(this.plane, enums.ItemTypes.CLASS_NO_SECONDARY_WEAPON); this.secWeaponsFsm.setCurrentState(new AI.States.FlyingSubStates.WeaponStates.Aim(this.secWeaponsFsm, this.enemy, v2)); this.altitude = this.plane.getAltitude(); this.oldAltitude = this.altitude; this.velocity = this.plane.getVelocity(); this.oldVelocity = this.velocity; this.fTarget = new Vector2D(0, 0); this.retargetTimer.StartTimer(); this.avgDistCumulative = 0; this.avgDistDenominator = 0; this.InitObstaclesAvoidArray(); }; v2.Exit = function () { this.planeAIAgent.setFirePrimPressed(false); this.planeAIAgent.setFireSecPressed(false); }; v2.Update = function (time) { this.primWeaponsFsm.Update(); this.secWeaponsFsm.Update(); this.oldAltitude = this.altitude; this.altitude = this.plane.getAltitude(); this.oldVelocity = this.velocity; this.velocity = this.plane.getVelocity(); this.SetForceToTarget(this.enemy); this.planeAIAgent.FollowForce(this.fTarget, this.plane); if (this.isAltitudeCritical()) { this.fsm.ChangeState(new AI.States.FlyingSubStates.Raise(this.fsm)); return undefined; } if (this.isAltitudeLow() && this.isAltitudeLossCritical()) { this.fsm.ChangeState(new AI.States.FlyingSubStates.Raise(this.fsm)); return undefined; } if (this.retargetTimer.TimeIntervalElapsed()) { this.fsm.ChangeState(new AI.States.FlyingSubStates.Seek(this.fsm)); return undefined; } var v2; v2 = this.getTooCloseObstacle(this.plane, this.avoidObjsArray); if (v2 != undefined) { this.fsm.ChangeState(new AI.States.FlyingSubStates.AvoidCollision(this.fsm, v2)); return undefined; } if (this.isVelocityLossCritical(this.plane) && this.isVelocityLow(this.plane) || this.isVelocityLow(this.plane) && this.isRaisingSteeply(this.plane) && this.isAltitudeLow()) { this.fsm.ChangeState(new AI.States.FlyingSubStates.AvoidStall(this.fsm)); return undefined; } if (this.avgDistance < AI.States.FlyingSubStates.Follow.C_LOW_AVG_DISTANCE && AI.States.FlyingSubStates.Follow.C_AVG_COMPUTE_FRM_TIME > AI.States.FlyingSubStates.Follow.C_AVG_COMPUTE_FRM_TIME) { this.fsm.ChangeState(new AI.States.FlyingSubStates.Wander(this.fsm)); return undefined; } if (this.isEnemyDestroyed(this.enemy)) { var v3; v3 = Math.random(); if (v3 < 0.5) { this.fsm.ChangeState(new AI.States.FlyingSubStates.Seek(this.fsm)); return undefined; } else { this.fsm.ChangeState(new AI.States.FlyingSubStates.Wander(this.fsm)); } } }; v2.isAltitudeCritical = function () { if (this.altitude < AI.States.FlyingSubStates.Follow.C_CRITICAL_ALTITUDE) { return true; } else { return false; } }; v2.isAltitudeLow = function () { if (this.altitude < AI.States.FlyingSubStates.Follow.C_LOW_ALTITUDE) { return true; } else { return false; } }; v2.isAltitudeLossCritical = function (p) { if (this.altitude - this.oldAltitude < AI.States.FlyingSubStates.Follow.C_CRITICAL_ALTITUDE_LOSS) { return true; } else { return false; } }; v2.isVelocityLossCritical = function (p) { if (this.velocity - this.oldVelocity < AI.States.FlyingSubStates.Follow.C_CRITICAL_VELOCITY_LOSS) { return true; } else { return false; } }; v2.isVelocityLow = function (p) { var v2; v2 = this.plane.getCMinVelocity() + 0.3 * (this.plane.getCNormalVelocity() + this.plane.getCMinVelocity()); if (this.velocity < v2) { return true; } else { return false; } }; v2.isRaisingSteeply = function (p) { if (p.__direction.__y < AI.States.FlyingSubStates.Follow.C_STEEPLY_COS) { return true; } else { return false; } }; v2.isEnemyDestroyed = function (enemy) { var v3; v3 = enemy.getObstacleType(); var v2; if (v3 == enums.ObstacleTypes.BONUS) { enemy = Bonus(enemy); if (enemy.GetBonusCurrentState() == enums.BonusStates.PARACHUTING) { return false; } else { return true; } } if (v3 == enums.ObstacleTypes.AIRPLANE) { enemy = AirPlane(enemy); v2 = enemy.getCurrentState(); if (!(v2 == enums.PlaneStates.FLYING || v2 == enums.PlaneStates.BREAKDOWN || v2 == enums.PlaneStates.ROLLING)) { return true; } else { return false; } } else { v2 = enemy.getCurrentState(); if (v2 != entities.Obstacles.Obstacle.C_STATE_FLYING) { return true; } else { return false; } } }; v2.SetForceToTarget = function (enemy) { var v3; v3 = enemy.getObstacleType(); if (v3 == enums.ObstacleTypes.BONUS) { this.fTarget.setXY(enemy.__x - this.plane.__x, enemy.__y + 70 - this.plane.__y); } else { this.fTarget.setXY(enemy.__x - this.plane.__x, enemy.__y - this.plane.__y); } this.avgDistance = this.getAvgDistance(this.fTarget); UtilShapes.DrawLine(World.dmc, this.plane.__x, this.plane.__y, this.fTarget, 10027161); this.fTarget.Normalize(); UtilShapes.DrawVector(World.dmc, this.plane.__x, this.plane.__y, this.fTarget, 100, 16711935); }; v2.getStateName = function () { return this.stateName; }; v2.getAvgDistance = function (planeToTargetVec) { var v2; v2 = planeToTargetVec.Length(); this.avgDistCumulative += v2; ++this.avgDistDenominator; return this.avgDistCumulative / this.avgDistDenominator; }; v2.InitObstaclesAvoidArray = function () { this.avoidObjsArray = new Array(); var v7; v7 = World.getInstance(); var v4; v4 = v7.getObstaclesArray(); var v2; var v6; v6 = v4.length; var v5; var v3; v2 = 0; while (v2 < v6) { v3 = v4[v2]; if (v3.getCurrentState() == entities.Obstacles.Obstacle.C_STATE_END) { } else { v5 = v3.getObstacleType(); if (enums.AIProfiles.isObstacleInAvoidList(v5)) { this.avoidObjsArray.push(v4[v2]); } } ++v2; } this.avoidObjsArrayCount = this.avoidObjsArray.length; this.avoidObjsDistances = new Array(); this.UpdateAvoidObjDistances(this.plane, v4); }; v2.UpdateAvoidObjDistances = function (p, obstacleArr) { var v3; v3 = 0; while (v3 < this.avoidObjsArrayCount) { var v2; v2 = this.getObstacleDimensions(this.avoidObjsDistances[v3]); v2.xMin -= AI.States.FlyingSubStates.Follow.C_DANGER_AREA_SIZE; v2.yMin -= AI.States.FlyingSubStates.Follow.C_DANGER_AREA_SIZE; v2.xMax += AI.States.FlyingSubStates.Follow.C_DANGER_AREA_SIZE; v2.yMax += AI.States.FlyingSubStates.Follow.C_DANGER_AREA_SIZE; if (this.isInDangerArea(p, v2)) { this.avoidObjsDistances[v3] = 0; } else { var v7; var v5; var v4; v5 = p.__x - obstacleArr[v3].__x; v4 = p.__y - obstacleArr[v3].__y; v7 = Math.sqrt(v5 * v5 + v4 * v4); this.avoidObjsDistances[v3] = v7; } ++v3; } }; v2.getTooCloseObstacle = function (p, obstArray) { this.UpdateAvoidObjDistances(p, obstArray); var v2; v2 = 0; while (v2 < this.avoidObjsArrayCount) { if (this.avoidObjsDistances[v2] < AI.States.FlyingSubStates.Follow.C_CRITICAL_AVOID_DISTANCE) { UtilShapes.DrawLine(World.dmc, this.plane.__x, this.plane.__y, new Vector2D(this.avoidObjsArray[v2].__x, this.avoidObjsArray[v2].__y), 255); return this.avoidObjsArray[v2]; } ++v2; } return undefined; }; v2.getObstacleDimensions = function (o) { var v4; v4 = o.getClip(); var v2 = v4.getBounds(_root); for (var v3 in v2) { } return v2; }; v2.isInDangerArea = function (p, bounds) { var v3; var v2; v3 = p.__x; v2 = p.__y; if (bounds.xMin < v3 && v3 < bounds.xMax && bounds.yMin < v2 && v2 < bounds.yMax) { return true; } else { return false; } }; v2.getWpnList = function (p, wpnClassNo) { var v5; v5 = new Array(); var v6; v6 = p.getWeaponsArray(); var v1; var v7; v7 = v6.length; v1 = 0; while (v1 < v7) { var v2; v2 = v6[v1]; var v4; v4 = v2.getItemId(); var v3; v3 = Number(enums.ItemTypes.getItemInfo(v4, enums.ItemTypes.CLASS_NO)); if (v3 == wpnClassNo) { v5.push(v2); } ++v1; } return v5; }; v2.getPrimWpnAgent = function () { return this.primWeaponsAgent; }; v2.getSecWpnAgent = function () { return this.secWeaponsAgent; }; v2.stateName = 'Follow'; v1.C_CRITICAL_ALTITUDE = 100; v1.C_LOW_ALTITUDE = 150; v1.C_CRITICAL_ALTITUDE_LOSS = -3; v1.C_CRITICAL_VELOCITY_LOSS = -0.15; v1.C_STEEPLY_COS = 0.85; v2.C_RETARGET_TIME = 4000; v1.C_CRITICAL_AVOID_DISTANCE = 150; v1.C_DANGER_AREA_SIZE = 100; v1.C_LOW_AVG_DISTANCE = 120; v1.C_AVG_COMPUTE_FRM_TIME = 140; ASSetPropFlags(AI.States.FlyingSubStates.Follow.prototype, null, 1); } #endinitclip } movieClip 1795 __Packages.AI.States.FlyingSubStates.WeaponStates.Aim { #initclip if (!_global.AI) { _global.AI = new Object(); } if (!_global.AI.States) { _global.AI.States = new Object(); } if (!_global.AI.States.FlyingSubStates) { _global.AI.States.FlyingSubStates = new Object(); } if (!_global.AI.States.FlyingSubStates.WeaponStates) { _global.AI.States.FlyingSubStates.WeaponStates = new Object(); } if (!_global.AI.States.FlyingSubStates.WeaponStates.Aim) { var v1 = function (fsm, enemy, wpnList) { this.fsm = fsm; this.dataModel = fsm.getDataModel(); this.plane = AirPlane(this.dataModel); this.enemy = enemy; this.weaponList = wpnList; this.weaponListCnt = wpnList.length; this.planeAIAgent = this.plane.getAIAgent(); this.willToFire = enums.AIProfiles.getAIProfileInfo(this.planeAIAgent.getAIProfile(), enums.AIProfiles.C_INFO_WILL_TO_FIRE); this.AIDeviationCos = enums.AIProfiles.getAIProfileInfo(this.planeAIAgent.getAIProfile(), enums.AIProfiles.C_INFO_DEVIATION_COS); this.InitWeaponHandlersArray(this.weaponList); }; AI.States.FlyingSubStates.WeaponStates.Aim = v1; var v2 = v1.prototype; _global.AI.States.FlyingSubStates.WeaponStates.Aim implements _global.AI.IState; v2.Enter = function () {}; v2.Exit = function () {}; v2.Update = function (time) { this.HandleAllWeapons(); }; v2.getStateName = function () { return this.stateName; }; v2.HandleMachineGun = function () { var v2; v2 = this.isEnemyInLineOfFire(this.plane, this.enemy, enums.ItemTypes.MACHINE_GUN); if (v2) { this.FirePrimSec(enums.ItemTypes.MACHINE_GUN); } }; v2.HandleTwinMachineGun = function () { var v2; v2 = this.isEnemyInLineOfFire(this.plane, this.enemy, enums.ItemTypes.TWIN_MACHINE_GUN); if (v2) { this.FirePrimSec(enums.ItemTypes.TWIN_MACHINE_GUN); } }; v2.HandleTailGun = function () { var v2; v2 = this.isEnemyInLineOfFire(this.plane, this.enemy, enums.ItemTypes.TAIL_GUN); if (v2) { this.FirePrimSec(enums.ItemTypes.TAIL_GUN); } }; v2.HandleBurstGun = function () { var v2; v2 = this.isEnemyInLineOfFire(this.plane, this.enemy, enums.ItemTypes.BURST_GUN); if (v2) { this.FirePrimSec(enums.ItemTypes.BURST_GUN); } }; v2.HandleAcousticRifle = function () { var v2; v2 = this.isEnemyInLineOfFire(this.plane, this.enemy, enums.ItemTypes.ACOUSTIC_RIFLE); if (v2) { this.FirePrimSec(enums.ItemTypes.ACOUSTIC_RIFLE); } }; v2.HandleMaliciousParachute = function () { var v2; v2 = this.isEnemyInLineOfFire(this.plane, this.enemy, enums.ItemTypes.MALICIOUS_PARACHUTE); if (v2) { this.FirePrimSec(enums.ItemTypes.MALICIOUS_PARACHUTE); } }; v2.HandleImpactBombs = function () { var v2; v2 = this.isEnemyInLineOfFire(this.plane, this.enemy, enums.ItemTypes.IMPACT_BOMBS); if (v2) { this.FirePrimSec(enums.ItemTypes.IMPACT_BOMBS); } }; v2.HandleHomingMissiles = function () { var v2; v2 = this.isEnemyInLineOfFire(this.plane, this.enemy, enums.ItemTypes.HOMING_MISSILES); if (v2) { this.FirePrimSec(enums.ItemTypes.HOMING_MISSILES); } }; v2.HandleEmpDisruptor = function () { var v2; v2 = this.isEnemyInLineOfFire(this.plane, this.enemy, enums.ItemTypes.EMP_DISRUPTOR); if (v2) { this.FirePrimSec(enums.ItemTypes.EMP_DISRUPTOR); } }; v2.HandleNuke = function () { var v2; v2 = this.isEnemyInLineOfFire(this.plane, this.enemy, enums.ItemTypes.NUKE); if (v2) { this.FirePrimSec(enums.ItemTypes.NUKE); } }; v2.isEnemyInLineOfFire = function (p, enemy, itemId) { var v2; v2 = new Vector2D(p.__x, p.__y); var v5; v5 = new Vector2D(0, 0); var v7; v7 = new Vector2D(0, 0); var v4; v4 = enums.AIProfiles.getAIWpnSetupInfo(itemId, enums.AIProfiles.C_WPN_INFO_MAX_RANGE); if (Math.abs(v2.__x - enemy.__x) > v4 || Math.abs(v2.__y - enemy.__y) > v4) { return false; } v5.setXY(enemy.__x, enemy.__y); var v6; v6 = v2.Distance(v5); if (v6 > v4) { return false; } v7.setVec(v5); if (this.isInLineOfWeaponSight(v2, v7, itemId)) { if (enemy.getObstacleType() == enums.ObstacleTypes.BONUS) { if (this.planeAIAgent.getAIProfile() <= enums.AIProfiles.WEAK) { return false; } else { if (v6 <= 450) { return false; } else { return true; } } return false; } return true; } return false; }; v2.isInLineOfWeaponSight = function (myPos, enemyPos, itemId) { var v2; v2 = enums.AIProfiles.getAIWpnSetupInfo(itemId, enums.AIProfiles.C_WPN_INFO_DIRECTION_ANGLE); if (v2 == 360) { return true; } var v10; v10 = enums.AIProfiles.getAIWpnSetupInfo(itemId, enums.AIProfiles.C_WPN_INFO_DISPERSION_ANGLE_COS); var v11; v11 = enums.AIProfiles.getAIWpnSetupInfo(itemId, enums.AIProfiles.C_WPN_INFO_IS_ABSOLUTE_ANGLE); var v5; v5 = new Vector2D(1, 0); var v3; if (v11) { v3 = v2; v5.Rotate(v3); } else { var v6; var v7; v7 = (this.plane.getClip())._yscale; if (v7 > 0) { v6 = 1; } else { v6 = -1; } if (this.plane.getFaceRightOrientation() == true) { v3 = this.plane.getClipRotation() + 180 + v6 * (180 + v2); } else { v3 = this.plane.getClipRotation() - v6 * (180 + v2); } v5.Rotate(v3); } var v4; v4 = new Vector2D(0, 0); v4.setVec(enemyPos); v4.Sub(myPos); v4.Normalize(); var v8; v8 = v4.Dot(v5); var v12; v12 = this.plane.getPlaneIdx(); if (v8 >= v10 - this.AIDeviationCos) { return true; } else { return false; } }; v2.FirePrimSec = function (itemId) { if (this.fsm.getCurrentState() instanceof AI.States.FlyingSubStates.WeaponStates.Fire) { return undefined; } if (!this.isWantToFire()) { return undefined; } var v2; v2 = Number(enums.ItemTypes.getItemInfo(itemId, enums.ItemTypes.CLASS_NO)); if (v2 == enums.ItemTypes.CLASS_NO_PRIMARY_WEAPON) { this.fsm.ChangeState(new AI.States.FlyingSubStates.WeaponStates.Fire(this.fsm, this.enemy, this.weaponList, v2)); } if (v2 == enums.ItemTypes.CLASS_NO_SECONDARY_WEAPON) { this.fsm.ChangeState(new AI.States.FlyingSubStates.WeaponStates.Fire(this.fsm, this.enemy, this.weaponList, v2)); } }; v2.isWantToFire = function () { var v2; v2 = Math.random(); if (v2 < this.willToFire) { return true; } else { return false; } }; v2.InitWeaponHandlersArray = function (wpnList) { this.weaponFncList = new Array(); var v4; v4 = wpnList; var v2; var v5; v5 = v4.length; var v3; v2 = 0; while (v2 < v5) { v3 = v4[v2].getItemId(); switch (v3) { case enums.ItemTypes.MACHINE_GUN: this.weaponFncList.push(this.HandleMachineGun); break; case enums.ItemTypes.TWIN_MACHINE_GUN: this.weaponFncList.push(this.HandleTwinMachineGun); break; case enums.ItemTypes.TAIL_GUN: this.weaponFncList.push(this.HandleTailGun); break; case enums.ItemTypes.BURST_GUN: this.weaponFncList.push(this.HandleBurstGun); break; case enums.ItemTypes.ACOUSTIC_RIFLE: this.weaponFncList.push(this.HandleAcousticRifle); break; case enums.ItemTypes.MALICIOUS_PARACHUTE: this.weaponFncList.push(this.HandleMaliciousParachute); break; case enums.ItemTypes.IMPACT_BOMBS: this.weaponFncList.push(this.HandleImpactBombs); break; case enums.ItemTypes.HOMING_MISSILES: this.weaponFncList.push(this.HandleHomingMissiles); break; case enums.ItemTypes.EMP_DISRUPTOR: this.weaponFncList.push(this.HandleEmpDisruptor); break; case enums.ItemTypes.NUKE: this.weaponFncList.push(this.HandleNuke); } ++v2; } this.weaponFncListCount = this.weaponFncList.length; }; v2.HandleAllWeapons = function () { var v2; v2 = 0; while (v2 < this.weaponFncListCount) { this.weaponFncList[v2].call(this); ++v2; } }; v2.stateName = 'Aim'; ASSetPropFlags(AI.States.FlyingSubStates.WeaponStates.Aim.prototype, null, 1); } #endinitclip } movieClip 1796 __Packages.AI.States.FlyingSubStates.WeaponStates.Fire { #initclip if (!_global.AI) { _global.AI = new Object(); } if (!_global.AI.States) { _global.AI.States = new Object(); } if (!_global.AI.States.FlyingSubStates) { _global.AI.States.FlyingSubStates = new Object(); } if (!_global.AI.States.FlyingSubStates.WeaponStates) { _global.AI.States.FlyingSubStates.WeaponStates = new Object(); } if (!_global.AI.States.FlyingSubStates.WeaponStates.Fire) { var v1 = function (fsm, enemy, wpnList, wpnClassNo) { this.fsm = fsm; this.dataModel = fsm.getDataModel(); this.plane = AirPlane(this.dataModel); this.enemy = enemy; this.weaponList = wpnList; this.wpnClassNo = wpnClassNo; this.weaponListCnt = wpnList.length; this.planeAIAgent = this.plane.getAIAgent(); }; AI.States.FlyingSubStates.WeaponStates.Fire = v1; var v2 = v1.prototype; _global.AI.States.FlyingSubStates.WeaponStates.Fire implements _global.AI.IState; v2.Enter = function () { this.FireWeapons(this.plane, this.wpnClassNo); }; v2.Exit = function () { this.StopWeapons(this.plane, this.wpnClassNo); }; v2.Update = function (time) { ++this.wpnFireTimeFrm; if (this.wpnFireTimeFrm > this.C_MAX_FIRING_TIME_FRM) { this.fsm.ChangeState(new AI.States.FlyingSubStates.WeaponStates.Aim(this.fsm, this.enemy, this.weaponList)); } }; v2.getStateName = function () { return this.stateName; }; v2.FireWeapons = function (p, wpnClassNo) { if (wpnClassNo == enums.ItemTypes.CLASS_NO_PRIMARY_WEAPON) { this.planeAIAgent.setFirePrimPressed(true); } if (wpnClassNo == enums.ItemTypes.CLASS_NO_SECONDARY_WEAPON) { this.planeAIAgent.setFireSecPressed(true); } }; v2.StopWeapons = function (p, wpnClassNo) { if (wpnClassNo == enums.ItemTypes.CLASS_NO_PRIMARY_WEAPON) { this.planeAIAgent.setFirePrimPressed(false); } if (wpnClassNo == enums.ItemTypes.CLASS_NO_SECONDARY_WEAPON) { this.planeAIAgent.setFireSecPressed(false); } }; v2.stateName = 'Fire'; v2.wpnFireTimeFrm = 0; v2.C_MAX_FIRING_TIME_FRM = 35; ASSetPropFlags(AI.States.FlyingSubStates.WeaponStates.Fire.prototype, null, 1); } #endinitclip } movieClip 1797 __Packages.AI.States.FlyingSubStates.Raise { #initclip if (!_global.AI) { _global.AI = new Object(); } if (!_global.AI.States) { _global.AI.States = new Object(); } if (!_global.AI.States.FlyingSubStates) { _global.AI.States.FlyingSubStates = new Object(); } if (!_global.AI.States.FlyingSubStates.Raise) { var v1 = function (fsm) { this.fsm = fsm; this.dataModel = fsm.getDataModel(); this.plane = AirPlane(this.dataModel); this.planeAIAgent = this.plane.getAIAgent(); }; AI.States.FlyingSubStates.Raise = v1; var v2 = v1.prototype; _global.AI.States.FlyingSubStates.Raise implements _global.AI.IState; v2.Enter = function () { var v2; v2 = this.plane.getPreviousState(); this.raiseDir = AI.States.Rolling.GenRandomRaiseVector(this.plane, AI.States.FlyingSubStates.Raise.C_MIN_RAISE_DEGREE, AI.States.FlyingSubStates.Raise.C_MIN_RAISE_DEGREE_DIFF); this.altitude = this.plane.getAltitude(); this.oldAltitude = this.altitude; this.InitObstaclesAvoidArray(); }; v2.Exit = function () {}; v2.Update = function (time) { this.oldAltitude = this.altitude; this.altitude = this.plane.getAltitude(); if (this.isAltitudeGainSafe() && this.isAltitudeLow()) { this.fsm.ChangeState(new AI.States.FlyingSubStates.Seek(this.fsm)); return undefined; } if (this.isAltitudeModerate()) { this.SetNextRandomState(this.plane); return undefined; } this.planeAIAgent.FollowForce(this.raiseDir, this.plane); UtilShapes.DrawVector(World.dmc, this.plane.__x, this.plane.__y, this.raiseDir, 100, 65280); var v2; v2 = this.getTooCloseObstacle(this.plane, this.avoidObjsArray); if (v2 != undefined) { this.fsm.ChangeState(new AI.States.FlyingSubStates.AvoidCollision(this.fsm, v2)); return undefined; } }; v2.isAltitudeGainSafe = function () { if (this.altitude - this.oldAltitude > AI.States.FlyingSubStates.Raise.C_SAFE_ALTITUDE_GAIN) { return true; } else { return false; } }; v2.isAltitudeModerate = function () { if (this.altitude > AI.States.FlyingSubStates.Raise.C_MODERATE_ALTITUDE) { return true; } else { return false; } }; v2.isAltitudeLow = function () { if (this.altitude > AI.States.FlyingSubStates.Raise.C_LOW_ALTITUDE) { return true; } else { return false; } }; v2.SetNextRandomState = function (p) { var v2; v2 = Math.random(); if (v2 < 0.7) { this.fsm.ChangeState(new AI.States.FlyingSubStates.Seek(this.fsm)); } else { this.fsm.ChangeState(new AI.States.FlyingSubStates.Wander(this.fsm)); } }; v2.getStateName = function () { return this.stateName; }; v2.InitObstaclesAvoidArray = function () { this.avoidObjsArray = new Array(); var v7; v7 = World.getInstance(); var v4; v4 = v7.getObstaclesArray(); var v2; var v6; v6 = v4.length; var v5; var v3; v2 = 0; while (v2 < v6) { v3 = v4[v2]; if (v3.getCurrentState() == entities.Obstacles.Obstacle.C_STATE_END) { } else { v5 = v3.getObstacleType(); if (enums.AIProfiles.isObstacleInAvoidList(v5)) { this.avoidObjsArray.push(v4[v2]); } } ++v2; } this.avoidObjsArrayCount = this.avoidObjsArray.length; this.avoidObjsDistances = new Array(); this.UpdateAvoidObjDistances(this.plane, v4); }; v2.UpdateAvoidObjDistances = function (p, obstacleArr) { var v3; v3 = 0; while (v3 < this.avoidObjsArrayCount) { var v2; v2 = this.getObstacleDimensions(this.avoidObjsDistances[v3]); v2.xMin -= AI.States.FlyingSubStates.Raise.C_DANGER_AREA_SIZE; v2.yMin -= AI.States.FlyingSubStates.Raise.C_DANGER_AREA_SIZE; v2.xMax += AI.States.FlyingSubStates.Raise.C_DANGER_AREA_SIZE; v2.yMax += AI.States.FlyingSubStates.Raise.C_DANGER_AREA_SIZE; if (this.isInDangerArea(p, v2)) { this.avoidObjsDistances[v3] = 0; } else { var v7; var v5; var v4; v5 = p.__x - obstacleArr[v3].__x; v4 = p.__y - obstacleArr[v3].__y; v7 = Math.sqrt(v5 * v5 + v4 * v4); this.avoidObjsDistances[v3] = v7; } ++v3; } }; v2.getTooCloseObstacle = function (p, obstArray) { this.UpdateAvoidObjDistances(p, obstArray); var v2; v2 = 0; while (v2 < this.avoidObjsArrayCount) { if (this.avoidObjsDistances[v2] < AI.States.FlyingSubStates.Raise.C_CRITICAL_AVOID_DISTANCE) { UtilShapes.DrawLine(World.dmc, this.plane.__x, this.plane.__y, new Vector2D(this.avoidObjsArray[v2].__x, this.avoidObjsArray[v2].__y), 255); return this.avoidObjsArray[v2]; } ++v2; } return undefined; }; v2.getObstacleDimensions = function (o) { var v4; v4 = o.getClip(); var v2 = v4.getBounds(_root); for (var v3 in v2) { } return v2; }; v2.isInDangerArea = function (p, bounds) { var v3; var v2; v3 = p.__x; v2 = p.__y; if (bounds.xMin < v3 && v3 < bounds.xMax && bounds.yMin < v2 && v2 < bounds.yMax) { return true; } else { return false; } }; v2.stateName = 'Raise'; v1.C_MIN_RAISE_DEGREE = 20; v1.C_MIN_RAISE_DEGREE_DIFF = 25; v1.C_MODERATE_ALTITUDE = 150; v1.C_LOW_ALTITUDE = 80; v1.C_SAFE_ALTITUDE_GAIN = 0.3; v1.C_CRITICAL_AVOID_DISTANCE = 120; v1.C_DANGER_AREA_SIZE = 100; ASSetPropFlags(AI.States.FlyingSubStates.Raise.prototype, null, 1); } #endinitclip } movieClip 1798 __Packages.UtilShapes { #initclip if (!_global.UtilShapes) { var v1 = function () {}; _global.UtilShapes = v1; var v2 = v1.prototype; v1.Clear = function (DrawMC) { DrawMC.clear(); }; v1.DrawCross = function (DrawMC, X, Y, color) { var v1 = 5; DrawMC.lineStyle(1, color, 100); DrawMC.moveTo(X - v1, Y); DrawMC.lineTo(X + 2 * v1, Y); DrawMC.moveTo(X, Y - v1); DrawMC.lineTo(X, Y + 2 * v1); }; v1.DrawCircle = function (DrawMC, x, y, r, color) { DrawMC.lineStyle(1, color, 100); var v4; v4 = DrawMC; v4.moveTo(x + r, y); v4.curveTo(r + x, 0.414213562373095 * r + y, Math.SQRT1_2 * r + x, Math.SQRT1_2 * r + y); v4.curveTo(0.414213562373095 * r + x, r + y, x, r + y); v4.curveTo(-0.414213562373095 * r + x, r + y, -Math.SQRT1_2 * r + x, Math.SQRT1_2 * r + y); v4.curveTo(-r + x, 0.414213562373095 * r + y, -r + x, y); v4.curveTo(-r + x, -0.414213562373095 * r + y, -Math.SQRT1_2 * r + x, -Math.SQRT1_2 * r + y); v4.curveTo(-0.414213562373095 * r + x, -r + y, x, -r + y); v4.curveTo(0.414213562373095 * r + x, -r + y, Math.SQRT1_2 * r + x, -Math.SQRT1_2 * r + y); v4.curveTo(r + x, -0.414213562373095 * r + y, r + x, y); }; v1.DrawVector = function (DrawMC, oX, oY, vec, weight, color) { var v1 = 1; DrawMC.lineStyle(1, color, 100); DrawMC.moveTo(oX, oY); DrawMC.lineTo(oX + weight * v1 * vec.getX(), oY + weight * v1 * vec.getY()); }; v1.DrawLine = function (DrawMC, oX, oY, vecTo, color) { DrawMC.lineStyle(1, color, 100); DrawMC.moveTo(oX, oY); DrawMC.lineTo(oX + vecTo.getX(), oY + vecTo.getY()); }; ASSetPropFlags(_global.UtilShapes.prototype, null, 1); } #endinitclip } movieClip 1799 __Packages.AI.States.FlyingSubStates.AvoidCollision { #initclip if (!_global.AI) { _global.AI = new Object(); } if (!_global.AI.States) { _global.AI.States = new Object(); } if (!_global.AI.States.FlyingSubStates) { _global.AI.States.FlyingSubStates = new Object(); } if (!_global.AI.States.FlyingSubStates.AvoidCollision) { var v1 = function (fsm, dangerousObj) { this.fsm = fsm; this.dangerousObj = dangerousObj; this.dataModel = fsm.getDataModel(); this.plane = AirPlane(this.dataModel); this.planeAIAgent = this.plane.getAIAgent(); }; AI.States.FlyingSubStates.AvoidCollision = v1; var v2 = v1.prototype; _global.AI.States.FlyingSubStates.AvoidCollision implements _global.AI.IState; v2.Enter = function () { this.fAvoid = new Vector2D(0, 0); }; v2.Exit = function () {}; v2.Update = function (time) { this.SetForceToAvoid(this.plane, this.dangerousObj); this.planeAIAgent.FollowForce(this.fAvoid, this.plane); if (this.isDistanceSafe(this.plane, this.dangerousObj)) { var v2; v2 = Math.random(); if (v2 < 0.5) { this.fsm.ChangeState(new AI.States.FlyingSubStates.Seek(this.fsm)); } else { this.fsm.ChangeState(new AI.States.FlyingSubStates.Wander(this.fsm)); } } }; v2.SetForceToAvoid = function (p, o) { var v5; v5 = o.getObstacleType(); if (v5 == enums.ObstacleTypes.AIRSHIP) { var v3; v3 = o.getClosestXY(p); this.fAvoid.setXY(p.__x - v3.__x, p.__y - v3.__y); } else { this.fAvoid.setXY(p.__x - o.__x, p.__y - o.__y); } this.fAvoid.Normalize(); UtilShapes.DrawVector(World.dmc, this.plane.__x, this.plane.__y, this.fAvoid, 50, 16776960); }; v2.isDistanceSafe = function (p, o) { var v6; v6 = o.getObstacleType(); var v4; v4 = new Vector2D(0, 0); v4.AddXY(p.__x, p.__y); var v2; v2 = this.getObstacleDimensions(o); v2.xMin -= AI.States.FlyingSubStates.AvoidCollision.C_DANGER_AREA_SIZE; v2.yMin -= AI.States.FlyingSubStates.AvoidCollision.C_DANGER_AREA_SIZE; v2.xMax += AI.States.FlyingSubStates.AvoidCollision.C_DANGER_AREA_SIZE; v2.yMax += AI.States.FlyingSubStates.AvoidCollision.C_DANGER_AREA_SIZE; if (!this.isInDangerArea(p, v2)) { return true; } else { return false; } }; v2.getObstacleDimensions = function (o) { var v4; v4 = o.getClip(); var v2 = v4.getBounds(_root); for (var v3 in v2) { } return v2; }; v2.isInDangerArea = function (p, bounds) { var v3; var v2; v3 = p.__x; v2 = p.__y; if (bounds.xMin < v3 && v3 < bounds.xMax && bounds.yMin < v2 && v2 < bounds.yMax) { return true; } else { return false; } }; v2.getStateName = function () { return this.stateName; }; v2.stateName = 'AvoidCollision'; v1.C_SAFE_DISTANCE = 150; v1.C_DANGER_AREA_SIZE = 100; ASSetPropFlags(AI.States.FlyingSubStates.AvoidCollision.prototype, null, 1); } #endinitclip } movieClip 1800 __Packages.AI.States.FlyingSubStates.Wander { #initclip if (!_global.AI) { _global.AI = new Object(); } if (!_global.AI.States) { _global.AI.States = new Object(); } if (!_global.AI.States.FlyingSubStates) { _global.AI.States.FlyingSubStates = new Object(); } if (!_global.AI.States.FlyingSubStates.Wander) { var v1 = function (fsm) { this.fsm = fsm; this.dataModel = fsm.getDataModel(); this.plane = AirPlane(this.dataModel); this.planeAIAgent = this.plane.getAIAgent(); }; AI.States.FlyingSubStates.Wander = v1; var v2 = v1.prototype; _global.AI.States.FlyingSubStates.Wander implements _global.AI.IState; v2.Enter = function () { this.fWander = new Vector2D(0, 0); this.wanderTarget = new Vector2D(1, 0); this.wanderTarget.setVec(this.plane.__direction); this.wanderTarget.Multiply(this.C_WANDER_RADIUS); this.wanderCirclePos = new Vector2D(0, 0); this.wanderExpirationTimer = new Timer(this.C_WANDER_EXPIRATION_TIME); this.wanderExpirationTimer.StartTimer(); this.altitude = this.plane.getAltitude(); this.oldAltitude = this.altitude; this.InitObstaclesAvoidArray(); }; v2.Exit = function () {}; v2.Update = function (time) { this.altitude = this.plane.getAltitude(); this.oldAltitude = this.altitude; this.SetForceWander(this.plane); this.planeAIAgent.FollowForce(this.fWander, this.plane); if (this.wanderExpirationTimer.TimeIntervalElapsed()) { this.fsm.ChangeState(new AI.States.FlyingSubStates.Seek(this.fsm)); return undefined; } if (this.isAltitudeCritical()) { this.fsm.ChangeState(new AI.States.FlyingSubStates.Raise(this.fsm)); return undefined; } if (this.isAltitudeLow() && this.isAltitudeLossCritical()) { if (this.planeAIAgent.getAIProfile() <= enums.AIProfiles.WEAK) { var v3; v3 = Math.random(); if (v3 < 0.01) { this.fsm.ChangeState(new AI.States.FlyingSubStates.Raise(this.fsm)); return undefined; } } else { this.fsm.ChangeState(new AI.States.FlyingSubStates.Raise(this.fsm)); return undefined; } } var v2; v2 = this.getTooCloseObstacle(this.plane, this.avoidObjsArray); if (v2 != undefined) { this.fsm.ChangeState(new AI.States.FlyingSubStates.AvoidCollision(this.fsm, v2)); return undefined; } }; v2.SetForceWander = function (p) { var v3; var v4; var v8; var v2; v3 = p.__x; v4 = p.__y; if (v3 < Const.C_SCENE_MIN_WIDTH + 20) { this.fWander.setXY(1, 0); this.wanderTarget.setX(v3 + v2.__x * this.C_WANDER_DISTANCE); this.wanderTarget.setY(v4 + v2.__y * this.C_WANDER_DISTANCE); return undefined; } if (v3 > Const.C_SCENE_MAX_WIDTH - 20) { this.fWander.setXY(-1, 0); this.wanderTarget.setX(v3 + v2.__x * this.C_WANDER_DISTANCE); this.wanderTarget.setY(v4 + v2.__y * this.C_WANDER_DISTANCE); return undefined; } v2 = p.__direction; v8 = p.getAltitude(); this.wanderCirclePos.__x = v3 + v2.__x * this.C_WANDER_DISTANCE; this.wanderCirclePos.__y = v4 + v2.__y * this.C_WANDER_DISTANCE; UtilShapes.DrawCircle(World.dmc, this.wanderCirclePos.__x, this.wanderCirclePos.__y, this.C_WANDER_RADIUS, 16711680); var v5; v5 = -this.C_WANDER_JITTER * 0.5; var v7; v7 = new Vector2D(v5 + this.C_WANDER_JITTER * Math.random(), v5 + this.C_WANDER_JITTER * Math.random()); this.wanderTarget.Add(v7); UtilShapes.DrawCross(World.dmc, this.wanderCirclePos.__x + this.wanderTarget.__x, this.wanderCirclePos.__y + this.wanderTarget.__y, 5592405); this.wanderTarget.Normalize(); this.wanderTarget.Multiply(this.C_WANDER_RADIUS); UtilShapes.DrawCross(World.dmc, this.wanderCirclePos.__x + this.wanderTarget.__x, this.wanderCirclePos.__y + this.wanderTarget.__y, 0); this.fWander.__x = this.wanderCirclePos.__x + this.wanderTarget.__x - v3; this.fWander.__y = this.wanderCirclePos.__y + this.wanderTarget.__y - v4; this.fWander.Normalize(); }; v2.isAltitudeCritical = function () { if (this.altitude < AI.States.FlyingSubStates.Wander.C_CRITICAL_ALTITUDE) { return true; } else { return false; } }; v2.isAltitudeLow = function () { if (this.altitude < AI.States.FlyingSubStates.Wander.C_LOW_ALTITUDE) { return true; } else { return false; } }; v2.isAltitudeLossCritical = function (p) { if (this.altitude - this.oldAltitude < AI.States.FlyingSubStates.Wander.C_CRITICAL_ALTITUDE_LOSS) { return true; } else { return false; } }; v2.getStateName = function () { return this.stateName; }; v2.InitObstaclesAvoidArray = function () { this.avoidObjsArray = new Array(); var v7; v7 = World.getInstance(); var v4; v4 = v7.getObstaclesArray(); var v2; var v6; v6 = v4.length; var v5; var v3; v2 = 0; while (v2 < v6) { v3 = v4[v2]; if (v3.getCurrentState() == entities.Obstacles.Obstacle.C_STATE_END) { } else { v5 = v3.getObstacleType(); if (enums.AIProfiles.isObstacleInAvoidList(v5)) { this.avoidObjsArray.push(v4[v2]); } } ++v2; } this.avoidObjsArrayCount = this.avoidObjsArray.length; this.avoidObjsDistances = new Array(); this.UpdateAvoidObjDistances(this.plane, v4); }; v2.UpdateAvoidObjDistances = function (p, obstacleArr) { var v3; v3 = 0; while (v3 < this.avoidObjsArrayCount) { var v2; v2 = this.getObstacleDimensions(this.avoidObjsDistances[v3]); v2.xMin -= AI.States.FlyingSubStates.Wander.C_DANGER_AREA_SIZE; v2.yMin -= AI.States.FlyingSubStates.Wander.C_DANGER_AREA_SIZE; v2.xMax += AI.States.FlyingSubStates.Wander.C_DANGER_AREA_SIZE; v2.yMax += AI.States.FlyingSubStates.Wander.C_DANGER_AREA_SIZE; if (this.isInDangerArea(p, v2)) { this.avoidObjsDistances[v3] = 0; } else { var v7; var v5; var v4; v5 = p.__x - obstacleArr[v3].__x; v4 = p.__y - obstacleArr[v3].__y; v7 = Math.sqrt(v5 * v5 + v4 * v4); this.avoidObjsDistances[v3] = v7; } ++v3; } }; v2.getTooCloseObstacle = function (p, obstArray) { this.UpdateAvoidObjDistances(p, obstArray); var v2; v2 = 0; while (v2 < this.avoidObjsArrayCount) { if (this.avoidObjsDistances[v2] < AI.States.FlyingSubStates.Wander.C_CRITICAL_AVOID_DISTANCE) { UtilShapes.DrawLine(World.dmc, this.plane.__x, this.plane.__y, new Vector2D(this.avoidObjsArray[v2].__x, this.avoidObjsArray[v2].__y), 255); return this.avoidObjsArray[v2]; } ++v2; } return undefined; }; v2.getObstacleDimensions = function (o) { var v4; v4 = o.getClip(); var v2 = v4.getBounds(_root); for (var v3 in v2) { } return v2; }; v2.isInDangerArea = function (p, bounds) { var v3; var v2; v3 = p.__x; v2 = p.__y; if (bounds.xMin < v3 && v3 < bounds.xMax && bounds.yMin < v2 && v2 < bounds.yMax) { return true; } else { return false; } }; v2.stateName = 'Wander'; v2.C_WANDER_RADIUS = 70; v2.C_WANDER_DISTANCE = 70; v2.C_WANDER_JITTER = 35; v1.C_CRITICAL_ALTITUDE = 110; v1.C_LOW_ALTITUDE = 150; v1.C_CRITICAL_ALTITUDE_LOSS = -3; v2.C_WANDER_EXPIRATION_TIME = 1000; v1.C_CRITICAL_AVOID_DISTANCE = 150; v1.C_DANGER_AREA_SIZE = 100; ASSetPropFlags(AI.States.FlyingSubStates.Wander.prototype, null, 1); } #endinitclip } movieClip 1801 __Packages.AI.States.FlyingSubStates.AvoidStall { #initclip if (!_global.AI) { _global.AI = new Object(); } if (!_global.AI.States) { _global.AI.States = new Object(); } if (!_global.AI.States.FlyingSubStates) { _global.AI.States.FlyingSubStates = new Object(); } if (!_global.AI.States.FlyingSubStates.AvoidStall) { var v1 = function (fsm) { this.fsm = fsm; this.dataModel = fsm.getDataModel(); this.plane = AirPlane(this.dataModel); this.planeAIAgent = this.plane.getAIAgent(); this.straightenTimer = new Timer(this.C_MAX_TIME_TO_STRAIGHTEN); }; AI.States.FlyingSubStates.AvoidStall = v1; var v2 = v1.prototype; _global.AI.States.FlyingSubStates.AvoidStall implements _global.AI.IState; v2.Enter = function () { this.fStraighten = new Vector2D(0, 0); if (this.plane.__direction.__x > 0) { this.fStraighten.setX(1); } else { this.fStraighten.setX(-1); } this.straightenTimer.StartTimer(); }; v2.Exit = function () {}; v2.Update = function (time) { if (this.isAltitudeHigh()) { this.fsm.ChangeState(new AI.States.FlyingSubStates.Speedup(this.fsm)); return undefined; } else { this.planeAIAgent.FollowForce(this.fStraighten, this.plane); } if (this.isVelocitySafe() || this.straightenTimer.TimeIntervalElapsed()) { var v2; v2 = Math.random(); if (v2 < 0.5) { this.fsm.ChangeState(new AI.States.FlyingSubStates.Seek(this.fsm)); return undefined; } else { this.fsm.ChangeState(new AI.States.FlyingSubStates.Wander(this.fsm)); return undefined; } } }; v2.isAltitudeHigh = function () { var v2; v2 = this.plane.getAltitude(); if (v2 > this.C_HIGH_ALTITUDE) { return true; } else { return false; } }; v2.isVelocitySafe = function () { var v2; v2 = this.plane.getVelocity(); if (v2 > 0.5 * (this.plane.getCNormalVelocity() + this.plane.getCMinVelocity())) { return true; } else { return false; } }; v2.getStateName = function () { return this.stateName; }; v2.stateName = 'AvoidStall'; v2.C_HIGH_ALTITUDE = 350; v2.C_MAX_TIME_TO_STRAIGHTEN = 2000; ASSetPropFlags(AI.States.FlyingSubStates.AvoidStall.prototype, null, 1); } #endinitclip } movieClip 1802 __Packages.AI.States.FlyingSubStates.Speedup { #initclip if (!_global.AI) { _global.AI = new Object(); } if (!_global.AI.States) { _global.AI.States = new Object(); } if (!_global.AI.States.FlyingSubStates) { _global.AI.States.FlyingSubStates = new Object(); } if (!_global.AI.States.FlyingSubStates.Speedup) { var v1 = function (fsm) { this.fsm = fsm; this.dataModel = fsm.getDataModel(); this.plane = AirPlane(this.dataModel); this.planeAIAgent = this.plane.getAIAgent(); }; AI.States.FlyingSubStates.Speedup = v1; var v2 = v1.prototype; _global.AI.States.FlyingSubStates.Speedup implements _global.AI.IState; v2.Enter = function () { this.diveVec = new Vector2D(0, 1); this.altitude = this.plane.getAltitude(); this.oldAltitude = this.altitude; }; v2.Exit = function () {}; v2.Update = function (time) { this.oldAltitude = this.altitude; this.altitude = this.plane.getAltitude(); if (this.isAltitudeCritical()) { this.fsm.ChangeState(new AI.States.FlyingSubStates.Raise(this.fsm)); return undefined; } if (this.isAltitudeLow() && this.isAltitudeLossCritical()) { this.fsm.ChangeState(new AI.States.FlyingSubStates.Raise(this.fsm)); return undefined; } if (this.isTurnRadiusDangerous(this.plane)) { this.fsm.ChangeState(new AI.States.FlyingSubStates.Raise(this.fsm)); return undefined; } this.planeAIAgent.FollowForce(this.diveVec, this.plane); }; v2.isAltitudeCritical = function (p) { if (this.altitude < AI.States.FlyingSubStates.Speedup.C_CRITICAL_ALTITUDE) { return true; } else { return false; } }; v2.isAltitudeLow = function (p) { if (this.altitude < AI.States.FlyingSubStates.Speedup.C_LOW_ALTITUDE) { return true; } else { return false; } }; v2.isAltitudeLossCritical = function (p) { if (this.altitude - this.oldAltitude < AI.States.FlyingSubStates.Speedup.C_CRITICAL_ALTITUDE_LOSS) { return true; } else { return false; } }; v2.getStateName = function () { return this.stateName; }; v2.isTurnRadiusDangerous = function (p) { if (this.planeAIAgent.getAIProfile() == enums.AIProfiles.WEAK) { return false; } var v2; v2 = p.getRotationCircleRadius(); v2 *= 1.25; UtilShapes.DrawCircle(World.dmc, this.plane.__x, this.plane.__y + v2, v2, 43520); var v3; v3 = this.altitude - 2 * v2; if (v3 < 0) { return true; } else { return false; } }; v2.stateName = 'Speedup'; v1.C_CRITICAL_ALTITUDE = 150; v1.C_LOW_ALTITUDE = 200; v1.C_CRITICAL_ALTITUDE_LOSS = -3; ASSetPropFlags(AI.States.FlyingSubStates.Speedup.prototype, null, 1); } #endinitclip } movieClip 1803 __Packages.AI.States.Breakdown { #initclip if (!_global.AI) { _global.AI = new Object(); } if (!_global.AI.States) { _global.AI.States = new Object(); } if (!_global.AI.States.Breakdown) { var v1 = function (fsm) { this.fsm = fsm; this.plane = AirPlane(fsm.getDataModel()); this.agent = PlaneAI(fsm.getAgent()); }; AI.States.Breakdown = v1; var v2 = v1.prototype; _global.AI.States.Breakdown implements _global.AI.IState; v2.Enter = function () { this.fDive = new Vector2D(0, 1); }; v2.Exit = function () {}; v2.Update = function (time) { this.agent.FollowForce(this.fDive, this.plane); UtilShapes.DrawVector(World.dmc, this.plane.__x, this.plane.__y, this.fDive, 100, 16711935); }; v2.getStateName = function () { return this.stateName; }; v2.stateName = 'Breakdown'; ASSetPropFlags(AI.States.Breakdown.prototype, null, 1); } #endinitclip } movieClip 1804 __Packages.AI.States.Bullethit { #initclip if (!_global.AI) { _global.AI = new Object(); } if (!_global.AI.States) { _global.AI.States = new Object(); } if (!_global.AI.States.Bullethit) { var v1 = function (fsm) { this.fsm = fsm; this.plane = AirPlane(fsm.getDataModel()); this.agent = PlaneAI(fsm.getAgent()); }; AI.States.Bullethit = v1; var v2 = v1.prototype; _global.AI.States.Bullethit implements _global.AI.IState; v2.Enter = function () {}; v2.Exit = function () {}; v2.Update = function (time) {}; v2.getStateName = function () { return this.stateName; }; v2.stateName = 'Bullethit'; ASSetPropFlags(AI.States.Bullethit.prototype, null, 1); } #endinitclip } movieClip 1805 __Packages.AI.States.Exploding { #initclip if (!_global.AI) { _global.AI = new Object(); } if (!_global.AI.States) { _global.AI.States = new Object(); } if (!_global.AI.States.Exploding) { var v1 = function (fsm) { this.fsm = fsm; this.plane = AirPlane(fsm.getDataModel()); this.agent = PlaneAI(fsm.getAgent()); }; AI.States.Exploding = v1; var v2 = v1.prototype; _global.AI.States.Exploding implements _global.AI.IState; v2.Enter = function () {}; v2.Exit = function () {}; v2.Update = function (time) {}; v2.getStateName = function () { return this.stateName; }; v2.stateName = 'Exploding'; ASSetPropFlags(AI.States.Exploding.prototype, null, 1); } #endinitclip } movieClip 1806 __Packages.AI.States.End { #initclip if (!_global.AI) { _global.AI = new Object(); } if (!_global.AI.States) { _global.AI.States = new Object(); } if (!_global.AI.States.End) { var v1 = function (fsm) { this.fsm = fsm; this.plane = AirPlane(fsm.getDataModel()); this.agent = PlaneAI(fsm.getAgent()); }; AI.States.End = v1; var v2 = v1.prototype; _global.AI.States.End implements _global.AI.IState; v2.Enter = function () {}; v2.Exit = function () {}; v2.Update = function (time) {}; v2.getStateName = function () { return this.stateName; }; v2.stateName = 'End'; ASSetPropFlags(AI.States.End.prototype, null, 1); } #endinitclip } movieClip 1807 __Packages.GraphicFX { #initclip if (!_global.GraphicFX) { var v1 = function (parentPlane, skyType) { this.__parent = parentPlane; this.__myWorld = this.__parent.getParent(); this.__skyType = skyType; this.__groupId = this.__parent.getGroupId(); this.__isGroupingShowed = GrpMan.getIsGroupColorShowed(); var v7; var v4; var v2; var v3; v3 = this.__parent.getFaceRightOrientation(); if (v3) { v2 = -1; } else { v2 = 1; } this.__explosionTimer = new Timer(this.C_EXPLOSION_DURATION); this.__explosion = new entities.effects.Explosion(entities.effects.Explosion.C_TYPE_SPHERE, entities.effects.Explosion.C_DURTYPE_ONCE, 20, 100, 130, new Array('30'), entities.effects.Explosion.C_FADE_SPEED_SLOW); this.__explosion.SetPauseListener(this.__myWorld, World.EVT_GAME_PAUSED); this.__smokeTrail = new entities.effects.Smoke(30, 90, new Vector2D(0, 0), 40, 0, 1, entities.effects.Smoke.C_FADE_SPEED_SLOW); this.__smokeTrail.SetPauseListener(this.__myWorld, World.EVT_GAME_PAUSED); this.__afterburnerTrail = new entities.effects.Smoke(15, 80, new Vector2D(0, 0), 90, undefined, 0, entities.effects.Smoke.C_FADE_SPEED_SLOW, 'S_AFTERBURNER_TRAIL_ELEM', true, LayMan.C_S_COLLIDE_FAR); this.__afterburnerTrail.SetPauseListener(this.__myWorld, World.EVT_GAME_PAUSED); this.InitGFXClips(); }; _global.GraphicFX = v1; var v2 = v1.prototype; v2.PlaneRollImmortalFlashing = function (planeClip, setAlphaTo100) { if (FrameMan.isNthFrame(5)) { planeClip._visible = !planeClip._visible; } if (setAlphaTo100) { planeClip._visible = true; } }; v2.PlaySmokeTrail = function (planePosX, planePosY, fury) { if (fury != undefined) { this.__smokeTrail.SetFury(fury); } this.__smokeTrail.SetXY(planePosX, planePosY); this.__smokeTrail.SetWind(0, 0); this.__smokeTrail.Play(); }; v2.UpdateSmokeTrail = function (planePosX, planePosY) { this.__smokeTrail.SetXY(planePosX, planePosY); }; v2.StopSmokeTrail = function () { this.__smokeTrail.Stop(); }; v2.PlayAfterburnerTrail = function (planePosX, planePosY, rotation) { this.__afterburnerTrail.SetXY(planePosX, planePosY); this.__afterburnerTrail.SetRotation(rotation); this.__afterburnerTrail.SetWind(0, 0); this.__afterburnerTrail.Play(); }; v2.UpdateAfterburnerTrail = function (planePosX, planePosY, direction, rotation) { var v3; var v2; v3 = planePosX + 20 * direction.getX(); v2 = planePosY + 20 * direction.getY(); this.__afterburnerTrail.SetXY(v3, v2); this.__afterburnerTrail.SetRotation(rotation); }; v2.StopAfterburnerTrail = function () { this.__afterburnerTrail.Stop(); }; v2.PlayExplosion = function (planePosX, planePosY, isGroundExplosion) { this.__explosion.SetXY(planePosX, planePosY); this.__smokeTrail.SetWind(0, -1); this.__smokeTrail.SetXY(planePosX, planePosY); if (isGroundExplosion) { this.__explosion.SetType(entities.effects.Explosion.C_TYPE_HEMISPHERE_UP); this.__smokeTrail.Play(); } else { this.__explosion.SetType(entities.effects.Explosion.C_TYPE_SPHERE); } this.__explosion.Play(); this.__explosionTimer.StartTimer(); }; v2.UpdateExplosion = function (planeCrashed) { if (planeCrashed) { if (!this.__explosionTimer.TimeIntervalElapsed()) { this.__explosionTimer.StopTimer(); return false; } else { return true; } } else { return true; } }; v2.PlaneAirScrewCutter = function (planeClip) { planeClip.gotoAndPlay('F_SCREWCUTTER'); }; v2.PlaneAirScrewCutterReset = function (planeClip) { planeClip.gotoAndPlay('F_BEGIN'); }; v2.HideAll = function () { var v2; var v3; v3 = this.__gfxClips.length; v2 = 0; while (v2 < v3) { this.__gfxClips[v2]._visible = false; ++v2; } this.__explosion.Stop(); this.__smokeTrail.Stop(); this.__afterburnerTrail.Stop(); }; v2.Destroy = function () { var v2; var v3; v3 = this.__gfxClips.length; v2 = 0; while (v2 < v3) { LayMan.RemoveClip(this.__gfxClips[v2]); ++v2; } this.__smokeTrail.Destroy(); this.__explosion.Destroy(); this.__afterburnerTrail.Destroy(); }; v2.Scroll = function (scrollCoef, xDiff, yDiff) { var v2; v2 = this.__gfxClips[GraphicFX.C_PLANE_WRECK]; if (v2._visible) { LayMan.ScrollClip(v2, scrollCoef, xDiff, yDiff); } }; v2.InitGFXClips = function () { this.__gfxClips = new Array(); var v4; var v2; var v7; v7 = this.C_GFX_CLIPS_ARRAY.length; var v8; v8 = this.__parent.getClip(); v2 = 0; while (v2 < v7) { if (this.C_GFX_CLIPS_ARRAY[v2][this.C_CLIP_APPLY_PLANE_ORIENTATION] == true) { v4 = LayMan.RegisterClipInClip(v8, this.C_GFX_CLIPS_ARRAY[v2][this.C_CLIP_NAME]); } else { v4 = LayMan.RegisterClip(this.C_GFX_CLIPS_ARRAY[v2][this.C_CLIP_NAME], this.C_GFX_CLIPS_ARRAY[v2][this.C_CLIP_LAYER]); } if (v2 == GraphicFX.C_PLANE_POINTER_ARROW) { var v6; v6 = this.__parent.getKeyControlType(); var v5; var v3; v5 = enums.DefaultKeyTypes.C_KEY_TYPES_CLIP_NAMES[v6]; v3 = LayMan.RegisterClipInClip(v4, v5); v3._x = -41; v3._y = -215; v3._xscale = 80; v3._yscale = 80; } v4._visible = false; this.__gfxClips.push(v4); ++v2; } }; v2.PlayGFX = function (gfxId, xpos, ypos, xscale, yscale, rotation) { var v2; v2 = this.__gfxClips[gfxId]; if (this.C_GFX_CLIPS_ARRAY[gfxId][this.C_CLIP_APPLY_PLANE_ORIENTATION] == true) { v2._visible = true; } else { if (xpos != undefined && ypos != undefined) { v2._x = xpos; v2._y = ypos; } if (xscale != undefined && yscale != undefined) { v2._xscale = xscale; v2._yscale = yscale; } if (rotation != undefined) { v2._rotation = rotation; } v2._visible = true; } v2.gotoAndPlay('F_BEGIN'); }; v2.StopGFX = function (gfxId) { var v2; v2 = this.__gfxClips[gfxId]; v2.gotoAndStop(1); v2._visible = false; }; v2.UpdateGFX = function (gfxId, xpos, ypos) { var v2; v2 = this.__gfxClips[gfxId]; v2._x = xpos; v2._y = ypos; }; v2.PlayScrewcutter = function (xpos, ypos, rotation) { this.PlayGFX(GraphicFX.C_SCREWCUTTER, xpos, ypos, undefined, undefined, rotation); }; v2.StopScrewcutter = function () { this.StopGFX(GraphicFX.C_SCREWCUTTER); }; v2.PlayMalicParachuted = function (xpos, ypos, rotation) { this.PlayGFX(GraphicFX.C_MALIC_PARACHUTED, xpos, ypos, undefined, undefined, rotation); }; v2.StopMalicParachuted = function () { this.StopGFX(GraphicFX.C_MALIC_PARACHUTED); }; v2.PlayEMPShock = function (xpos, ypos) { this.PlayGFX(GraphicFX.C_EMP_SHOCK, xpos, ypos); }; v2.StopEMPShock = function () { this.StopGFX(GraphicFX.C_EMP_SHOCK); }; v2.PlayWreck = function (xpos, ypos, rot) { this.PlayGFX(GraphicFX.C_PLANE_WRECK, xpos, ypos, undefined, undefined, rot); var v2; v2 = this.__gfxClips[GraphicFX.C_PLANE_WRECK]; }; v2.StopWreck = function () { this.StopGFX(GraphicFX.C_PLANE_WRECK); var v2; v2 = this.__gfxClips[GraphicFX.C_PLANE_WRECK]; }; v2.PlayNightReflector = function (xpos, ypos, rotation) { if (this.__skyType != enums.SkyTypes.NIGHT) { return undefined; } this.PlayGFX(GraphicFX.C_NIGHT_REFLECTOR); }; v2.StopNightReflector = function () { if (this.__skyType != enums.SkyTypes.NIGHT) { return undefined; } this.StopGFX(GraphicFX.C_NIGHT_REFLECTOR); }; v2.SyncWithFlipPlane = function () { if (this.__skyType != enums.SkyTypes.NIGHT) { return undefined; } }; v2.C_PLANE_BLUR_CLIPS_COUNT = 5; v2.C_PLANE_BLUR_FRAME_RATE_REFRESH = 2; v2.C_EXPLOSION_DURATION = 3000; v2.C_GFX_CLIPS_ARRAY = [['S_BREAKDOWN_ARROW_ANIM', LayMan.C_S_FGD_NEAR, false], ['S_ENGINE_CLOUD', LayMan.C_S_COLLIDE_NEAR, false], ['S_PLANE_WRECK', LayMan.C_S_FGD_FAR, false], ['S_SCREW_CUTTER', LayMan.C_S_COLLIDE_NEAR, true], ['S_PLANE_POINTER_ARROW_ANIM', LayMan.C_S_FGD_NEAR, false], ['S_MALIC_PARACHUTED', LayMan.C_S_COLLIDE_NEAR, true], ['S_EMP_SHOCK', LayMan.C_S_COLLIDE_NEAR, true], ['S_NIGHT_REFLECTOR', LayMan.C_S_COLLIDE_NEAR, true], ['S_GUN_BERSERK_INDICATOR', LayMan.C_S_COLLIDE_NEAR, true], ['S_GUN_JAM_INDICATOR', LayMan.C_S_COLLIDE_NEAR, true], ['S_DRUNKEN_PILOT_INDICATOR', LayMan.C_S_COLLIDE_NEAR, true]]; v2.C_CLIP_NAME = 0; v2.C_CLIP_LAYER = 1; v2.C_CLIP_APPLY_PLANE_ORIENTATION = 2; v1.C_BREAKDOWN_ARROW = 0; v1.C_BREAKDOWN_CLOUD = 1; v1.C_PLANE_WRECK = 2; v1.C_SCREWCUTTER = 3; v1.C_PLANE_POINTER_ARROW = 4; v1.C_MALIC_PARACHUTED = 5; v1.C_EMP_SHOCK = 6; v1.C_NIGHT_REFLECTOR = 7; v1.C_GUN_BERSERK_INDICATOR = 8; v1.C_GUN_JAM_INDICATOR = 9; v1.C_DRUNKEN_PILOT_INDICATOR = 10; ASSetPropFlags(_global.GraphicFX.prototype, null, 1); } #endinitclip } movieClip 1808 __Packages.Score { #initclip if (!_global.Score) { var v1 = function (parentPlane) { this.__parentPlane = parentPlane; this.__planeIdx = this.__parentPlane.getPlaneIdx(); this.__myWorld = World(parentPlane.getParent()); this.__gameConfig = (Game(this.__myWorld.getParent())).getGameConfig(); if (!this.__parentPlane.isAIControlled()) { this.__scoreHolder = _global.GameConf.getScoreHolder(this.__planeIdx); this.__scoreHolder.ResetScoreStats(enums.ScoreTypes.C_STAT_TYPE_CURRENT); } else { this.__scoreHolder = new ScoreHolder(); } this.__SFX = this.__parentPlane.getSFXObject(); this.Init(); }; _global.Score = v1; var v2 = v1.prototype; v2.Init = function () { this.__currentState = this.C_STATE_AWAIT_KILL; this.__previousState = this.C_STATE_AWAIT_KILL; this.__survivalTimer = new Timer(5000000); var v2; v2 = GameConfig.getInstance(); if (v2.getGameType() != enums.GameTypes.MULTIPLAYER && !this.__parentPlane.isAIControlled()) { this.__tripleKillTimerClock = new entities.other.GameClock(Score.C_TIME_TO_TRIPPLE_KILL / 1000, false, 495, 35, 300, 18, 'right', false, 'S_BLANK_RECT_2'); this.__tripleKillTimerClock.SetColors(Const.C_COLOR_WHITE, Const.C_COLOR_WHITE, Const.C_COLOR_ORANGE); this.__tripleKillTimerClock.SetTimeText('Triple kill timeout: '); this.__tripleKillTimerClock.addEventListener(entities.other.GameClock.EVT_TIMEOUT, mx.utils.Delegate.create(this, this.HandleClockTimeOut)); this.__doubleKillTimerClock = new entities.other.GameClock(Score.C_TIME_TO_DOUBLE_KILL / 1000, false, 495, 35, 300, 18, 'right', false, 'S_BLANK_RECT_2'); this.__doubleKillTimerClock.SetColors(Const.C_COLOR_WHITE, Const.C_COLOR_WHITE, Const.C_COLOR_ORANGE); this.__doubleKillTimerClock.SetTimeText('Double kill timeout: '); this.__doubleKillTimerClock.addEventListener(entities.other.GameClock.EVT_TIMEOUT, mx.utils.Delegate.create(this, this.HandleClockTimeOut)); } this.InitScoreBar(this.__parentPlane, 0); }; v2.InitScoreBar = function (planeObj, defaultScore) { var v2; v2 = planeObj.getPlaneIdx(); switch (v2) { case enums.PlaneStartPosTypes.AIRSHIP: this.__x = this.__parentPlane.getDefaultPosX() + 20; this.__y = Const.C_DEFAULT_Y_POS + 13; break; default: this.__x = this.__parentPlane.getDefaultPosX() + 20; this.__y = this.__parentPlane.getDefaultPosY() + 13; } this.__scoreBkg = LayMan.RegisterClip('S_SCORE_BKG', LayMan.C_S_FGD_NEAR); this.__scoreBkg._x = this.__x; this.__scoreBkg._y = this.__y; this.__scoreTextField = this.RegisterTxtField(this.__x, this.__y, '0', this.C_COLOR_POSITIVE_SCORE); }; v2.RegisterTxtField = function (x, y, value, color) { var v5; var v4; var v3; v5 = LayMan.RegisterEmptyClip('', LayMan.C_S_OTHER); v4 = LayMan.GetDepthIndex(LayMan.C_S_OTHER); _root.createTextField('txtScore' + v4, v4, x, y, 250, 50); v3 = _root['txtScore' + v4]; v3.selectable = false; v3.type = 'dynamic'; v3.text = String(value); this.setResultTxtFieldFormat(v3, color); return v3; }; v2.setResultTxtFieldFormat = function (txtField, color) { this.__scoreTextFieldFormat = new TextFormat(); this.__scoreTextFieldFormat.color = color; this.__scoreTextFieldFormat.size = Score.C_SCORE_FONT_SIZE; this.__scoreTextFieldFormat.bold = true; this.__scoreTextFieldFormat.font = 'Arial'; this.__scoreTextFieldFormat.align = 'left'; txtField.setTextFormat(this.__scoreTextFieldFormat); }; v2.UpdateTxtFieldFormat = function (scoreValue) { if (scoreValue > 0) { this.__scoreTextFieldFormat.color = this.C_COLOR_POSITIVE_SCORE; } else { this.__scoreTextFieldFormat.color = this.C_COLOR_NEGATIVE_SCORE; } if (scoreValue == 0) { this.__scoreTextFieldFormat.color = 0; } this.__scoreTextField.setTextFormat(this.__scoreTextFieldFormat); }; v2.UpdateScoreBar = function (currScore) { this.__scoreTextField.text = String(currScore); this.UpdateTxtFieldFormat(currScore); }; v2.getCurrScoreValue = function () { return this.__scoreHolder.getScoreValue(enums.ScoreTypes.CURRENT_SCORE, enums.ScoreTypes.C_STAT_TYPE_CURRENT); }; v2.AddScore = function (scoreType, isNegativeAddition) { var v5; v5 = this.__scoreHolder.AddScore(scoreType, isNegativeAddition); var v6; v6 = this.getCurrScoreValue(); this.UpdateScoreBar(v6); var v2; v2 = String(enums.ScoreTypes.getScoreInfo(scoreType, enums.ScoreTypes.C_INFO_LABEL_MSG)); if (v2.length > 0 && !isNegativeAddition) { var v4; v4 = UtilMath.getRandomNaturalNumber(this.C_MIN_Y_LABEL_OFS, this.C_MAX_Y_LABEL_OFS); v2 = v2 + '\n+' + String(v5); if (scoreType == enums.ScoreTypes.BUFFED_KILLS) { this.PlaceScoreLabel(v2, v4 + 2 * this.C_FNT_SIZE_MULTIPLE_KILL_INFO + FlyLabels.C_FNT_SIZE_KILL_INFO, this.C_FNT_SIZE_MULTIPLE_KILL_INFO, Const.C_SCENE_WIDTH / 2 - FlyLabels.C_LABEL_WIDTH / 2 + 25, Const.C_SCENE_HEIGHT / 2 - FlyLabels.C_LABEL_HEIGHT / 2); } if (scoreType == enums.ScoreTypes.DOUBLE_KILLS) { this.PlaceScoreLabel(v2, v4 + 1 * this.C_FNT_SIZE_MULTIPLE_KILL_INFO + FlyLabels.C_FNT_SIZE_KILL_INFO, this.C_FNT_SIZE_MULTIPLE_KILL_INFO, Const.C_SCENE_WIDTH / 2 - FlyLabels.C_LABEL_WIDTH / 2 + 25, Const.C_SCENE_HEIGHT / 2 - FlyLabels.C_LABEL_HEIGHT / 2); } if (scoreType == enums.ScoreTypes.TRIPLE_KILLS) { this.PlaceScoreLabel(v2, v4 + FlyLabels.C_FNT_SIZE_KILL_INFO, this.C_FNT_SIZE_MULTIPLE_KILL_INFO, Const.C_SCENE_WIDTH / 2 - FlyLabels.C_LABEL_WIDTH / 2 + 25, Const.C_SCENE_HEIGHT / 2 - FlyLabels.C_LABEL_HEIGHT / 2); } if (scoreType == enums.ScoreTypes.KILLS) { this.PlaceScoreLabel(v2, 0, FlyLabels.C_FNT_SIZE_KILL_INFO); } } }; v2.PlaceScoreLabel = function (txt, yOffset, fontsize, x, y) { var v5; v5 = this.__parentPlane.getPlaneColor(); var v8; var v4; var v6; var v3; var v2; v2 = 0.8 + 0.2 * Math.random(); v4 = v5 >> 16; v6 = v5 >> 8 & 255; v3 = v5 & 255; v4 *= v2; v6 *= v2; v3 *= v2; v8 = v4 << 16 | v6 << 8 | v3; var v11; var v10; var v9; v11 = (x == undefined) ? this.__parentPlane.getXPos() : x; v10 = (y == undefined) ? this.__parentPlane.getYPos() : y; v9 = (yOffset == undefined) ? 0 : yOffset; var v7; v7 = this.__myWorld.__flyLabels.PlaceLabel(v11, v10 - v9, txt); FlyLabels.SetLabelColor(v7, v8); FlyLabels.SetLabelFormat(v7, fontsize, undefined, undefined); }; v2.AddBonusKills = function () { if (this.__parentPlane.isPlanePositivelyBuffed()) { var v4; this.AddScore(enums.ScoreTypes.BUFFED_KILLS); var v3; var v2; v3 = this.__scoreHolder.getScoreValue(enums.ScoreTypes.BUFFED_KILLS, enums.ScoreTypes.C_STAT_TYPE_TOTAL); v2 = this.__scoreHolder.getScoreValue(enums.ScoreTypes.BUFFED_KILLS, enums.ScoreTypes.C_STAT_TYPE_CURRENT); this.SendWebAPIStats(WebApi.C_BUFFED_KILLS, v3 + v2); } }; v2.AddKills = function (obstacleType, curLives) { this.HandleStateActions(obstacleType, curLives); var v2; var v3; v2 = this.__scoreHolder.getScoreValue(enums.ScoreTypes.KILLS, enums.ScoreTypes.C_STAT_TYPE_CURRENT); v3 = this.__scoreHolder.getScoreValue(enums.ScoreTypes.KILLS, enums.ScoreTypes.C_STAT_TYPE_TOTAL); if (obstacleType == enums.ObstacleTypes.AIRPLANE && v2 == 1 && v3 == 0) { WebApi.UnlockAchievement(WebApi.C_ACH_TYPE_OTHER, WebApi.C_ACH_OTHER_FIRST_KILL); } }; v2.UpdateMaxKillingStreak = function (curLives) { var v3; v3 = this.__scoreHolder.getScoreValue(enums.ScoreTypes.CURR_KILLS_IN_A_ROW, enums.ScoreTypes.C_STAT_TYPE_CURRENT); var v2; v2 = this.__scoreHolder.getScoreValue(enums.ScoreTypes.BEST_KILLS_IN_A_ROW, enums.ScoreTypes.C_STAT_TYPE_CURRENT); if (v3 > v2) { v2 = v3; this.__scoreHolder.setScoreValue(enums.ScoreTypes.BEST_KILLS_IN_A_ROW, enums.ScoreTypes.C_STAT_TYPE_CURRENT, v2); } else { this.__scoreHolder.setScoreValue(enums.ScoreTypes.CURR_KILLS_IN_A_ROW, enums.ScoreTypes.C_STAT_TYPE_CURRENT, 0); } }; v2.UpdateCurKillingStreak = function (curLives) { this.__scoreHolder.AddScore(enums.ScoreTypes.CURR_KILLS_IN_A_ROW); }; v2.AddProjectileFired = function () { this.__scoreHolder.AddScore(enums.ScoreTypes.SHOTS_FIRED); }; v2.AddProjectileHit = function () { this.__scoreHolder.AddScore(enums.ScoreTypes.SHOTS_HIT); }; v2.AddSurvivalTimerStop = function () { this.__scoreHolder.AddScore(enums.ScoreTypes.SURVIVAL_TIMER_STOPS); }; v2.StartSurvivalTimer = function () { if (!this.__survivalTimer.isTimerStarted()) { this.__survivalTimer.StartTimer(); } }; v2.StopSurvivalTimer = function () { if (!this.__survivalTimer.isTimerStarted()) { return undefined; } var v2; v2 = this.__survivalTimer.GetTimeFromBeginning() / 1000; this.__survivalTimer.StopTimer(); this.AddSurvivalTimerStop(); this.__scoreHolder.AddValueToScore(enums.ScoreTypes.CUMUL_SURVIVAL_TIME_SEC, enums.ScoreTypes.C_STAT_TYPE_CURRENT, v2); }; v2.StopKillTimers = function () { this.ChangeState(this.C_STATE_AWAIT_KILL, null, null); }; v2.ComputeAndSave = function () { if (this.__scoreHolder == undefined) { return undefined; } this.__scoreHolder.ComputeAndSave(); var v2; v2 = this.__scoreHolder.getScoreValue(enums.ScoreTypes.CURRENT_SCORE, enums.ScoreTypes.C_STAT_TYPE_CURRENT); this.UpdateScoreBar(v2); this.SaveMoney(); }; v2.SendAllStatsToPortal = function () { this.SendWebAPIStats(undefined, undefined); }; v2.UpdateSavedLives = function (curLives) { this.__scoreHolder.setScoreValue(enums.ScoreTypes.SAVED_LIVES, enums.ScoreTypes.C_STAT_TYPE_CURRENT, curLives); }; v2.UpdateTimeLeft = function (timeLeft) { this.__scoreHolder.setScoreValue(enums.ScoreTypes.TIME_LEFT, enums.ScoreTypes.C_STAT_TYPE_CURRENT, timeLeft); }; v2.SaveMoney = function () { var v2; v2 = this.__parentPlane.getPlaneConfig(); var v3; v3 = this.__scoreHolder.getScoreValue(enums.ScoreTypes.CURRENT_SCORE, enums.ScoreTypes.C_STAT_TYPE_CURRENT); v2.AddCash(v3); }; v2.Destroy = function () { LayMan.RemoveClip(this.__scoreBkg); LayMan.RemoveTextField(this.__scoreTextField); }; v2.HandleStateActions = function (obstacleType, curLives) { switch (this.__currentState) { case this.C_STATE_AWAIT_KILL: this.AddKill(obstacleType, curLives); if (obstacleType == enums.ObstacleTypes.AIRPLANE || obstacleType == undefined) { this.ChangeState(this.C_STATE_AWAIT_DOUBLE_KILL, obstacleType, curLives); } break; case this.C_STATE_AWAIT_DOUBLE_KILL: this.AddKill(obstacleType, curLives); if (obstacleType == enums.ObstacleTypes.AIRPLANE || obstacleType == undefined) { this.AddDoubleKill(obstacleType, curLives); this.ChangeState(this.C_STATE_AWAIT_TRIPLE_KILL, obstacleType, curLives); } break; case this.C_STATE_AWAIT_TRIPLE_KILL: this.AddKill(obstacleType, curLives); if (obstacleType == enums.ObstacleTypes.AIRPLANE || obstacleType == undefined) { var v4 = false; if (this.__previousState == this.C_STATE_AWAIT_TRIPLE_KILL) { v4 = true; } this.AddTrippleKill(obstacleType, curLives, v4); this.ChangeState(this.C_STATE_AWAIT_TRIPLE_KILL, obstacleType, curLives); } } }; v2.ChangeState = function (newState, obstacleType, curLives) { this.__previousState = this.__currentState; this.HandleStatesTransition(this.__currentState, newState, obstacleType, curLives); this.__currentState = newState; }; v2.HandleStatesTransition = function (oldState, newState, obstacleType, curLives) { if (oldState == this.C_STATE_AWAIT_KILL && newState == this.C_STATE_AWAIT_DOUBLE_KILL) { this.__doubleKillTimerClock.Start(); } if (oldState == this.C_STATE_AWAIT_DOUBLE_KILL && newState == this.C_STATE_AWAIT_TRIPLE_KILL) { this.__doubleKillTimerClock.Stop(); this.__tripleKillTimerClock.Start(); } if (oldState == this.C_STATE_AWAIT_TRIPLE_KILL && newState == this.C_STATE_AWAIT_KILL) { if (this.__wasDoubleKill) { var v5; var v4; v5 = this.__scoreHolder.getScoreValue(enums.ScoreTypes.DOUBLE_KILLS, enums.ScoreTypes.C_STAT_TYPE_TOTAL); v4 = this.__scoreHolder.getScoreValue(enums.ScoreTypes.DOUBLE_KILLS, enums.ScoreTypes.C_STAT_TYPE_CURRENT); this.SendWebAPIStats(WebApi.C_DOUBLE_KILLS, v5 + v4); this.__wasDoubleKill = false; } this.__tripleKillTimerClock.Stop(); } if (oldState == this.C_STATE_AWAIT_DOUBLE_KILL && newState == this.C_STATE_AWAIT_KILL) { this.__doubleKillTimerClock.Stop(); } if (oldState == this.C_STATE_AWAIT_TRIPLE_KILL && newState == this.C_STATE_AWAIT_TRIPLE_KILL) { this.__tripleKillTimerClock.Restart(); } if (oldState == this.C_STATE_AWAIT_KILL && newState == this.C_STATE_AWAIT_KILL) { this.__doubleKillTimerClock.Stop(); this.__tripleKillTimerClock.Stop(); } }; v2.AddKill = function (obstacleType, curLives) { if (obstacleType == enums.ObstacleTypes.AIRPLANE || obstacleType == undefined) { this.AddScore(enums.ScoreTypes.KILLS); this.UpdateCurKillingStreak(curLives); var v3; var v2; v3 = this.__scoreHolder.getScoreValue(enums.ScoreTypes.KILLS, enums.ScoreTypes.C_STAT_TYPE_TOTAL); v2 = this.__scoreHolder.getScoreValue(enums.ScoreTypes.KILLS, enums.ScoreTypes.C_STAT_TYPE_CURRENT); this.SendWebAPIStats(WebApi.C_KILLS, v3 + v2); } else { this.AddScore(enums.ScoreTypes.NONPLANE_KILLS); var v5; v5 = this.__scoreHolder.getScoreValue(enums.ScoreTypes.NONPLANE_KILLS, enums.ScoreTypes.C_STAT_TYPE_CURRENT); } }; v2.AddDoubleKill = function (obstacleType, curLives) { this.AddScore(enums.ScoreTypes.DOUBLE_KILLS); this.__SFX.PlayDoubleKill(); this.__wasDoubleKill = true; }; v2.AddTrippleKill = function (obstacleType, curLives, isMultipleTripple) { this.AddScore(enums.ScoreTypes.TRIPLE_KILLS); if (!isMultipleTripple) { this.AddScore(enums.ScoreTypes.DOUBLE_KILLS, true); } this.__SFX.PlayTripleKill(); var v3; var v2; v3 = this.__scoreHolder.getScoreValue(enums.ScoreTypes.TRIPLE_KILLS, enums.ScoreTypes.C_STAT_TYPE_TOTAL); v2 = this.__scoreHolder.getScoreValue(enums.ScoreTypes.TRIPLE_KILLS, enums.ScoreTypes.C_STAT_TYPE_CURRENT); this.SendWebAPIStats(WebApi.C_TRIPLE_KILLS, v3 + v2); }; v2.Update = function () { if (this.__doubleKillTimerClock != undefined) { this.__doubleKillTimerClock.Update(); } if (this.__tripleKillTimerClock != undefined) { this.__tripleKillTimerClock.Update(); } }; v2.HandleClockTimeOut = function (evt) { var v2; v2 = evt.target; if (v2 == this.__doubleKillTimerClock && this.__currentState == this.C_STATE_AWAIT_DOUBLE_KILL) { this.ChangeState(this.C_STATE_AWAIT_KILL, null, null); } if (v2 == this.__tripleKillTimerClock && this.__currentState == this.C_STATE_AWAIT_TRIPLE_KILL) { this.ChangeState(this.C_STATE_AWAIT_KILL, null, null); } v2.FadeOut(); }; v2.SendWebAPIStats = function (webAPIStatsType, statValue) { var v2; if (!this.__parentPlane.isAIControlled() && GameConfig.getGameType() == enums.GameTypes.INS_SINGLEPLAYER) { if (webAPIStatsType == undefined) { v2 = this.__scoreHolder.getScoreValue(enums.ScoreTypes.BUFFED_KILLS, enums.ScoreTypes.C_STAT_TYPE_TOTAL); WebApi.AddStat(WebApi.C_BUFFED_KILLS, v2); v2 = this.__scoreHolder.getScoreValue(enums.ScoreTypes.KILLS, enums.ScoreTypes.C_STAT_TYPE_TOTAL); WebApi.AddStat(WebApi.C_KILLS, v2); v2 = this.__scoreHolder.getScoreValue(enums.ScoreTypes.DOUBLE_KILLS, enums.ScoreTypes.C_STAT_TYPE_TOTAL); WebApi.AddStat(WebApi.C_DOUBLE_KILLS, v2); v2 = this.__scoreHolder.getScoreValue(enums.ScoreTypes.TRIPLE_KILLS, enums.ScoreTypes.C_STAT_TYPE_TOTAL); WebApi.AddStat(WebApi.C_TRIPLE_KILLS, v2); v2 = this.__scoreHolder.getScoreValue(enums.ScoreTypes.CURRENT_SCORE, enums.ScoreTypes.C_STAT_TYPE_TOTAL); WebApi.AddStat(WebApi.C_SCORE, v2); var v4; var v5; v5 = GameConfig.getGameEndType(); if (v5 == GameConfig.C_SP_END_OTHER || v5 == GameConfig.C_SP_END_FOKKER) { v4 = true; } else { v4 = false; } if (v4) { v2 = this.__scoreHolder.getScoreValue(enums.ScoreTypes.SHOOT_ACCURACY, enums.ScoreTypes.C_STAT_TYPE_TOTAL); WebApi.AddStat(WebApi.C_GAME_COMPLETION_ACCURACY, v2); } } else { WebApi.AddStat(webAPIStatsType, statValue); } } if (!this.__parentPlane.isAIControlled() && GameConfig.getGameType() == enums.GameTypes.DEFENCE) { if (webAPIStatsType == undefined) { v2 = this.__scoreHolder.getScoreValue(enums.ScoreTypes.KILLS, enums.ScoreTypes.C_STAT_TYPE_TOTAL); WebApi.AddStat(WebApi.C_KILLS_DEFENCE_MODE, v2); } else { if (webAPIStatsType == WebApi.C_KILLS || webAPIStatsType == WebApi.C_KILLS_DEFENCE_MODE) { WebApi.AddStat(WebApi.C_KILLS_DEFENCE_MODE, statValue); } } } }; v2.C_COLOR_POSITIVE_SCORE = Const.C_COLOR_GREEN; v2.C_COLOR_NEGATIVE_SCORE = Const.C_COLOR_RED; v2.C_MIN_Y_LABEL_OFS = 0; v2.C_MAX_Y_LABEL_OFS = 0; v2.C_FNT_SIZE_MULTIPLE_KILL_INFO = 40; v1.C_SCORE_FONT_SIZE = 18; v1.C_TIME_TO_KILL = 5000000; v1.C_TIME_TO_DOUBLE_KILL = 7000; v1.C_TIME_TO_TRIPPLE_KILL = 5000; v2.C_STATE_AWAIT_KILL = 0; v2.C_STATE_AWAIT_DOUBLE_KILL = 1; v2.C_STATE_AWAIT_TRIPLE_KILL = 2; ASSetPropFlags(_global.Score.prototype, null, 1); } #endinitclip } movieClip 1809 __Packages.entities.devices.DeviceInterface { #initclip if (!_global.entities) { _global.entities = new Object(); } if (!_global.entities.devices) { _global.entities.devices = new Object(); } if (!_global.entities.devices.DeviceInterface) { _global.entities.devices.DeviceInterface = function () {}; } #endinitclip } movieClip 1810 __Packages.entities.devices.EmergencyParachute { #initclip if (!_global.entities) { _global.entities = new Object(); } if (!_global.entities.devices) { _global.entities.devices = new Object(); } if (!_global.entities.devices.EmergencyParachute) { var v1 = function (parentPlane, myWorld, skyType) { this.__parentPlane = parentPlane; this.__SFX = this.__parentPlane.getSFXObject(); this.__myWorld = myWorld; this.__clip = LayMan.RegisterClip('S_EMERGENCY_PARACHUTE', LayMan.C_S_COLLIDE_NEAR); enums.SkyTypes.AdjustTint(this.__clip, skyType, enums.SkyTypes.C_OBJ_COLOR_AMOUNT); this.__clip._xscale = 80; this.__clip._yscale = 80; this.Init(); }; entities.devices.EmergencyParachute = v1; var v2 = v1.prototype; _global.entities.devices.EmergencyParachute implements _global.entities.devices.DeviceInterface; v2.Init = function () { this.__isRendering = false; this.__clip.gotoAndStop('F_STOP'); this.__clip._visible = false; this.__clip.onEnterFrame = undefined; }; v2.ApplyOnce = function () {}; v2.ExecuteNow = function () { if (Math.random() > this.C_SAVE_LIFE_PROBAB) { return undefined; } this.__parentPlane.AddLife(1); this.__clip._visible = true; this.__clip._x = this.__parentPlane.__x; this.__clip._y = this.__parentPlane.__y; this.__clip.gotoAndPlay('F_BEGIN'); this.__myWorld.__flyLabels.PlaceLabel(this.__clip._x, this.__clip._y, 'Life saved'); this.__isRendering = true; this.__clip.onEnterFrame = mx.utils.Delegate.create(this, this.Update); this.__SFX.PlayParachuteDrop(); }; v2.Update = function () { if (!this.__isRendering) { return undefined; } this.__clip._y += 1; if (this.__clip._y > Const.C_SCENE_HEIGHT - 20) { this.Init(); } }; v2.Scroll = function (scrollCoef, xDiff, yDiff) { this.__clip._x += scrollCoef * xDiff; this.__clip._y += scrollCoef * yDiff; LayMan.ScrollClip(this.__clip, scrollCoef, xDiff, yDiff); }; v2.Destroy = function () { LayMan.RemoveClip(this.__clip); }; v2.getDeviceId = function () { return enums.ItemTypes.EMERGENCY_PARACHUTE; }; v2.C_SAVE_LIFE_PROBAB = 0.5; ASSetPropFlags(entities.devices.EmergencyParachute.prototype, null, 1); } #endinitclip } movieClip 1811 __Packages.entities.devices.AutoRepairPack { #initclip if (!_global.entities) { _global.entities = new Object(); } if (!_global.entities.devices) { _global.entities.devices = new Object(); } if (!_global.entities.devices.AutoRepairPack) { var v1 = function (parentPlane, myWorld, skyType) { this.__parentPlane = parentPlane; this.__planeDamage = this.__parentPlane.getDamageObj(); this.__myWorld = myWorld; this.__repairIntervalTime = Number(enums.ItemTypes.getItemInfo(enums.ItemTypes.AUTO_REPAIR_PACK, enums.ItemTypes.COOLDOWN)) * 1000; this.__repairTimer = new Timer(this.__repairIntervalTime); var v2; v2 = this.__parentPlane.getClip(); this.__clip = LayMan.RegisterClipInClip(v2, 'S_FRENCH_KEY'); this.__clip._y = -10; this.__clip._xscale = 30; this.__clip._yscale = 30; this.Init(); }; entities.devices.AutoRepairPack = v1; var v2 = v1.prototype; _global.entities.devices.AutoRepairPack implements _global.entities.devices.DeviceInterface; v2.Init = function () { this.__repairTimer.StartTimer(); this.__clip._visible = true; this.__clip.gotoAndStop(1); this.__clip.onEnterFrame = mx.utils.Delegate.create(this, this.Update); }; v2.ApplyOnce = function () {}; v2.ExecuteNow = function () {}; v2.Update = function () { var v2; v2 = this.__parentPlane.getCurrentState(); if (v2 == enums.PlaneStates.INIT || v2 == enums.PlaneStates.EXPLODING || v2 == enums.PlaneStates.END) { return undefined; } if (FrameMan.__frm % 10 == 0) { if (this.__repairTimer.TimeIntervalElapsed()) { if (this.__planeDamage.isDamaged()) { } if (this.__planeDamage.isDamaged() && (v2 == enums.PlaneStates.FLYING || v2 == enums.PlaneStates.BREAKDOWN)) { var v4; var v3; v4 = this.getDamageTypeToRepair(); v3 = UtilMath.getRandomNaturalNumber(this.C_MIN_REPAIRED_DAMAGE, this.C_MAX_REPAIRED_DAMAGE); this.__planeDamage.RemoveDamage(v4, v3); this.__repairTimer.StartTimer(); this.__clip.gotoAndPlay('F_BEGIN'); } this.__repairTimer.StartTimer(); } } }; v2.getDamageTypeToRepair = function () { var v2; v2 = Math.round((enums.DamageTypes.COUNT - 1) * Math.random()); if (this.__planeDamage.isDamaged(v2)) { return v2; } v2 = (v2 + 1) % enums.DamageTypes.COUNT; if (this.__planeDamage.isDamaged(v2)) { return v2; } v2 = (v2 + 1) % enums.DamageTypes.COUNT; if (this.__planeDamage.isDamaged(v2)) { return v2; } }; v2.Scroll = function (scrollCoef, xDiff, yDiff) {}; v2.Destroy = function () { LayMan.RemoveClip(this.__clip); }; v2.getDeviceId = function () { return enums.ItemTypes.AUTO_REPAIR_PACK; }; v2.__repairIntervalTime = 5000; v2.C_MIN_REPAIRED_DAMAGE = 1; v2.C_MAX_REPAIRED_DAMAGE = 2; ASSetPropFlags(entities.devices.AutoRepairPack.prototype, null, 1); } #endinitclip } movieClip 1812 __Packages.entities.devices.TargettingSystem { #initclip if (!_global.entities) { _global.entities = new Object(); } if (!_global.entities.devices) { _global.entities.devices = new Object(); } if (!_global.entities.devices.TargettingSystem) { var v1 = function (parentPlane, myWorld, skyType) { this.__parentPlane = parentPlane; this.__myWorld = myWorld; this.__planesArray = this.__myWorld.getPlanesArray(); this.__numOfPlanes = -1; this.__onPlaneHairClip = LayMan.RegisterClip('S_TARGET_HAIR', LayMan.C_S_OTHER); this.__onTargetHairClip = LayMan.RegisterClip('S_TARGET_HAIR', LayMan.C_S_OTHER); this.__fireEstimatorClip = LayMan.RegisterClip('S_TARGET_SQUARE', LayMan.C_S_OTHER); this.__fireOnEdgeIndicator = LayMan.RegisterClip('S_TARGET_EDGE', LayMan.C_S_OTHER); this.Init(); this.InitTailGunMounted(this.__parentPlane); }; entities.devices.TargettingSystem = v1; var v2 = v1.prototype; _global.entities.devices.TargettingSystem implements _global.entities.devices.DeviceInterface; v2.Init = function () { this.__isRendering = false; this.__onPlaneHairClip._visible = false; this.__onTargetHairClip._visible = false; this.__fireEstimatorClip._visible = false; this.__onPlaneHairTailClip._visible = false; this.__onTargetHairTailClip._visible = false; this.__fireEstimatorTailClip._visible = false; this.__fireOnEdgeIndicator._visible = false; this.__onPlaneHairClip.onEnterFrame = mx.utils.Delegate.create(this, this.Update); }; v2.ApplyOnce = function () {}; v2.ExecuteNow = function () {}; v2.Update = function () { var v2; v2 = this.__parentPlane.getCurrentState(); if (v2 == enums.PlaneStates.INIT || v2 == enums.PlaneStates.EXPLODING || v2 == enums.PlaneStates.END) { return undefined; } if (this.__tailGunDir) { this.UpdateTailGunProperties(); this.UpdateHairLinesAndEstimator(this.__tailGunDir, this.__tailRotation, this.__onPlaneHairTailClip, this.__onTargetHairTailClip, this.__fireEstimatorTailClip); } this.UpdateHairLinesAndEstimator(this.__parentPlane.getDirection(), this.__parentPlane.getRotation(), this.__onPlaneHairClip, this.__onTargetHairClip, this.__fireEstimatorClip); }; v2.UpdateHairLinesAndEstimator = function (direction, rotation, hair1Clip, hair2Clip, estimatorClip) { if (this.__numOfPlanes == -1) { this.__numOfPlanes = this.__myWorld.getNumOfPlanes(); } var v7; var v11; var v3; var v8; var v12; var v13; var v10; v13 = this.__parentPlane.getGroupId(); v7 = new Vector2D(this.__parentPlane.getXPos(), this.__parentPlane.getYPos()); v11 = direction; v3 = new Vector2D(0, 0); var v4; var v2; var v9; var v5; var v6 = -1; var v25; v4 = 0; while (v4 < this.__numOfPlanes) { v2 = this.__planesArray[v4]; v10 = v2.getGroupId(); if (this.__parentPlane.getPlaneIdx() == v2.getPlaneIdx()) { } else { if (v2.getCurrentState() != enums.PlaneStates.FLYING && v2.getCurrentState() != enums.PlaneStates.BREAKDOWN) { } else { if (v13 == v10) { } else { v3.setXY(v2.getXPos(), v2.getYPos()); v3.Sub(v7); v8 = v3.Length(); v3.Normalize(); v5 = v11.Dot(v3); if (v5 > v6) { v6 = v5; v9 = v2; v12 = v8; } } } } ++v4; } if (v6 > this.C_MAX_COS_ANGLE_TO_SHOW_HAIR) { var v20; var v22; v20 = v9.__x; v22 = v9.__y; hair1Clip._visible = true; hair2Clip._visible = true; hair1Clip._x = v7.__x + v11.__x * this.C_ON_PLANE_HAIR_DISTANCE; hair1Clip._y = v7.__y + v11.__y * this.C_ON_PLANE_HAIR_DISTANCE; hair1Clip._rotation = rotation; hair2Clip._x = v7.__x + v11.__x * v12; hair2Clip._y = v7.__y + v11.__y * v12; hair2Clip._rotation = rotation; estimatorClip._visible = true; var v19; var v18; v18 = v9.getDirection(); v19 = v8 / this.__bulletVelocity; estimatorClip._x = v20 + v18.__x * v19; estimatorClip._y = v22 + v18.__y * v19; if (v9.__x < 0 || v9.__x > Const.C_SCENE_WIDTH) { var v16; var v21; if (v9.__x < 0) { v16 = 0; } if (v9.__x > Const.C_SCENE_WIDTH) { v16 = Const.C_SCENE_WIDTH; } v21 = v7.__y + (v3.__y / v3.__x) * (v16 - v7.__x); this.__fireOnEdgeIndicator._x = v16; this.__fireOnEdgeIndicator._y = v21; this.__fireOnEdgeIndicator._visible = true; } else { this.__fireOnEdgeIndicator._visible = false; } } else { hair1Clip._visible = false; hair2Clip._visible = false; estimatorClip._visible = false; this.__fireOnEdgeIndicator._visible = false; } }; v2.Scroll = function (scrollCoef, xDiff, yDiff) {}; v2.Destroy = function () { LayMan.RemoveClip(this.__onPlaneHairClip); LayMan.RemoveClip(this.__onTargetHairClip); LayMan.RemoveClip(this.__fireEstimatorClip); LayMan.RemoveClip(this.__onPlaneHairTailClip); LayMan.RemoveClip(this.__onTargetHairTailClip); LayMan.RemoveClip(this.__fireEstimatorTailClip); LayMan.RemoveClip(this.__fireOnEdgeIndicator); }; v2.getDeviceId = function () { return enums.ItemTypes.TARGETTING_SYSTEM; }; v2.ShowHideClips = function (isVisible) { this.__onPlaneHairClip._visible = isVisible; this.__onTargetHairClip._visible = isVisible; this.__fireEstimatorClip._visible = isVisible; this.__onPlaneHairTailClip._visible = isVisible; this.__onTargetHairTailClip._visible = isVisible; this.__fireEstimatorTailClip._visible = isVisible; this.__fireOnEdgeIndicator._visible = isVisible; if (isVisible) { this.__onPlaneHairClip.onEnterFrame = mx.utils.Delegate.create(this, this.Update); } else { this.__onPlaneHairClip.onEnterFrame = undefined; } }; v2.InitTailGunMounted = function (parentPlane) { this.__isTailGunMounted = false; var v4; var v3; v4 = parentPlane.getWeaponsArray(); v3 = parentPlane.getWeaponsCount(); var v2; v2 = 0; while (v2 < v3) { if (v4[v2].getItemId() == enums.ItemTypes.TAIL_GUN) { this.__isTailGunMounted = true; this.__tailGunDir = new Vector2D(1, 0); this.__onPlaneHairTailClip = LayMan.RegisterClip('S_TARGET_HAIR', LayMan.C_S_OTHER); this.__onTargetHairTailClip = LayMan.RegisterClip('S_TARGET_HAIR', LayMan.C_S_OTHER); this.__fireEstimatorTailClip = LayMan.RegisterClip('S_TARGET_SQUARE', LayMan.C_S_OTHER); return undefined; } ++v2; } }; v2.UpdateTailGunProperties = function () { if (this.__isTailGunMounted) { this.__tailGunDir.setXY(1, 0); var v2; var v3; v3 = (this.__parentPlane.getClip())._yscale; if (v3 > 0) { v2 = 1; } else { v2 = -1; } var v4; v4 = this.__parentPlane.getAngleCorrection(); if (this.__parentPlane.getFaceRightOrientation()) { this.__tailRotation = this.__parentPlane.getClipRotation() + 180 + v2 * (180 + entities.projectiles.TailGunBurst.C_TAIL_FIRE_ANGLE); this.__tailGunDir.Rotate(this.__tailRotation); } else { this.__tailRotation = this.__parentPlane.getClipRotation() - v2 * (180 + entities.projectiles.TailGunBurst.C_TAIL_FIRE_ANGLE); } } }; v2.C_ON_PLANE_HAIR_DISTANCE = 110; v2.C_MAX_COS_ANGLE_TO_SHOW_HAIR = 0.9; v2.__bulletVelocity = 10; ASSetPropFlags(entities.devices.TargettingSystem.prototype, null, 1); } #endinitclip } movieClip 1813 __Packages.entities.devices.MagneticDeflector { #initclip if (!_global.entities) { _global.entities = new Object(); } if (!_global.entities.devices) { _global.entities.devices = new Object(); } if (!_global.entities.devices.MagneticDeflector) { var v1 = function (parentPlane, myWorld, skyType) { this.__parentPlane = parentPlane; this.__SFX = this.__parentPlane.getSFXObject(); this.__myWorld = myWorld; this.__planesArray = this.__myWorld.getPlanesArray(); this.__rechargeTime = Number(1000 * enums.ItemTypes.getItemInfo(enums.ItemTypes.MAGNETIC_DEFLECTOR, enums.ItemTypes.COOLDOWN)); this.__rechargeTimer = new Timer(this.__rechargeTime); this.__numOfPlanes = -1; this.__currentState = this.C_STATE_INIT; var v2; v2 = this.__parentPlane.getClip(); this.__clip = LayMan.RegisterClipInClip(v2, 'S_DEFLECTOR_BUBBLE'); this.Init(); this.__clip.onEnterFrame = mx.utils.Delegate.create(this, this.Update); }; entities.devices.MagneticDeflector = v1; var v2 = v1.prototype; _global.entities.devices.MagneticDeflector implements _global.entities.devices.DeviceInterface; v2.Init = function () { this.__curDeflectedCount = 0; this.__rechargeTimer.StopTimer(); this.__rechargeTimer.StartTimer(); this.__clip.gotoAndStop('F_FIRST'); this.__clip._visible = false; }; v2.ApplyOnce = function () {}; v2.ExecuteNow = function () {}; v2.Update = function () { var v2; v2 = this.__parentPlane.getCurrentState(); if (v2 == enums.PlaneStates.INIT || v2 == enums.PlaneStates.EXPLODING || v2 == enums.PlaneStates.END) { return undefined; } this.HandleStateActions(); }; v2.Scroll = function (scrollCoef, xDiff, yDiff) {}; v2.Destroy = function () { LayMan.RemoveClip(this.__clip); }; v2.ShowHideClips = function (isVisible) { this.__clip._visible = isVisible; if (isVisible) { this.__clip.onEnterFrame = mx.utils.Delegate.create(this, this.Update); this.ChangeState(this.C_STATE_RECHARGING); } else { this.__clip.onEnterFrame = undefined; this.ChangeState(this.C_STATE_INIT); } }; v2.getDeviceId = function () { return enums.ItemTypes.MAGNETIC_DEFLECTOR; }; v2.HandleStateActions = function () { switch (this.__currentState) { case this.C_STATE_RECHARGING: if (this.__rechargeTimer.TimeIntervalElapsed()) { this.ChangeState(this.C_STATE_DEFLECTING); this.__rechargeTimer.StopTimer(); } break; case this.C_STATE_BREAKING: if (this.__clip._currentframe == this.__clip._totalframes) { this.ChangeState(this.C_STATE_RECHARGING); } break; case this.C_STATE_DEFLECTING: this.ComputeDeflection(); } }; v2.ChangeState = function (newState) { this.HandleStatesTransition(this.__currentState, newState); this.__currentState = newState; }; v2.HandleStatesTransition = function (oldState, newState) { if (oldState == this.C_STATE_INIT && newState == this.C_STATE_RECHARGING) { this.__rechargeTimer.StartTimer(); } if (oldState == this.C_STATE_INIT && newState == this.C_STATE_DEFLECTING) { this.__rechargeTimer.StopTimer(); this.__clip._visible = true; this.__clip.gotoAndPlay('F_BEGIN'); this.__SFX.PlayMagneticDeflectorOn(); } if (oldState == this.C_STATE_RECHARGING && newState == this.C_STATE_DEFLECTING) { this.__clip._visible = true; this.__clip.gotoAndPlay('F_BEGIN'); this.__SFX.PlayMagneticDeflectorOn(); } if (oldState == this.C_STATE_DEFLECTING && newState == this.C_STATE_BREAKING) { this.__clip.gotoAndPlay('F_BREAK'); } if (oldState == this.C_STATE_BREAKING && newState == this.C_STATE_RECHARGING) { this.Init(); } if (oldState == this.C_STATE_DEFLECTING && newState == this.C_STATE_INIT) { this.Init(); } if (oldState == this.C_STATE_RECHARGING && newState == this.C_STATE_INIT) { this.Init(); } }; v2.InitWeaponList = function () { this.__weaponList = new Array(); var v6; var v3; var v5; var v7; var v8; var v4; var v2; v6 = 0; while (v6 < this.__numOfPlanes) { v5 = this.__planesArray[v6]; if (this.__parentPlane.getPlaneIdx() == v5.getPlaneIdx()) { } else { v7 = v5.getWeaponsArray(); v8 = v5.getWeaponsCount(); v3 = 0; while (v3 < v8) { v4 = v7[v3]; v2 = v4.getItemId(); if (!(v2 == enums.ItemTypes.MACHINE_GUN || v2 == enums.ItemTypes.TWIN_MACHINE_GUN || v2 == enums.ItemTypes.TAIL_GUN || v2 == enums.ItemTypes.BURST_GUN)) { } else { this.__weaponList.push(v4); } ++v3; } } ++v6; } this.__weaponListLen = this.__weaponList.length; }; v2.ComputeDeflection = function () { if (this.__numOfPlanes == -1) { this.__numOfPlanes = this.__myWorld.getNumOfPlanes(); this.InitWeaponList(); } var v2; var v5; var v4; v5 = this.__weaponList; v2 = 0; while (v2 < this.__weaponListLen) { v4 = v5[v2]; var v3; v3 = this.__curDeflectedCount; this.__curDeflectedCount += v4.DeflectProjectiles(this.C_MAX_DEFLECTED_PROJECTILES - this.__curDeflectedCount, this.C_DEFLECTION_RADIUS, this.__parentPlane); if (this.__curDeflectedCount != v3) { this.__SFX.PlayMagneticDeflection(); } if (this.__curDeflectedCount > this.C_MAX_DEFLECTED_PROJECTILES) { this.ChangeState(this.C_STATE_BREAKING); } ++v2; } }; v2.C_STATE_INIT = 1; v2.C_STATE_RECHARGING = 2; v2.C_STATE_BREAKING = 3; v2.C_STATE_DEFLECTING = 4; v2.C_MAX_DEFLECTED_PROJECTILES = 7; v2.__rechargeTime = 1000; v2.C_DEFLECTION_RADIUS = 60; ASSetPropFlags(entities.devices.MagneticDeflector.prototype, null, 1); } #endinitclip } movieClip 1814 __Packages.AirPlane { #initclip if (!_global.AirPlane) { var v1 = function (playerName, skyType, myWorld, planeConfig) { super(); this.__planeConfig = planeConfig; var v3; v3 = this.__planeConfig.getDefaultKeyType(); this.__keyControlType = v3; this.__Keys = new KeyControls(v3); if (v3 == enums.DefaultKeyTypes.MOUSE || v3 == enums.DefaultKeyTypes.MOUSE_MULTI) { this.InitMouseControls(); } if (v3 == enums.DefaultKeyTypes.AI) { this.__isAIControlled = true; } else { this.__isAIControlled = false; } this.__groupId = GrpMan.registerInGroup(planeConfig.getGroupId()); mx.events.EventDispatcher.initialize(this); this.__myWorld = myWorld; this.__gameConfig = (this.__myWorld.getParent()).getGameConfig(); this.__myMath = (this.__myWorld.getParent()).getMyMath(); this.__windVec = this.__myWorld.getWindDir(); this.__numOfLives = planeConfig.getNumOfLives(); AirPlane.__numTotalLives += this.__numOfLives; this.__obstacleType = enums.ObstacleTypes.AIRPLANE; this.__targetType = planeConfig.getTargetType(); this.InitClipProperties(planeConfig, skyType); this.InitLivesTextField(this.__numOfLives); this.__SFX = new SoundFX(); this.__GFX = new GraphicFX(this, skyType); this.StartingPlanePosition(); this.InitPlaneStateMachine(); this.__engineTimer = new Timer(Const.C_ENGINE_THRUST_CONSTANT_TIME); this.__rollImmortalityTimer = new Timer(Const.C_ROLL_IMMORTALITY_TIME); if (!this.isAIControlled()) { this.__score = new Score(this); } this.__gravityVec = new Vector2D(0, 1); this.__forceRollingTimer = new Timer(Const.C_FORCE_ROLING_TIME); this.__frameWhenFinishedGame = 0; this.InitScrollingBehaviour(); this.__stalledEngineTimer = new Timer(1000); this.ApplyPlaneConfigToThePlane(planeConfig, skyType, this); this.__driftVec = new Vector2D(0, 0); this.InitCentrifugalVariables(); this.__myWorld.addEventListener(World.EVT_GAME_PAUSED, mx.utils.Delegate.create(this, this.Pause)); this.debugDrawMC = LayMan.RegisterEmptyClip('mc_debug_dwaing_canvas2', LayMan.C_S_OTHER); this.__planeFlipTimer = new Timer(this.C_PLANE_FLIP_TIME); if (AirPlane.C_DEBUG) { this.vel = 0; this.oldVel = this.vel; this.alt = 0; this.oldAlt = this.alt; this.yDir = 0; this.plane = this; this.stateTxtField = LayMan.CreateTextField(this.plane.getXPos() - 100, this.plane.getYPos() - 100, 200, 100, LayMan.C_S_OTHER, undefined); this.stateTxtField.selectable = false; this.stateTxtField.multiline = true; this.stateTxtField.autoSize = true; this.txtFmt = new TextFormat(); this.txtFmt.bold = true; this.txtFmt.size = 13; this.txtFmt.color = this.plane.getPlaneColor(); this.txtFmt.align = 'left'; } this.InitForceRollingClock(this.__isAIControlled, this.__defaultx, this.__defaulty); }; _global.AirPlane = v1; _global.AirPlane extends AirPlaneFSM; var v2 = v1.prototype; v2.InitClipProperties = function (planeConfig, skyType) { var v5; var v4; var v2; v2 = planeConfig.getStartPosType(); switch (v2) { case enums.PlaneStartPosTypes.FIRST: this.__face_right_orientation = true; v5 = 220 * v2 + 65; v4 = Const.C_DEFAULT_Y_POS; break; case enums.PlaneStartPosTypes.SECOND: this.__face_right_orientation = false; v5 = 220 * v2 + 65; v4 = Const.C_DEFAULT_Y_POS; break; case enums.PlaneStartPosTypes.THIRD: this.__face_right_orientation = true; v5 = 220 * v2 + 65; v4 = Const.C_DEFAULT_Y_POS; break; case enums.PlaneStartPosTypes.FOURTH: this.__face_right_orientation = false; v5 = 220 * v2 + 65; v4 = Const.C_DEFAULT_Y_POS; break; case enums.PlaneStartPosTypes.AIRSHIP: this.__face_right_orientation = false; v5 = 220 * (v2 - 1) - 50; v4 = 150; var v3; v3 = new Array(); v3[entities.Obstacles.Airship.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.AIRSHIP; v3[entities.Obstacles.Airship.C_ARG_TYPE_X] = v5 - 130; v3[entities.Obstacles.Airship.C_ARG_TYPE_Y] = v4 - 80; v3[entities.Obstacles.Airship.C_ARG_TYPE_VELOCITY] = 0; v3[entities.Obstacles.Airship.C_ARG_TYPE_DIRECTION] = new Vector2D(-1, 0); v3[entities.Obstacles.Airship.C_ARG_TYPE_HITPOINTS] = 1000; this.__myWorld.CreateObstacle(v3); } var v6; v6 = planeConfig.getPlaneType(); this.__planeType = v6; var v9; v9 = enums.PlaneTypes.C_PLAYER_PLANE_CLIP_NAME[v6]; this.__planeColor = enums.PlaneTypes.C_PLAYER_PLANE_COLOR[v6]; var v7; if (this.__face_right_orientation == true) { this.__direction = new Vector2D(1, 0); this.__angleCorrection = 0; v7 = -1; } else { this.__direction = new Vector2D(1, 0); this.__direction.Rotate(180); this.__angleCorrection = 180; v7 = 1; } this.__clip = LayMan.RegisterClip(v9, LayMan.C_S_COLLIDE_NEAR); this.InitGrpFlag(this.__clip); enums.SkyTypes.AdjustTint(this.__clip, skyType, enums.SkyTypes.C_OBJ_COLOR_AMOUNT); this.__clip._xscale = v7 * Const.C_PLANE_SCALE; this.__clip._yscale = Const.C_PLANE_SCALE; this.__clip.airscrew.stop(); this.__clip._visible = true; this.__boundingBoxClip = LayMan.RegisterClip(Const.C_PLAYER_PLANE_BBOX_CLIP_NAME, LayMan.C_S_OTHER); this.__boundingBoxClip._xscale = this.__clip._xscale * 0.9; this.__boundingBoxClip._yscale = this.__clip._yscale * 0.97; this.__boundingBoxClip._visible = false; this.__boundingBoxBulletsClip = LayMan.RegisterClip(Const.C_PLAYER_PLANE_BBOX_CLIP_NAME, LayMan.C_S_OTHER); this.__boundingBoxBulletsClip._xscale = this.__clip._xscale * 0.9300000000000001; this.__boundingBoxBulletsClip._yscale = this.__clip._yscale * 0.99; this.__boundingBoxBulletsClip._visible = false; this.__shadow = LayMan.RegisterClip(Const.C_PLANE_SHADOW_CLIP_NAME, LayMan.C_S_FGD_NEAR); this.__shadow._xscale = this.__clip._xscale; this.__shadow._yscale = this.__clip._yscale; this.__shadow._visible = true; this.__defaultx = v5; this.__defaulty = v4; this.__x = this.__defaultx; this.__xOld = this.__x; this.__y = this.__defaulty; this.__planeIdx = planeConfig.getStartPosType(); this.__inDirectionVelocity = 0; this.__rotation = 0; if (v2 == enums.PlaneStartPosTypes.AIRSHIP) { this.__planeDamage = new Damage(this, v6, v2, this.__defaultx, this.__defaulty + 25); } else { this.__planeDamage = new Damage(this, v6, v2, this.__defaultx, this.__defaulty + 25); } }; v2.InitAI = function (planeConfig) { var v2; v2 = this.__planeConfig.getDefaultKeyType(); this.__Keys = new KeyControls(v2); if (v2 == enums.DefaultKeyTypes.AI) { this.__isAIControlled = true; var v3; v3 = this.__planeConfig.getAIProfile(); this.__AIAgent = new PlaneAI(v3, this); } else { this.__isAIControlled = false; } }; v2.InitScrollingBehaviour = function () { if (this.__myWorld.isScrolling()) { this.CheckScreenBordersFunction = this.CheckScreenBordersScroll; } else { this.CheckScreenBordersFunction = this.CheckScreenBordersWrap; } this.__isRotateDisabledDueToScrollNoWrap = false; }; v2.INIT_PlaneState = function () { this.__forceRollingClock.Update(); if (this.__forceRollingTimer.TimeIntervalElapsed() && this.__isAIControlled || this.isFireControlPressed() || this.isFireSecondaryControlPressed()) { this.ForceToRolling(); } }; v2.ROLLING_PlaneState = function () { if (this.__inDirectionVelocity < this.c_startingVelocity) { this.__inDirectionVelocity += 0.2; } this.__GFX.PlaneRollImmortalFlashing(this.__clip, false); if (this.__planeIdx == enums.PlaneStartPosTypes.AIRSHIP) { if (this.__rollImmortalityTimer.GetTimerRelativePosition() > 0.4 && this.__direction.__y > 0.85) { this.__isRotateControlEnabled = true; } } else { if (this.__rollImmortalityTimer.GetTimerRelativePosition() > 0.5 && this.__inDirectionVelocity > (this.c_normalVelocity + this.c_minimalVelocity) / 2) { this.__isRotateControlEnabled = true; } } if (this.__rollImmortalityTimer.TimeIntervalElapsed()) { this.__GFX.PlaneRollImmortalFlashing(this.__clip, true); this.ChangePlaneState(enums.PlaneStates.FLYING); } }; v2.FLYING_PlaneState = function () { if (!this.__isEngineStalled) { if (this.__inDirectionVelocity < this.c_minimalVelocity) { this.ForceStallEngine(this.C_CRITICAL_VELOCITY_REACH_STALL_TIME); } } if (this.__isPlaneBuffed) { this.ProcessPlaneBuffGFX(); } this.UpdateDamageGFX(); }; v2.BREAKDOWN_PlaneState = function () { if (this.isPlanefacedDown() && this.__y - this.__yOld >= this.c_normalVelocity) { if (this.__stalledEngineTimer.isTimerStarted() && this.__stalledEngineTimer.TimeIntervalElapsed()) { switch (this.__stallType) { case this.C_MALICIOUS_PARACHUTE_HIT_STALL_TYPE: this.__GFX.StopMalicParachuted(); break; case this.C_EMP_HIT_STALL_TYPE: this.__GFX.StopEMPShock(); } this.__isEngineStalled = false; this.__inDirectionVelocity = this.__y - this.__yOld; this.resetDirectionVector(); this.allignDirectionVectorToClip(); this.__stalledEngineTimer.StopTimer(); this.ChangePlaneState(enums.PlaneStates.FLYING); return undefined; } } if (this.__isPlaneBuffed && this.__bonusType == enums.BonusTypes.AFTERBURNER) { this.ChangePlaneState(enums.PlaneStates.FLYING); } this.__yOld = this.__y; if (!this.__isAIControlled) { this.__GFX.UpdateGFX(GraphicFX.C_BREAKDOWN_ARROW, this.__x, this.__y); } this.UpdateDamageGFX(); }; v2.BULLETHIT_PlaneState = function () { this.__GFX.UpdateSmokeTrail(this.__x, this.__y); }; v2.EXPLODING_PlaneState = function () { if (this.__GFX.UpdateExplosion(true)) { if (World.__isRedBaronAirshipDestroyed && GameConfig.getGameType() == enums.GameTypes.INS_SINGLEPLAYER && this.__planeIdx == enums.PlaneStartPosTypes.AIRSHIP && this.__planeType == enums.PlaneTypes.FOKKER) { this.ChangePlaneState(enums.PlaneStates.END); } if (this.__numOfLives == 0) { this.ChangePlaneState(enums.PlaneStates.END); } else { this.ChangePlaneState(enums.PlaneStates.INIT); } this.__GFX.UpdateSmokeTrail(this.__x, this.__y); } }; v2.END_PlaneState = function () {}; v2.UpdatePlaneStates = function () { switch (this.__planeCurrentState) { case enums.PlaneStates.FLYING: this.FLYING_PlaneState(); break; case enums.PlaneStates.BREAKDOWN: this.BREAKDOWN_PlaneState(); break; case enums.PlaneStates.INIT: this.INIT_PlaneState(); break; case enums.PlaneStates.ROLLING: this.ROLLING_PlaneState(); break; case enums.PlaneStates.BULLETHIT: this.BULLETHIT_PlaneState(); break; case enums.PlaneStates.EXPLODING: this.EXPLODING_PlaneState(); break; case enums.PlaneStates.END: this.END_PlaneState(); } }; v2.ExecActionsOfPlaneStateTransitions = function () { if (this.__planePreviousState == enums.PlaneStates.INIT && this.__planeCurrentState == enums.PlaneStates.ROLLING) { this.__isCollidingWithPlanes = false; this.__isCollidingWithBonus = false; this.__isCollidingWithBullets = false; this.__isRotateControlEnabled = false; this.__isFireControlEnabled = false; this.__isTakeOffControlEnabled = false; this.__rollImmortalityTimer.StartTimer(); this.__score.StartSurvivalTimer(); if (!this.__isAIControlled) { this.__myWorld.ForceFadeOutControlsInfo(); } if (this.__planeIdx == enums.PlaneStartPosTypes.AIRSHIP) { this.__gravityVec.setXY(0, 0); } this.ShowHideDeviceClips(true); if (!this.__isAIControlled) { this.__GFX.StopGFX(GraphicFX.C_PLANE_POINTER_ARROW); } this.__GFX.PlayNightReflector(this.__x, this.__y, this.__rotation); var v2; v2 = 0; while (v2 < this.__weaponsCount) { this.__weaponsArray[v2].Init(); ++v2; } } if (this.__planePreviousState == enums.PlaneStates.ROLLING && this.__planeCurrentState == enums.PlaneStates.FLYING) { this.__isCollidingWithPlanes = true; this.__isCollidingWithBonus = true; this.__isCollidingWithBullets = true; this.__isRotateControlEnabled = true; this.__isFireControlEnabled = true; this.__isTakeOffControlEnabled = false; } if (this.__planePreviousState == enums.PlaneStates.ROLLING && this.__planeCurrentState == enums.PlaneStates.EXPLODING) { this.__isCollidingWithPlanes = false; this.__isCollidingWithBonus = false; this.__isCollidingWithBullets = false; this.__isRotateControlEnabled = false; this.__isFireControlEnabled = false; this.__isTakeOffControlEnabled = false; this.__score.UpdateMaxKillingStreak(this.__numOfLives); this.__score.StopSurvivalTimer(); this.ExplodeAndLooseLife(this.isGroundCollision()); } if (this.__planePreviousState == enums.PlaneStates.FLYING && this.__planeCurrentState == enums.PlaneStates.BREAKDOWN) { this.__isCollidingWithPlanes = true; this.__isCollidingWithBonus = true; this.__isCollidingWithBullets = true; this.__isRotateControlEnabled = true; this.__isFireControlEnabled = true; this.__isTakeOffControlEnabled = false; var v4; var v3; v4 = this.__x; v3 = this.__y - 20; var v5; var v7; v5 = 150 + 50 * Math.random(); v7 = 150 + 50 * Math.random(); this.__GFX.PlayGFX(GraphicFX.C_BREAKDOWN_CLOUD, v4, v3, v5, v7); this.PlaceDamageLabel('Stall', this.__x, this.__y - 10, FlyLabels.C_FNT_SIZE_DAMAGE_INFO); this.__SFX.PlayEngineBreakdown(); if (!this.__isAIControlled) { this.__GFX.PlayGFX(GraphicFX.C_BREAKDOWN_ARROW, this.__x, this.__y); } if (this.__isPlaneBuffed && this.__bonusType == enums.BonusTypes.SCREWCUTTER) { } else { this.__clip.airscrew.stop(); } this.__gravityVec.setXY(this.__direction.__x * this.__inDirectionVelocity, this.__direction.__y * this.__inDirectionVelocity); this.__yOld = this.__y; if (this.__isFirstBreakDown && !this.__isAIControlled && GameConfig.getGameType() != enums.GameTypes.TUTORIAL) { WebApi.UnlockAchievement(WebApi.C_ACH_TYPE_OTHER, WebApi.C_ACH_OTHER_ENGINE_STALL); this.__isFirstBreakDown = false; } if (this.__isFirstBreakDown && !this.__isAIControlled && GameConfig.getGameType() == enums.GameTypes.TUTORIAL) { this.__isFirstBreakDown = false; var v6; v6 = new gamemenu.components.HintDialog(this.C_TUTORIAL_FIRST_STALL_HINT_ARR); v6.FadeIn(); } } if (this.__planePreviousState == enums.PlaneStates.FLYING && this.__planeCurrentState == enums.PlaneStates.BULLETHIT) { this.__isCollidingWithPlanes = false; this.__isCollidingWithBonus = false; this.__isCollidingWithBullets = true; this.__isRotateControlEnabled = false; this.__isFireControlEnabled = true; this.__isTakeOffControlEnabled = false; this.__yDirWhenBulletHit = this.__direction.__y; this.__gravityVec.setXY(this.__direction.__x * this.__inDirectionVelocity, this.__direction.__y * this.__inDirectionVelocity); this.__bullethitVelocity = 0; this.__GFX.PlaySmokeTrail(this.__x, this.__y); } if (this.__planePreviousState == enums.PlaneStates.FLYING && this.__planeCurrentState == enums.PlaneStates.EXPLODING) { this.__isCollidingWithPlanes = false; this.__isCollidingWithBonus = false; this.__isCollidingWithBullets = false; this.__isRotateControlEnabled = false; this.__isFireControlEnabled = false; this.__isTakeOffControlEnabled = false; this.__score.UpdateMaxKillingStreak(this.__numOfLives); this.__score.StopSurvivalTimer(); this.ExplodeAndLooseLife(this.isGroundCollision()); } if (this.__planePreviousState == enums.PlaneStates.BREAKDOWN && this.__planeCurrentState == enums.PlaneStates.FLYING) { this.__isCollidingWithPlanes = true; this.__isCollidingWithBonus = true; this.__isCollidingWithBullets = true; this.__isRotateControlEnabled = true; this.__isFireControlEnabled = true; this.__isTakeOffControlEnabled = false; if (this.__isPlaneBuffed && this.__bonusType == enums.BonusTypes.SCREWCUTTER) { } else { this.__clip.airscrew.play(); } if (this.__isFirstRestart && !this.__isAIControlled && !this.__isPlaneBuffed && GameConfig.getGameType() != enums.GameTypes.TUTORIAL) { WebApi.UnlockAchievement(WebApi.C_ACH_TYPE_OTHER, WebApi.C_ACH_OTHER_ENGINE_RESTART); this.__isFirstRestart = false; } this.__SFX.PlayEngineRestart(); this.PlaceDamageLabel('Restarted', this.__x, this.__y, FlyLabels.C_FNT_SIZE_DAMAGE_INFO); this.__driftVec.setXY(0, 0); this.__gravityVec.setXY(0, 1); this.ResetCentrifugalVariables(); if (!this.__isAIControlled) { this.__GFX.StopGFX(GraphicFX.C_BREAKDOWN_ARROW); } } if (this.__planePreviousState == enums.PlaneStates.BREAKDOWN && this.__planeCurrentState == enums.PlaneStates.BULLETHIT) { this.__isCollidingWithPlanes = false; this.__isCollidingWithBonus = false; this.__isCollidingWithBullets = true; this.__isRotateControlEnabled = false; this.__isFireControlEnabled = true; this.__isTakeOffControlEnabled = false; this.__yDirWhenBulletHit = this.__direction.__y; if (!this.__isAIControlled) { this.__GFX.StopGFX(GraphicFX.C_BREAKDOWN_ARROW); } } if (this.__planePreviousState == enums.PlaneStates.BREAKDOWN && this.__planeCurrentState == enums.PlaneStates.EXPLODING) { if (!this.__isAIControlled) { this.__GFX.StopGFX(GraphicFX.C_BREAKDOWN_ARROW); } this.__isCollidingWithPlanes = false; this.__isCollidingWithBonus = false; this.__isCollidingWithBullets = false; this.__isRotateControlEnabled = false; this.__isFireControlEnabled = false; this.__isTakeOffControlEnabled = false; this.__score.UpdateMaxKillingStreak(this.__numOfLives); this.__score.StopSurvivalTimer(); this.ExplodeAndLooseLife(this.isGroundCollision()); } if (this.__planePreviousState == enums.PlaneStates.BULLETHIT && this.__planeCurrentState == enums.PlaneStates.EXPLODING) { this.__isCollidingWithPlanes = false; this.__isCollidingWithBonus = false; this.__isCollidingWithBullets = false; this.__isRotateControlEnabled = false; this.__isFireControlEnabled = false; this.__isTakeOffControlEnabled = false; this.ExplodeAndLooseLife(this.isGroundCollision()); this.__score.UpdateMaxKillingStreak(this.__numOfLives); this.__score.StopSurvivalTimer(); } if (this.__planePreviousState == enums.PlaneStates.EXPLODING && this.__planeCurrentState == enums.PlaneStates.INIT) { this.__isCollidingWithPlanes = false; this.__isCollidingWithBonus = false; this.__isCollidingWithBullets = false; this.__isRotateControlEnabled = false; this.__isFireControlEnabled = false; this.__isTakeOffControlEnabled = true; this.StartingPlanePosition(); this.StartRollingTimer(); } if (this.__planePreviousState == enums.PlaneStates.INIT && this.__planeCurrentState == enums.PlaneStates.END) { this.__score.StopSurvivalTimer(); this.FinishGame(); } if (this.__planePreviousState == enums.PlaneStates.ROLLING && this.__planeCurrentState == enums.PlaneStates.END) { this.__score.StopSurvivalTimer(); this.FinishGame(); } if (this.__planePreviousState == enums.PlaneStates.FLYING && this.__planeCurrentState == enums.PlaneStates.END) { this.__score.StopSurvivalTimer(); this.FinishGame(); } if (this.__planePreviousState == enums.PlaneStates.BREAKDOWN && this.__planeCurrentState == enums.PlaneStates.END) { this.__score.StopSurvivalTimer(); this.FinishGame(); } if (this.__planePreviousState == enums.PlaneStates.BULLETHIT && this.__planeCurrentState == enums.PlaneStates.END) { this.__score.StopSurvivalTimer(); this.FinishGame(); } if (this.__planePreviousState == enums.PlaneStates.EXPLODING && this.__planeCurrentState == enums.PlaneStates.END) { this.__score.StopSurvivalTimer(); this.FinishGame(); } }; v2.FinishGame = function () { this.__isCollidingWithPlanes = false; this.__isCollidingWithBonus = false; this.__isCollidingWithBullets = false; this.__isRotateControlEnabled = false; this.__isFireControlEnabled = false; this.__isTakeOffControlEnabled = false; this.StartingPlanePosition(); this.__score.StopSurvivalTimer(); this.__GFX.HideAll(); this.__frameWhenFinishedGame = FrameMan.getFrameIdx(); this.__SFX.StopAllSoundFX(); this.__planeDamage.RemoveAllDamage(); this.__planeDamage.HideIndicators(); this.__clip._visible = false; this.__shadow._visible = false; GrpMan.unregisterFromGroup(this.__groupId); this.dispatchEvent({'target': this, 'type': AirPlane.EVT_UNIT_DESTROYED, 'objType': this.__obstacleType, 'targType': this.__targetType}); this.DisableRender(); }; v2.ComputePhysics = function () { var v5 = this.isPlanefacedUp(); var v2 = this.isPlanefacedDown(); var v4 = -1 * this.__direction.__y; var v3; v3 = this.__planeDamage.__isEngineDamaged; switch (this.__planeCurrentState) { case enums.PlaneStates.FLYING: if (!this.__isEngineTimerSet && (v5 || v2)) { this.__engineTimer.StartTimer(); this.__isEngineTimerSet = true; } if (this.__isEngineTimerSet && (!v5 && !v2)) { this.__engineTimer.StopTimer(); this.__isEngineTimerSet = false; } if (this.__engineTimer.isChangingToStarted() && v2 && !(this.__isPlaneBuffed && this.__bonusType == enums.BonusTypes.ENGINE_FAILURE) && !v3) { this.__SFX.PlayDivePlane(); } if (this.__engineTimer.isChangingToStopped() && v4 < 0 && !(this.__isPlaneBuffed && this.__bonusType == enums.BonusTypes.ENGINE_FAILURE) && !v3) { this.__SFX.StopDivePlane(); } if (this.__isPlaneBuffed && this.__bonusType == enums.BonusTypes.AFTERBURNER) { return undefined; } if (!v3 && this.__isEngineTimerSet && v2 && this.__engineTimer.TimeIntervalElapsed()) { this.__inDirectionVelocity -= Const.C_G * v4 / 5; } if (this.__isEngineTimerSet && v5 && this.__engineTimer.TimeIntervalElapsed() || this.__isEngineTimerSet && this.__y <= this.C_UP_SCREEN_BORDER_LIMIT) { this.__inDirectionVelocity -= Const.C_G * v4 * v4 / this.c_engineThrust; } if (!v3 && !this.__isEngineStalled && this.__inDirectionVelocity < this.c_normalVelocity && Math.abs(this.__direction.__x) > 0.8 && this.__y >= this.C_UP_SCREEN_BORDER_LIMIT) { this.__inDirectionVelocity += 0.05; } if (this.__y <= 2) { this.__inDirectionVelocity -= Const.C_G / Const.C_SLOW_DOWN_FACED_UP_COEF; } break; case enums.PlaneStates.ROLLING: if (this.__inDirectionVelocity < this.c_startingVelocity) { this.__inDirectionVelocity += 0.2; } } }; v2.StartingPlanePosition = function () { this.__isEngineTimerSet = false; this.__x = this.__defaultx + this.__myWorld.getScrollOriginX(); this.__y = this.__defaulty + this.__myWorld.getScrollOriginY(); this.__inDirectionVelocity = 0; this.__clip._x = this.__x; this.__clip._y = this.__y; this.__clip._rotation = 0; this.__clip._visible = true; this.__clip.airscrew.play(); this.__rotation = this.__clip._rotation; this.MoveShadow(); this.__boundingBoxClip._x = this.__clip._x; this.__boundingBoxClip._y = this.__clip._y; this.__boundingBoxClip._rotation = this.__clip._rotation; this.__boundingBoxBulletsClip._x = this.__clip._x; this.__boundingBoxBulletsClip._y = this.__clip._y; this.__boundingBoxBulletsClip._rotation = this.__clip._rotation; this.__shadow._x = this.__clip._x; this.__shadow._y = Const.C_DEFAULT_Y_POS + 15; this.__shadow._alpha = 70; this.__direction.setX(1); this.__direction.setY(0); if (this.__face_right_orientation == true) { } else { this.__direction.Rotate(this.__angleCorrection); } this.__isPlaneBuffed = false; this.__planeControlSwitch = 1; this.__gravityVec.setXY(0, 1); this.__bullethitVelocity = 0; this.__rotationStep = this.c_rotationStep; this.SetCooldownOnWeapon(entities.weapons.Weapon.C_NORMAL_COOLDOWN); this.ShowHideWeaponSemaphores(true); this.__driftVec.setXY(0, 0); this.__isEngineStalled = false; this.__GFX.StopSmokeTrail(); this.__GFX.StopWreck(); this.ResetCentrifugalVariables(); if (!this.__isAIControlled) { this.__GFX.PlayGFX(GraphicFX.C_PLANE_POINTER_ARROW, this.__x, this.__y); } this.FlipPlane(true, this.__GFX); this.__planeOutOfScreenTimer.StopTimer(); }; v2.Rotate = function (absAngleDeg) { this.__clip._rotation += absAngleDeg; this.__rotation = this.__clip._rotation; this.__boundingBoxClip._rotation = this.__clip._rotation; this.__boundingBoxBulletsClip._rotation = this.__clip._rotation; this.__direction.Rotate(this.__angleCorrection + this.__clip._rotation); if (this.__isPhysXEnabled) { this.ComputeCentrifugalAcceleration(absAngleDeg, this.__direction, this.__inDirectionVelocity); } }; v2.Move = function () { var v16 = this.__direction.__x; var v15 = this.__direction.__y; switch (this.__planeCurrentState) { case enums.PlaneStates.ROLLING: if (this.__planeIdx == enums.PlaneStartPosTypes.AIRSHIP) { this.__gravityVec.__y += Const.C_G * 0.2; if (this.__isRotateControlEnabled == false) { this.__x += this.__gravityVec.__x; this.__y += this.__gravityVec.__y; } if (this.__inDirectionVelocity > 0.2 && this.__isRotateControlEnabled == false) { var v2; var v3; var v10 = this.__inDirectionVelocity * 10; v2 = this.__direction.__x; v3 = this.__direction.__y; v2 *= v10; v3 *= v10; v2 += this.__gravityVec.__x; v3 += this.__gravityVec.__y; var v9; v9 = Math.sqrt(v2 * v2 + v3 * v3); v2 /= v9; v3 /= v9; var v4; v4 = Vector2D.getAlphaDegXY(v2, v3) - this.__angleCorrection; this.__clip._rotation = v4; this.__boundingBoxClip._rotation = v4; this.__boundingBoxBulletsClip._rotation = v4; this.__direction.Rotate(this.__angleCorrection + v4); } } case enums.PlaneStates.FLYING: this.__xOld = this.__x; this.__x += v16 * this.__inDirectionVelocity; this.__y += v15 * this.__inDirectionVelocity; this.__x += this.__driftVec.__x + this.__windVec.__x; this.__y += this.__driftVec.__y + this.__windVec.__y; this.__driftVec.__x *= 0.95; this.__driftVec.__y *= 0.97; if (this.__isPhysXEnabled) { this.ComputeCentrifugalVelocity(); this.__x += this.__velCentrif.__x; this.__y += this.__velCentrif.__y; } break; case enums.PlaneStates.BREAKDOWN: this.__gravityVec.setY(this.__gravityVec.__y + Const.C_G * 0.5); this.__x += this.__gravityVec.__x; this.__y += this.__gravityVec.__y; this.__x += this.__driftVec.__x; this.__y += this.__driftVec.__y; this.__x += this.__windVec.__x; this.__y += this.__windVec.__y; this.__driftVec.__x *= 0.95; this.__driftVec.__y *= 0.97; break; case enums.PlaneStates.BULLETHIT: var v13; var v5; this.__gravityVec.__y += Const.C_G * 0.5; this.__x += this.__gravityVec.__x; v13 = this.__y; this.__y += this.__gravityVec.__y; v5 = this.__y - v13; if (this.__yDirWhenBulletHit <= -0.7 || this.__planePreviousState == enums.PlaneStates.BREAKDOWN) { if (this.__direction.__x > 0) { this.__clip._rotation += 0.5; } else { this.__clip._rotation -= 0.5; } this.__direction.Rotate(this.__angleCorrection + this.__clip._rotation); if (v5 > 3 && v5 < 3.5) { this.__SFX.PlayFallingDopplerFreefall(); } } else { var v14 = 1.5; var v6; v6 = new Vector2D(0, 0); v6.setXY(this.__gravityVec.__x * v14, this.__gravityVec.__y); v6.Normalize(); this.__clip._rotation = v6.getAlphaDeg() - this.__angleCorrection; this.__boundingBoxClip._rotation = this.__clip._rotation; this.__boundingBoxBulletsClip._rotation = this.__clip._rotation; this.__direction.Rotate(this.__angleCorrection + this.__clip._rotation); if (v5 > 2 && v5 < 2.5) { this.__SFX.PlayFallingDopplerParabolic(); } } this.__x += this.__driftVec.__x; this.__y += this.__driftVec.__y; this.__driftVec.setX(this.__driftVec.__x * 0.95); this.__driftVec.setY(this.__driftVec.__y * 0.97); } var v8; var v7; v8 = this.__x; v7 = this.__y; this.__clip._x = v8; this.__clip._y = v7; this.__boundingBoxClip._x = v8; this.__boundingBoxClip._y = v7; this.__boundingBoxBulletsClip._x = v8; this.__boundingBoxBulletsClip._y = v7; if (this.__planeCurrentState == enums.PlaneStates.EXPLODING) { return undefined; } var v11; v11 = Const.C_DEFAULT_Y_POS + 15 - this.__y; if (v11 > 300) { this.__shadow._visible = false; } else { this.__shadow._visible = true; this.__shadow._x = this.__clip._x; var v12; v12 = 70 * UtilMath.getIndirectRatioFncValue(v11, 0, 300); this.__shadow._xscale = v12; this.__shadow._alpha = v12; } }; v2.MoveShadow = function () { if (this.__planeCurrentState == enums.PlaneStates.EXPLODING) { return undefined; } var v2; v2 = Const.C_DEFAULT_Y_POS + 15 - this.__y; if (v2 > 300) { this.__shadow._visible = false; } else { this.__shadow._visible = true; this.__shadow._x = this.__clip._x; var v3; v3 = 70 * UtilMath.getIndirectRatioFncValue(v2, 0, 300); this.__shadow._xscale = v3; this.__shadow._alpha = v3; } }; v2.resetDirectionVector = function () { this.__direction.setX(1); this.__direction.setY(0); if (this.__face_right_orientation == true) { } else { this.__direction.Rotate(this.__angleCorrection); } }; v2.allignDirectionVectorToClip = function () { this.__direction.Rotate(this.__angleCorrection + this.__clip._rotation); }; v2.getBBoxClip = function () { return this.__boundingBoxClip; }; v2.getBBoxBulletsClip = function () { return this.__boundingBoxClip; }; v2.ExplodeAndLooseLife = function (isGroundExplosion) { this.__clip._visible = false; this.__SFX.StopFallingDopplerParabolic(); this.__SFX.StopFallingDopplerFreefall(); this.__SFX.StopDivePlane(); this.__SFX.PlayExplosion(); this.__GFX.PlayExplosion(this.__x, this.__y, isGroundExplosion); this.__GFX.StopNightReflector(); this.__GFX.StopMalicParachuted(); this.__GFX.StopEMPShock(); this.__GFX.StopAfterburnerTrail(); this.__planeOutOfScreenTimer.StopTimer(); this.SetScrewCutterMode(false); if (isGroundExplosion) { this.__GFX.PlayWreck(this.__x, this.__y, this.__clip._rotation); if (this.__isFirstSuicide && !this.__isAIControlled && GameConfig.getGameType() != enums.GameTypes.TUTORIAL && this.__planeCurrentState != enums.PlaneStates.BULLETHIT) { WebApi.UnlockAchievement(WebApi.C_ACH_TYPE_OTHER, WebApi.C_ACH_OTHER_SUICIDER); this.__isFirstSuicide = false; } } this.AddLife(-1); this.__score.UpdateSavedLives(this.__numOfLives); this.setTxtFieldFormat(); this.__score.StopKillTimers(); this.evaluateLastHit(); this.__planeDamage.RemoveAllDamage(); this.ShowHideWeaponSemaphores(false); this.ShowHideDeviceClips(false); return this.__numOfLives; }; v2.AddLife = function (howMany) { this.__numOfLives += howMany; AirPlane.__numTotalLives += howMany; this.__livesTextField.text = AirPlaneFSM.C_LIVES_PREFIX + String(this.__numOfLives); this.setTxtFieldFormat(); }; v2.FireWeaponsPrimary = function () { var v2; var v3; v3 = new Vector2D(1, 0); v3.Rotate(this.__angleCorrection + this.__clip._rotation); v2 = 0; while (v2 < this.__weaponsCount) { if (this.__weaponsArray[v2].isPrimary()) { if (this.__weaponsArray[v2].Fire(this.__x, this.__y, v3, this.__inDirectionVelocity)) { this.__score.AddProjectileFired(); } } ++v2; } }; v2.FireWeaponsSecondary = function () { var v2; var v3; v3 = new Vector2D(1, 0); v3.Rotate(this.__clip._rotation - this.__angleCorrection); v2 = 0; while (v2 < this.__weaponsCount) { if (this.__weaponsArray[v2].isSecondary()) { if (this.__weaponsArray[v2].Fire(this.__x, this.__y, v3, this.__inDirectionVelocity)) { this.__score.AddProjectileFired(); } } ++v2; } }; v2.CheckScreenBordersScroll = function () { var v2; v2 = this.getInArenaPositionX(); var v3; v3 = this.__isRotateDisabledDueToScrollNoWrap; var v4; if (v2 < Const.C_SCENE_MIN_WIDTH - 50) { this.__isRotateDisabledDueToScrollNoWrap = true; this.__isRotateControlEnabled = false; if (this.__face_right_orientation) { this.Rotate(-1 * this.__rotation); } else { this.Rotate(180 - this.__rotation); } } if (v2 > Const.C_SCENE_MAX_WIDTH + 50) { this.__isRotateDisabledDueToScrollNoWrap = true; this.__isRotateControlEnabled = false; if (this.__face_right_orientation) { this.Rotate(180 - this.__rotation); } else { this.Rotate(-1 * this.__rotation); } } if (this.__isRotateDisabledDueToScrollNoWrap) { if (v2 > Const.C_SCENE_MIN_WIDTH + 20 && v2 < Const.C_SCENE_MAX_WIDTH - 20) { this.__isRotateDisabledDueToScrollNoWrap = false; if (this.__planeCurrentState == enums.PlaneStates.FLYING || this.__planeCurrentState == enums.PlaneStates.BREAKDOWN) { this.__isRotateControlEnabled = true; } } } if (this.__y < 0) { this.__y = 0; } if (v3 == false && this.__isRotateDisabledDueToScrollNoWrap == true) { this.__planeOutOfScreenTimer.StartTimer(); } if (v3 == true && this.__isRotateDisabledDueToScrollNoWrap == false) { this.__planeOutOfScreenTimer.StopTimer(); } if (v3 == true || this.__isRotateDisabledDueToScrollNoWrap == true) { this.CheckOutOfScreenTimer(); } }; v2.isFireControlPressed = function () { if (this.__isAIControlled) { return this.__AIAgent.isFirePressed(); } else { if (Key.isDown(this.__Keys.__get__cmdFire()) || Key.isDown(this.__Keys.__get__cmdFire2()) || Key.isDown(this.__Keys.__get__cmdFire3())) { return true; } else { return this.__isMouseBtnLeftPressed; } } }; v2.isFireSecondaryControlPressed = function () { if (this.__isAIControlled) { return this.__AIAgent.isFireSecondaryPressed(); } else { if (Key.isDown(this.__Keys.__get__cmdFireSecondary()) || Key.isDown(this.__Keys.__get__cmdFireSecondary2()) || Key.isDown(this.__Keys.__get__cmdFireSecondary3())) { return true; } else { return false; } } }; v2.isLeftControlPressed = function () { if (this.__isAIControlled) { return this.__AIAgent.isLeftPressed(); } else { if (Key.isDown(this.__Keys.__get__cmdLeft()) || Key.isDown(this.__Keys.__get__cmdLeft2())) { return true; } else { return this.isCCWTurning(); } } }; v2.isRightControlPressed = function () { if (this.__isAIControlled) { return this.__AIAgent.isRightPressed(); } else { if (Key.isDown(this.__Keys.__get__cmdRight()) || Key.isDown(this.__Keys.__get__cmdRight2())) { return true; } else { return this.isCWTurning(); } } }; v2.PlaneMainControl = function () { if (this.__isRotateControlEnabled) { if (this.isLeftControlPressed() && this.isSafeToTurnCCW()) { this.Rotate(-1 * this.__rotationStep * this.__planeControlSwitch); } if (this.isRightControlPressed() && this.isSafeToTurnCW()) { this.Rotate(this.__rotationStep * this.__planeControlSwitch); } } if (this.__isFireControlEnabled) { if (this.isFireControlPressed()) { this.FireWeaponsPrimary(); } if (this.isFireSecondaryControlPressed()) { this.FireWeaponsSecondary(); } } }; v2.Update = function () { this.UpdatePlaneStates(); this.PlaneMainControl(); this.Move(); this.ComputePhysics(); this.CheckScreenBordersFunction(); this.HitTestPlaneByGround(); if (this.__planeCurrentState == enums.PlaneStates.FLYING) { this.UpdateFlipPlane(this.__GFX); } if (this.__isAIControlled) { this.__AIAgent.Update(); } this.__score.Update(); if (AirPlane.C_DEBUG) { var v7; v7 = (AI.Agent(this.getAIAgent())).getStateMachine(); var v5; v5 = v7.getCurStateName(); if (v5 == undefined) { v5 = ''; } var v2; var v4; var v3; if (v5 == 'Flying') { var v9; v9 = AI.States.Flying(v7.getCurrentState()); var v10; v10 = v9.getFlyAgent(); var v8; v8 = v10.getStateMachine(); v2 = v8.getCurStateName(); if (v2 == 'Follow') { var v6; v6 = v8.getCurrentState(); var v14; var v11; v14 = v6.getPrimWpnAgent(); v11 = v6.getSecWpnAgent(); v4 = (AI.StateMachine(v14.getStateMachine())).getCurStateName(); v3 = (AI.StateMachine(v11.getStateMachine())).getCurStateName(); } } if (v2 == undefined) { v2 = ''; } else { v2 = ' - ' + v2; } if (v4 == undefined) { v4 = ''; } else { v4 = ' - ' + v4; } if (v3 == undefined) { v3 = ''; } else { v3 = ' - ' + v3; } this.oldVel = this.vel; this.vel = this.plane.getVelocity(); this.velDiff = this.vel - this.oldVel; this.oldAlt = this.alt; this.alt = this.plane.getAltitude(); this.altDiff = this.alt - this.oldAlt; this.yDir = this.plane.__direction.__y; var v13 = ''; v13 = '\nvel: ' + Number(Math.round(this.vel * 100) / 100) + '\nvDiff:' + Number(Math.round(this.velDiff * 100) / 100) + '\nalt: ' + Number(Math.round(this.alt * 100) / 100) + '\naDiff:' + Number(Math.round(this.altDiff * 100) / 100) + '\nyDir: ' + Number(Math.round(this.yDir * 100) / 100); var v12; v12 = '\nProfile:' + String(this.__AIAgent.getAIProfile()); this.stateTxtField.text = String(v5 + v2 + v4 + v3 + v12); this.stateTxtField._x = this.getXPos() - this.stateTxtField._width * 0.5; this.stateTxtField._y = this.getYPos() - this.stateTxtField._height - 20; this.stateTxtField.setTextFormat(this.txtFmt); } }; v2.SetVelocity = function (velocity) { this.__inDirectionVelocity = velocity; }; v2.SetScrewCutterMode = function (modeState) { if (modeState) { this.__GFX.PlayScrewcutter(this.__x, this.__y, this.__rotation + this.__angleCorrection); } else { this.__GFX.StopScrewcutter(); } }; v2.SFXPlayGoodBonus = function () { this.__SFX.PlayGoodBonus(); }; v2.SFXPlayBadBonus = function () { this.__SFX.PlayBadBonus(); }; v2.HitTestPlaneByPlane = function (otherPlane) { if (!(otherPlane.getCurrentState() == enums.PlaneStates.BULLETHIT || this.isInScrewCutterMode())) { return undefined; } if (!(this.__isCollidingWithPlanes && otherPlane.isCollidingWithPlanes())) { return undefined; } if (this.isInAfterburnerMode() || otherPlane.isInAfterburnerMode()) { return undefined; } if (!(Math.abs(this.__x - otherPlane.__x) < Const.C_HITTEST_COMPUTE_DISTANCE && Math.abs(this.__y - otherPlane.__y) < Const.C_HITTEST_COMPUTE_DISTANCE)) { return undefined; } var v4; var v3; v3 = this.__boundingBoxClip; v4 = v3.hitTest(otherPlane.getBBoxClip()); if (v4) { if (this.isInScrewCutterMode()) { if (otherPlane.getCurrentState() == enums.PlaneStates.FLYING || otherPlane.getCurrentState() == enums.PlaneStates.BREAKDOWN) { this.ScoreAddKills(this.__obstacleType); } this.ScoreAddBonusKills(); otherPlane.ForceToExploding(); } else { if (otherPlane.isInScrewCutterMode()) { if (this.getCurrentState() == enums.PlaneStates.FLYING || this.getCurrentState() == enums.PlaneStates.BREAKDOWN) { otherPlane.ScoreAddKills(this.__obstacleType); } otherPlane.ScoreAddBonusKills(); this.ChangePlaneState(enums.PlaneStates.EXPLODING); } else { this.DebuffMe(); this.ChangePlaneState(enums.PlaneStates.EXPLODING); otherPlane.ForceToExploding(); } } } }; v2.HitTestPlaneByBullet2 = function (mpArr, arrSize) { var v4; var v7; v7 = this.__boundingBoxClip; var v3; var v6; var v10; var v2; var v5; v6 = arrSize; v3 = 0; while (v3 < v6) { v2 = mpArr[v3]; v5 = v2.getParentPlane(); if (v5 == this) { v4 = false; goto 30222; } else { v4 = v2.isCollision(v7); } if (v4 && this.__isCollidingWithBullets) { this.HandleWeaponDamage2(v2, v5); } label 30222: ++v3; } }; v2.HandleWeaponDamage2 = function (prj, otherPlane) { otherPlane.ScoreAddProjectileHit(); this.storeLastHit(otherPlane, prj.getItemId()); var v3; v3 = prj.getDamageTypeCausedArray(this.__x, this.__y, this.__direction); if (this.__planeCurrentState == enums.PlaneStates.BULLETHIT || this.isInScrewCutterMode()) { return undefined; } var v10; v10 = v3.length; var v9; v9 = v3[0].length; v9 = (v9 == undefined) ? 1 : v9; var v6 = false; var v7 = v9; if (v9 > 1) { v6 = true; v7 = v10; } var v2; var v4; var v5; v2 = 0; while (v2 < v7) { if (v6) { v4 = v3[v2][0]; v5 = v3[v2][1]; } else { v4 = v3[0]; v5 = v3[1]; } this.ApplyDamageTypeAndSizeOnPlane(v4, v5, otherPlane); ++v2; } }; v2.ApplyDamageTypeAndSizeOnPlane = function (dmgType, dmgSize, otherPlane) { if (this.__planeCurrentState == enums.PlaneStates.BULLETHIT) { return undefined; } var v4; var v3; v4 = this.__x - 10 + 20 * Math.random(); v3 = this.__y - 10 - 20 * Math.random(); var v2; switch (dmgType) { case enums.DamageTypes.MINOR: this.PlaceDamageLabel('Miss', v4, v3, FlyLabels.C_FNT_SIZE_DAMAGE_INFO); break; case enums.DamageTypes.ENGINE: v2 = this.__planeDamage.AddDamage(enums.DamageTypes.ENGINE, dmgSize); if (v2 >= this.c_maxHitsToComponent) { this.PlaceDamageLabel('Engine destroyed', v4, v3, FlyLabels.C_FNT_SIZE_DAMAGE_INFO); this.ForceToBulletHit(otherPlane); this.DevicesExecuteNow(enums.ItemTypes.EMERGENCY_PARACHUTE); } else { this.ApplyDamageToPhysicalModel(enums.DamageTypes.ENGINE, dmgSize); } break; case enums.DamageTypes.TAIL: v2 = this.__planeDamage.AddDamage(enums.DamageTypes.TAIL, dmgSize); if (v2 >= this.c_maxHitsToComponent) { this.PlaceDamageLabel('Tail destroyed', v4, v3, FlyLabels.C_FNT_SIZE_DAMAGE_INFO); this.ForceToBulletHit(otherPlane); this.DevicesExecuteNow(enums.ItemTypes.EMERGENCY_PARACHUTE); } else { this.ApplyDamageToPhysicalModel(enums.DamageTypes.TAIL, dmgSize); } break; case enums.DamageTypes.GUN: if (this.__planeDamage.getDamageHits(enums.DamageTypes.GUN) < this.c_maxHitsToComponent) { v2 = this.__planeDamage.AddDamage(enums.DamageTypes.GUN, dmgSize); if (v2 >= this.c_maxHitsToComponent) { this.PlaceDamageLabel('Gun destroyed', v4, v3, FlyLabels.C_FNT_SIZE_DAMAGE_INFO); } this.ApplyDamageToPhysicalModel(enums.DamageTypes.GUN, dmgSize); } break; case enums.DamageTypes.PILOT: this.PlaceDamageLabel('Pilot hit!', v4, v3, FlyLabels.C_FNT_SIZE_DAMAGE_INFO); otherPlane.SetAchPilotKiller(); v2 = this.__planeDamage.AddDamage(enums.DamageTypes.PILOT); this.ForceToBulletHit(otherPlane); break; case enums.DamageTypes.EMP_STALL: this.ForceStallEngine(this.C_EMP_HIT_STALL_TIME, this.C_EMP_HIT_STALL_TYPE); this.__GFX.PlayEMPShock(this.__x, this.__y, this.__rotation); break; case enums.DamageTypes.MALICIOUS_PARACHUTE_STALL: this.ForceStallEngine(this.C_MALICIOUS_PARACHUTE_HIT_STALL_TIME, this.C_MALICIOUS_PARACHUTE_HIT_STALL_TYPE); this.__GFX.PlayMalicParachuted(this.__x, this.__y, this.__rotation); break; case enums.DamageTypes.ACOUSTIC_KNOCKBACK: this.KnockBackPlane(otherPlane, otherPlane); } }; v2.ForceToBulletHit = function (otherPlane) { this.DebuffMe(); this.ChangePlaneState(enums.PlaneStates.BULLETHIT); if (this == otherPlane) { } else { otherPlane.ScoreAddKills(this.getObstacleType()); otherPlane.ScoreAddBonusKills(); } }; v2.ForceStallEngine = function (miliseconds, stallType) { this.ResetCentrifugalVariables(); if (this.__planeCurrentState == enums.PlaneStates.BREAKDOWN || this.__planeCurrentState == enums.PlaneStates.BULLETHIT) { return undefined; } this.__stalledEngineTimer.SetTriggerTime(miliseconds); this.__stalledEngineTimer.StartTimer(); this.__isEngineStalled = true; this.__stallType = stallType; this.ChangePlaneState(enums.PlaneStates.BREAKDOWN); }; v2.KnockBackPlane = function (planeToKnockBack, planeWithAcousticRifle) { this.ResetCentrifugalVariables(); this.ForceStallEngine(this.C_ACOUSTIC_RIFLE_HIT_STALL_TIME, this.C_ACOUSTIC_RIFLE_HIT_STALL_TYPE); var v2; v2 = new Vector2D(planeWithAcousticRifle.getXPos() - this.__x, planeWithAcousticRifle.getYPos() - this.__y); var v4; v4 = v2.Length(); var v3; v3 = UtilMath.getIndirectRatioFncValue(v4, 0, 250) * 10; v2.Normalize(); v2.Multiply(-1 * v3); this.__direction.setVec(v2); this.__inDirectionVelocity = v2.Length(); this.__gravityVec.setVec(v2); }; v2.HitTestPlaneByGround = function () { if (this.__planeCurrentState == enums.PlaneStates.EXPLODING) { return undefined; } if (this.__y > Const.C_SCENE_HEIGHT - 30) { this.DebuffMe(); this.ChangePlaneState(enums.PlaneStates.EXPLODING); } }; v2.HitTestPlaneByBonus = function (bonusObj) { if (!this.__isCollidingWithBonus) { return undefined; } if (!bonusObj.isCatchable()) { return undefined; } var v3; var v8; var v5; var v10; v8 = this.getBBoxClip(); v5 = bonusObj.GetBonusParachuteBBoxClip(); v10 = bonusObj.GetBonusCrateBBoxClip(); v3 = v8.hitTest(v5); if (v3 && this.__isCollidingWithBonus) { bonusObj.ChangeToFreeFall(); } v3 = v8.hitTest(v10); if (v3 && this.__isCollidingWithBonus) { bonusObj.ChangeToActivated(this); } var v9; v9 = bonusObj.GetBonusCurrentState(); if (v9 == enums.BonusStates.FREEFALL) { return undefined; } var v7; v7 = this.__weaponsArray; var v2; var v6; v6 = this.__weaponsCount; v2 = 0; while (v2 < v6) { v3 = v7[v2].isCollision(v5); if (v3 && this.__isCollidingWithBonus) { bonusObj.ChangeToFreeFall(); } ++v2; } }; v2.BuffMe = function (bonusType) { if (!this.__isPlaneBuffed) { this.__isPlaneBuffed = true; this.__bonusType = bonusType; } switch (this.__bonusType) { case enums.BonusTypes.AFTERBURNER: this.__GFX.PlayAfterburnerTrail(this.__x, this.__y, this.__rotation + this.__angleCorrection); this.SetCollisionWithBullets(true); this.__SFX.PlayAfterburnerWindBlow(); break; case enums.BonusTypes.GUN_BERSERK: this.__GFX.PlayGFX(GraphicFX.C_GUN_BERSERK_INDICATOR); break; case enums.BonusTypes.GUN_JAM: this.__GFX.PlayGFX(GraphicFX.C_GUN_JAM_INDICATOR); break; case enums.BonusTypes.DRUNKEN_PILOT: this.__GFX.PlayGFX(GraphicFX.C_DRUNKEN_PILOT_INDICATOR); break; case enums.BonusTypes.SCREWCUTTER: this.__SFX.PlayBurningScrew(); } }; v2.DebuffMe = function () { if (this.__isPlaneBuffed) { this.__isPlaneBuffed = false; switch (this.__bonusType) { case enums.BonusTypes.AFTERBURNER: this.__GFX.StopAfterburnerTrail(); this.SetCollisionWithBullets(true); this.__SFX.StopAfterburnerWindBlow(); break; case enums.BonusTypes.GUN_BERSERK: this.__GFX.StopGFX(GraphicFX.C_GUN_BERSERK_INDICATOR); break; case enums.BonusTypes.GUN_JAM: this.__GFX.StopGFX(GraphicFX.C_GUN_JAM_INDICATOR); break; case enums.BonusTypes.DRUNKEN_PILOT: this.__GFX.StopGFX(GraphicFX.C_DRUNKEN_PILOT_INDICATOR); break; case enums.BonusTypes.SCREWCUTTER: this.__GFX.PlaneAirScrewCutterReset(this.__clip); this.__SFX.StopBurningScrew(); } this.__bonusType = -1; } }; v2.ProcessPlaneBuffGFX = function () { switch (this.__bonusType) { case enums.BonusTypes.AFTERBURNER: this.__GFX.UpdateAfterburnerTrail(this.__x, this.__y, this.__direction, this.__rotation + this.__angleCorrection); break; case enums.BonusTypes.ENGINE_FAILURE: if (!(this.__isEngineTimerSet && this.isPlanefacedUp() && this.__engineTimer.TimeIntervalElapsed() || this.__isEngineTimerSet && this.__y <= 2)) { this.__inDirectionVelocity = this.c_minimalVelocity + 0.5; } } }; v2.SetDrunkenPilotMode = function (modeEnable) { if (modeEnable) { this.__planeControlSwitch = -1; } else { this.__planeControlSwitch = 1; } }; v2.ForceToExploding = function () { if (this.__planeCurrentState != enums.PlaneStates.EXPLODING) { this.DebuffMe(); this.ChangePlaneState(enums.PlaneStates.EXPLODING); } }; v2.ForceToEnd = function () { if (this.__planeCurrentState != enums.PlaneStates.END) { this.ChangePlaneState(enums.PlaneStates.END); return true; } else { return false; } }; v2.isCollidingWithPlanes = function () { return this.__isCollidingWithPlanes; }; v2.SetCollisionWithBullets = function (isColliding) { this.__isCollidingWithBullets = isColliding; }; v2.ScoreAddKills = function (obstacleType) { this.__score.AddKills(obstacleType, this.__numOfLives); }; v2.ScoreAddBonusKills = function () { this.__score.AddBonusKills(); }; v2.ScoreAddProjectileHit = function () { this.__score.AddProjectileHit(); }; v2.isInScrewCutterMode = function () { if (this.__isPlaneBuffed && this.__bonusType == enums.BonusTypes.SCREWCUTTER) { return true; } else { return false; } }; v2.isInAfterburnerMode = function () { if (this.__isPlaneBuffed && this.__bonusType == enums.BonusTypes.AFTERBURNER) { return true; } else { return false; } }; v2.isPlanePositivelyBuffed = function () { if (this.__isPlaneBuffed) { switch (this.__bonusType) { case enums.BonusTypes.GUN_BERSERK: case enums.BonusTypes.AFTERBURNER: case enums.BonusTypes.SCREWCUTTER: case enums.BonusTypes.DRUNKEN_PILOT: return true; break; case enums.BonusTypes.GUN_JAM: case enums.BonusTypes.ENGINE_FAILURE: case enums.BonusTypes.ENGINE_JAM: return false; } } else { return false; } }; v2.getXPos = function () { return this.__x; }; v2.getYPos = function () { return this.__y; }; v2.getX = function () { return this.__x; }; v2.getY = function () { return this.__y; }; v2.getDirection = function () { return this.__direction; }; v2.getDirectionX = function () { return this.__direction.__x; }; v2.getDirectionY = function () { return this.__direction.__y; }; v2.getVelocity = function () { return this.__inDirectionVelocity; }; v2.setVelocity = function (velocity) { this.__inDirectionVelocity = velocity; }; v2.getPlaneIdx = function () { return this.__planeIdx; }; v2.getRotationStep = function () { return this.__rotationStep; }; v2.setRotationStep = function (rotationStep) { this.__rotationStep = rotationStep; }; v2.getCurrentState = function () { return this.__planeCurrentState; }; v2.getPreviousState = function () { return this.__planePreviousState; }; v2.getBuffType = function () { return this.__bonusType; }; v2.GetTotalScore = function () { return 0; }; v2.AddExtraLife = function () { ++this.__numOfLives; this.__livesTextField.text = AirPlaneFSM.C_LIVES_PREFIX + String(this.__numOfLives); this.setTxtFieldFormat(); }; v2.getMyIndex = function () { return this.__planeIdx; }; v2.getLives = function () { return this.__numOfLives; }; v2.isAIControlled = function () { return this.__isAIControlled; }; v2.StartRollingTimer = function () { this.__forceRollingTimer.StartTimer(); this.__forceRollingClock.Start(); }; v2.getSFXObject = function () { return this.__SFX; }; v2.getFrameWhenFinishedGame = function () { return this.__frameWhenFinishedGame; }; v2.getPlaneColor = function () { return this.__planeColor; }; v2.PlaceDamageLabel = function (txt, bulletX, bulletY, fontsize, color) { var v2; if (color == undefined) { v2 = this.getPlaneColor(); } else { v2 = color; } var v5; var v6; var v4; var v3; v3 = 0.8 + 0.2 * Math.random(); v5 = v2 >> 16; v6 = v2 >> 8 & 255; v4 = v2 & 255; v5 *= v3; v6 *= v3; v4 *= v3; color = v5 << 16 | v6 << 8 | v4; var v7; v7 = this.__myWorld.__flyLabels.PlaceLabel(bulletX, bulletY - 15 * Math.random(), txt); FlyLabels.SetLabelColor(v7, color); FlyLabels.SetLabelFormat(v7, fontsize, undefined, undefined); }; v2.ApplyDamageToPhysicalModel = function (damageType, dmgSize) { switch (damageType) { case enums.DamageTypes.ENGINE: this.SetVelocity(this.__inDirectionVelocity * Math.pow(Damage.C_SPEED_CRIPPLE_COEF, dmgSize)); break; case enums.DamageTypes.TAIL: this.__rotationStep *= Math.pow(Damage.C_AGILITY_CRIPPLE_COEF, dmgSize); break; case enums.DamageTypes.GUN: if (this.__planeDamage.getDamageHits(enums.DamageTypes.GUN) >= this.c_maxHitsToComponent) { this.SetCooldownOnWeapon(entities.weapons.Weapon.C_HIGH_COOLDOWN, this.__planeDamage.getDamageHits(enums.DamageTypes.GUN)); } else { this.SetCooldownOnWeapon(entities.weapons.Weapon.C_ADJUST_TO_CURRENT_DAMAGE, this.__planeDamage.getDamageHits(enums.DamageTypes.GUN)); } } }; v2.RemoveAllDamageFromPhysicalModel = function () { if (!this.__planeDamage.isDamaged()) { return undefined; } this.PlaceDamageLabel('Damage repaired', this.__x, this.__y + 5, FlyLabels.C_FNT_SIZE_DAMAGE_INFO, Const.C_COLOR_GREEN); if (this.__planeDamage.isDamaged(enums.DamageTypes.ENGINE)) { this.SetVelocity(this.c_normalVelocity); } if (this.__planeDamage.isDamaged(enums.DamageTypes.TAIL)) { this.__rotationStep = this.c_rotationStep; } if (this.__planeDamage.isDamaged(enums.DamageTypes.GUN)) { this.SetCooldownOnWeapon(entities.weapons.Weapon.C_NORMAL_COOLDOWN); } this.__planeDamage.RemoveAllDamage(); }; v2.isDamaged = function (damageType) { return this.__planeDamage.isDamaged(damageType); }; v2.RemoveAllDamageFromPlane = function () { this.__planeDamage.RemoveAllDamage(); }; v2.UpdateDamageGFX = function () { if (!this.__planeDamage.isDamaged()) { return undefined; } this.__GFX.UpdateSmokeTrail(this.__x, this.__y); }; v1.getPlanePosXFromIdx = function (idx) { return 220 * idx + 65; }; v1.getPlanePosYFromIdx = function (idx) { return Const.C_DEFAULT_Y_POS; }; v2.getClip = function () { return this.__clip; }; v2.getParent = function () { return this.__myWorld; }; v2.getScoreObj = function () { return this.__score; }; v2.Scroll = function (scrollCoef, xDiff, yDiff) { this.__x += scrollCoef * xDiff; this.__y += scrollCoef * yDiff; LayMan.ScrollClip(this.__clip, scrollCoef, xDiff, yDiff); LayMan.ScrollClip(this.__shadow, scrollCoef, xDiff, yDiff); LayMan.ScrollClip(this.__boundingBoxClip, scrollCoef, xDiff, yDiff); LayMan.ScrollClip(this.__boundingBoxBulletsClip, scrollCoef, xDiff, yDiff); var v2; v2 = 0; while (v2 < this.__weaponsCount) { this.__weaponsArray[v2].Scroll(scrollCoef, xDiff, yDiff); ++v2; } v2 = 0; while (v2 < this.__weaponsCount) { this.__devicesArray[v2].Scroll(scrollCoef, xDiff, yDiff); ++v2; } this.__GFX.Scroll(scrollCoef, xDiff, yDiff); }; v2.getXDiff = function () { return this.__x - this.__xOld; }; v2.isFireControlEnabled = function () { return this.__isFireControlEnabled; }; v2.getWeaponsArray = function () { return this.__weaponsArray; }; v2.getWeaponsCount = function () { return this.__weaponsCount; }; v2.getRotation = function () { return this.__rotation; }; v2.getClipRotation = function () { return this.__clip._rotation; }; v2.getAngleCorrection = function () { return this.__angleCorrection; }; v2.getDamageObj = function () { return this.__planeDamage; }; v2.ShowHideWeaponSemaphores = function (isShowed) { var v2; v2 = 0; while (v2 < this.__weaponsCount) { this.__weaponsArray[v2].ShowHideSemaphore(isShowed); ++v2; } }; v2.ShowHideDeviceClips = function (isShowed) { var v2; v2 = 0; while (v2 < this.__devicesCount) { this.__devicesArray[v2].ShowHideClips(isShowed); ++v2; } }; v2.isCollidingWithBullets = function () { return this.__isCollidingWithBullets; }; v2.AddDrift = function (driftVec) { this.__driftVec.Add(driftVec); }; v2.getDefaultPosX = function () { return this.__defaultx; }; v2.getDefaultPosY = function () { return this.__defaulty; }; v2.getFaceRightOrientation = function () { return this.__face_right_orientation; }; v2.FinishScoreComputing = function (timeLeft) { if (this.getCurrentState() != enums.PlaneStates.END) { this.__score.StopSurvivalTimer(); this.__score.UpdateMaxKillingStreak(this.__numOfLives); this.__score.UpdateSavedLives(this.__numOfLives); this.__score.UpdateTimeLeft(timeLeft); this.__score.ComputeAndSave(); } }; v2.getPlaneConfig = function () { return this.__planeConfig; }; v2.Destroy = function () { LayMan.RemoveClip(this.__clip); LayMan.RemoveClip(this.__shadow); LayMan.RemoveClip(this.__boundingBoxClip); LayMan.RemoveClip(this.__boundingBoxBulletsClip); LayMan.RemoveTextField(this.__livesTextField); LayMan.RemoveClip(this.debugDrawMC); var v2; var v3; v3 = this.__weaponsArray.length; v2 = 0; while (v2 < v3) { this.__weaponsArray[v2].Destroy(); ++v2; } v3 = this.__devicesArray.length; v2 = 0; while (v2 < v3) { this.__devicesArray[v2].Destroy(); ++v2; } if (this.__AIAgent != undefined) { this.__AIAgent.Destroy(); } this.__score.Destroy(); this.__planeDamage.Destroy(); this.__GFX.Destroy(); this.__SFX.Destroy(); this.__AIAgent.Destroy(); this.DestroyMouse(); }; v2.Pause = function (evtObj) { if (evtObj.state == true) { if (this.__clip._visible) { } } else { if (this.__clip._visible) { } } }; v2.EnableRender = function () {}; v2.DisableRender = function () {}; v2.getKeyControlType = function () { return this.__keyControlType; }; v2.getPlaneType = function () { return this.__planeType; }; } else { goto 40417; } storedv2.SetAchPilotKiller = function () { if (this.__isFirstPilotHit && !this.__isAIControlled) { WebApi.UnlockAchievement(WebApi.C_ACH_TYPE_OTHER, WebApi.C_ACH_OTHER_PILOTHIT); this.__isFirstPilotHit = false; } }; storedv2.C_TUTORIAL_FIRST_STALL_HINT_ARR = ['S_HGLD_STALL', 'S_HGLD_RECOVERY']; storedv1.C_DEBUG = false; storedv1.EVT_UNIT_DESTROYED = 'EVT_UNIT_DESTROYED'; storedv2.C_UP_SCREEN_BORDER_LIMIT = 10; storedv1.__numTotalLives = 0; storedv2.__isFirstBreakDown = true; storedv2.__isFirstRestart = true; storedv2.__isFirstSuicide = true; storedv2.__isFirstPilotHit = true; label 40417: ASSetPropFlags(_global.AirPlane.prototype, null, 1); #endinitclip } movieClip 1815 __Packages.config.levels.LevelTutorial { #initclip if (!_global.config) { _global.config = new Object(); } if (!_global.config.levels) { _global.config.levels = new Object(); } if (!_global.config.levels.LevelTutorial) { var v1 = function (levelId, gameConfig) { this.__gameConfig = gameConfig; this.c = new config.levels.LevelConfig(); this.c.setConfigItem(config.levels.LevelConfig.TITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_TITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.SUBTITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_SUBTITLE_TXT)); this.c.setConfigItemArr(config.levels.LevelConfig.OBJECTIVE_CLIP_DESC, ['S_MISSION_OBJECTIVE', undefined, 'S_MISSION_OBJECTIVE', undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_OBJECTIVE_TXT)]); this.c.setConfigItemArr(config.levels.LevelConfig.WEATHER_CLIP_DESC, ['S_MISSION_OBJECTIVE', undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_WEATHER_TXT)]); this.c.setConfigItemArr(config.levels.LevelConfig.HINTS_CLIP_DESC, ['S_MISSION_OBJECTIVE', undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_HINT_TXT)]); this.c.setConfigItem(config.levels.LevelConfig.LOCATION, enums.LocationTypes.NEVADA_DESERT); this.c.setConfigItem(config.levels.LevelConfig.WEATHER, enums.WeatherTypes.SUNNY); this.c.setConfigItem(config.levels.LevelConfig.WIND_DIR, new Vector2D(0, 0)); switch (this.__gameConfig.getGeneralControlsType()) { case enums.DefaultKeyTypes.MOUSE: this.c.setConfigItemArr(config.levels.LevelConfig.HINT_DIALOG_ARRAY, ['S_HGLD_TUTORIAL_PLANE', 'S_HGLD_TUTORIAL_LIVES', 'S_HGLD_TUTORIAL_SCORE', 'S_HGLD_MOUSE_CONTROLS']); break; case enums.DefaultKeyTypes.LEFT_UP_RIGHT: this.c.setConfigItemArr(config.levels.LevelConfig.HINT_DIALOG_ARRAY, ['S_HGLD_TUTORIAL_PLANE', 'S_HGLD_TUTORIAL_LIVES', 'S_HGLD_TUTORIAL_SCORE', 'S_HGLD_ARROW_CONTROLS_M', 'S_HGLD_ARROW_CONTROLS_F']); } var v2; v2 = new Array(); var v3 = 100; var v4; v4 = new Array(); v4[entities.Obstacles.Ring.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.RING; v4[entities.Obstacles.Ring.C_ARG_TYPE_X] = 1000; v4[entities.Obstacles.Ring.C_ARG_TYPE_Y] = v3; v4[entities.Obstacles.Ring.C_ARG_TYPE_ROTATION] = 0; v4[entities.Obstacles.Ring.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v4[entities.Obstacles.Ring.C_ARG_TYPE_GROUP_ID] = 1; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.Ring.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.RING; v4[entities.Obstacles.Ring.C_ARG_TYPE_X] = 1200; v4[entities.Obstacles.Ring.C_ARG_TYPE_Y] = v3; v4[entities.Obstacles.Ring.C_ARG_TYPE_ROTATION] = 0; v4[entities.Obstacles.Ring.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v4[entities.Obstacles.Ring.C_ARG_TYPE_GROUP_ID] = 1; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.Ring.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.RING; v4[entities.Obstacles.Ring.C_ARG_TYPE_X] = 1400; v4[entities.Obstacles.Ring.C_ARG_TYPE_Y] = v3; v4[entities.Obstacles.Ring.C_ARG_TYPE_ROTATION] = 45; v4[entities.Obstacles.Ring.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v4[entities.Obstacles.Ring.C_ARG_TYPE_GROUP_ID] = 1; v2.push(v4); v3 += 200; v4 = new Array(); v4[entities.Obstacles.Ring.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.RING; v4[entities.Obstacles.Ring.C_ARG_TYPE_X] = 1400; v4[entities.Obstacles.Ring.C_ARG_TYPE_Y] = v3; v4[entities.Obstacles.Ring.C_ARG_TYPE_ROTATION] = 90; v4[entities.Obstacles.Ring.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v4[entities.Obstacles.Ring.C_ARG_TYPE_GROUP_ID] = 1; v2.push(v4); v3 += 200; v4 = new Array(); v4[entities.Obstacles.Ring.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.RING; v4[entities.Obstacles.Ring.C_ARG_TYPE_X] = 1400; v4[entities.Obstacles.Ring.C_ARG_TYPE_Y] = v3; v4[entities.Obstacles.Ring.C_ARG_TYPE_ROTATION] = -45; v4[entities.Obstacles.Ring.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v4[entities.Obstacles.Ring.C_ARG_TYPE_GROUP_ID] = 1; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.Ring.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.RING; v4[entities.Obstacles.Ring.C_ARG_TYPE_X] = 1200; v4[entities.Obstacles.Ring.C_ARG_TYPE_Y] = v3; v4[entities.Obstacles.Ring.C_ARG_TYPE_ROTATION] = 0; v4[entities.Obstacles.Ring.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v4[entities.Obstacles.Ring.C_ARG_TYPE_GROUP_ID] = 1; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.Ring.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.RING; v4[entities.Obstacles.Ring.C_ARG_TYPE_X] = 1000; v4[entities.Obstacles.Ring.C_ARG_TYPE_Y] = v3; v4[entities.Obstacles.Ring.C_ARG_TYPE_ROTATION] = 0; v4[entities.Obstacles.Ring.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v4[entities.Obstacles.Ring.C_ARG_TYPE_GROUP_ID] = 1; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v4[entities.Obstacles.Target.C_ARG_TYPE_X] = -550; v4[entities.Obstacles.Target.C_ARG_TYPE_Y] = 100; v4[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 1; v4[entities.Obstacles.Target.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v4[entities.Obstacles.Target.C_ARG_TYPE_GROUP_ID] = 2; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v4[entities.Obstacles.Target.C_ARG_TYPE_X] = -550; v4[entities.Obstacles.Target.C_ARG_TYPE_Y] = 500; v4[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 1; v4[entities.Obstacles.Target.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v4[entities.Obstacles.Target.C_ARG_TYPE_GROUP_ID] = 2; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.Baloon.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BALOON; v4[entities.Obstacles.Baloon.C_ARG_TYPE_X] = -500; v4[entities.Obstacles.Baloon.C_ARG_TYPE_Y] = 250; v4[entities.Obstacles.Baloon.C_ARG_TYPE_VELOCITY] = 0; v4[entities.Obstacles.Baloon.C_ARG_TYPE_DIRECTION] = new Vector2D(1, 0); v4[entities.Obstacles.Baloon.C_ARG_TYPE_HITPOINTS] = 4; v4[entities.Obstacles.Baloon.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v4[entities.Obstacles.Baloon.C_ARG_TYPE_ON_TEXT] = 'BOMB ME!'; v4[entities.Obstacles.Baloon.C_ARG_TYPE_GROUP_ID] = 2; v2.push(v4); var v5; switch (this.__gameConfig.getGeneralControlsType()) { case enums.DefaultKeyTypes.MOUSE: v5 = 'S_INFO_CONTROLS_MOUSE'; break; case enums.DefaultKeyTypes.LEFT_UP_RIGHT: v5 = 'S_INFO_CONTROLS_ARROWS'; } v4 = new Array(); v4[entities.Obstacles.InfoTable.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.INFO_TABLE; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_X] = 700; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_Y] = 300; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_CLIP_NAME] = 'S_INFO_FLY_HERE_RIGHT'; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_AUTO_FLY_IN_TIME] = undefined; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_AUTO_FLY_OUT_TIME] = undefined; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_CYCLE_TIME] = undefined; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_FLY_IN_GROUP_ID] = undefined; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_FLY_OUT_GROUP_ID] = 1; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_GROUP_ID] = undefined; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.InfoTable.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.INFO_TABLE; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_X] = 1000; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_Y] = 200; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_CLIP_NAME] = 'S_INFO_TUT_TASK_RINGS'; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_AUTO_FLY_IN_TIME] = undefined; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_AUTO_FLY_OUT_TIME] = undefined; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_CYCLE_TIME] = undefined; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_FLY_IN_GROUP_ID] = undefined; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_FLY_OUT_GROUP_ID] = 1; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_GROUP_ID] = undefined; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.InfoTable.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.INFO_TABLE; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_X] = 900; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_Y] = 250; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_CLIP_NAME] = 'S_INFO_FLY_HERE_LEFT'; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_AUTO_FLY_IN_TIME] = undefined; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_AUTO_FLY_OUT_TIME] = undefined; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_CYCLE_TIME] = undefined; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_FLY_IN_GROUP_ID] = 1; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_FLY_OUT_GROUP_ID] = undefined; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_GROUP_ID] = undefined; v2.push(v4); switch (this.__gameConfig.getGeneralControlsType()) { case enums.DefaultKeyTypes.MOUSE: v5 = 'S_INFO_TUT_TASK_TARGETS_MOUSE'; break; case enums.DefaultKeyTypes.LEFT_UP_RIGHT: v5 = 'S_INFO_TUT_TASK_TARGETS_ARROWS'; } v4 = new Array(); v4[entities.Obstacles.InfoTable.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.INFO_TABLE; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_X] = -300; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_Y] = 200; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_CLIP_NAME] = v5; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_AUTO_FLY_IN_TIME] = undefined; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_AUTO_FLY_OUT_TIME] = undefined; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_CYCLE_TIME] = undefined; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_FLY_IN_GROUP_ID] = 1; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_FLY_OUT_GROUP_ID] = 2; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_GROUP_ID] = undefined; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.InfoTable.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.INFO_TABLE; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_X] = -500; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_Y] = 200; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_CLIP_NAME] = 'S_INFO_FLY_HERE_RIGHT'; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_AUTO_FLY_IN_TIME] = undefined; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_AUTO_FLY_OUT_TIME] = undefined; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_CYCLE_TIME] = undefined; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_FLY_IN_GROUP_ID] = 2; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_FLY_OUT_GROUP_ID] = undefined; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_GROUP_ID] = undefined; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v4[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 400; v4[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v4[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_HANGAR'; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v4[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 500; v4[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v4[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_WIND_RIBBON'; v4[entities.Obstacles.StaticObs.C_ARG_SCALE] = -70; v2.push(v4); this.c.setConfigItemArr(config.levels.LevelConfig.AIR_OBSTACLES_ARRAY, v2); var v7; v7 = new PlaneConfig(enums.PlaneTypes.HANRIOT, enums.PlaneStartPosTypes.FIRST, this.__gameConfig.getGeneralControlsType(), undefined, config.levels.WorldConfig.C_TUTORIAL_NUM_OF_LIVES, undefined, enums.TargetTypes.NONE); v7.setPlaneAttributes(3, 0, 1, 1, 0); v7.setPlaneItemList([enums.ItemTypes.MACHINE_GUN, enums.ItemTypes.IMPACT_BOMBS]); this.c.setConfigItemArr(config.levels.LevelConfig.PLANES_POS_AND_CONF, new Array(v7)); this.c.setConfigItem(config.levels.LevelConfig.ARENA_SIZE_TYPE, enums.ArenaSizeTypes.LARGE); }; config.levels.LevelTutorial = v1; var v2 = v1.prototype; v2.getLevelConfig = function () { return this.c; }; ASSetPropFlags(config.levels.LevelTutorial.prototype, null, 1); } #endinitclip } movieClip 1816 __Packages.config.levels.Level_01 { #initclip if (!_global.config) { _global.config = new Object(); } if (!_global.config.levels) { _global.config.levels = new Object(); } if (!_global.config.levels.Level_01) { var v1 = function (levelId, gameConfig) { this.__gameConfig = gameConfig; this.c = new config.levels.LevelConfig(); var v5; var v10; v5 = this.__gameConfig.getPlayersPlaneConfig(); v10 = v5.getPlaneType(); v5.setStartPosType(enums.PlaneStartPosTypes.FIRST); this.c.setConfigItemArr(config.levels.LevelConfig.PLANES_POS_AND_CONF, [v5]); this.c.setConfigItem(config.levels.LevelConfig.TITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_TITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.SUBTITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_SUBTITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.MISSION, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_MISSION_TXT)); this.c.setConfigItemArr(config.levels.LevelConfig.OBJECTIVE_CLIP_DESC, ['S_MISSION_RINGS', undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_OBJECTIVE_TXT)]); var v6 = enums.SkyTypes.BLUE; var v8; v8 = String(enums.SkyTypes.getInfo(v6, enums.SkyTypes.C_BRIEFING_WEATHER_CLIP_NAME)); this.c.setConfigItemArr(config.levels.LevelConfig.WEATHER_CLIP_DESC, [v8, undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_WEATHER_TXT)]); this.c.setConfigItemArr(config.levels.LevelConfig.HINTS_CLIP_DESC, ['S_MISSION_BONUS', undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_HINT_TXT)]); this.c.setConfigItem(config.levels.LevelConfig.TIME_LIMIT_SEC, this.C_TIME_LIMIT_SEC); this.c.setConfigItem(config.levels.LevelConfig.ARENA_SIZE_TYPE, enums.ArenaSizeTypes.SMALL); this.c.setConfigItem(config.levels.LevelConfig.LOCATION, enums.LocationTypes.NEVADA_DESERT); this.c.setConfigItem(config.levels.LevelConfig.WEATHER, enums.WeatherTypes.SUNNY); this.c.setConfigItem(config.levels.LevelConfig.SKY_TYPE, v6); var v7; v7 = new Vector2D(0, 0); this.c.setConfigItem(config.levels.LevelConfig.WIND_DIR, v7); switch (this.__gameConfig.getGeneralControlsType()) { case enums.DefaultKeyTypes.MOUSE: this.c.setConfigItemArr(config.levels.LevelConfig.HINT_DIALOG_ARRAY, ['S_HGLD_MOUSE_CONTROLS']); break; case enums.DefaultKeyTypes.LEFT_UP_RIGHT: this.c.setConfigItemArr(config.levels.LevelConfig.HINT_DIALOG_ARRAY, ['S_HGLD_ARROW_CONTROLS_M', 'S_HGLD_ARROW_CONTROLS_F']); } var v2; v2 = new Array(); var v9 = 100; var v3; v3 = new Array(); v3[entities.Obstacles.Ring.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.RING; v3[entities.Obstacles.Ring.C_ARG_TYPE_X] = 400; v3[entities.Obstacles.Ring.C_ARG_TYPE_Y] = 100; v3[entities.Obstacles.Ring.C_ARG_TYPE_ROTATION] = 0; v3[entities.Obstacles.Ring.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v3[entities.Obstacles.Ring.C_ARG_TYPE_GROUP_ID] = 1; v2.push(v3); v3 = new Array(); v3[entities.Obstacles.Ring.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.RING; v3[entities.Obstacles.Ring.C_ARG_TYPE_X] = 400; v3[entities.Obstacles.Ring.C_ARG_TYPE_Y] = 500; v3[entities.Obstacles.Ring.C_ARG_TYPE_ROTATION] = 0; v3[entities.Obstacles.Ring.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v3[entities.Obstacles.Ring.C_ARG_TYPE_GROUP_ID] = 1; v2.push(v3); v3 = new Array(); v3[entities.Obstacles.Ring.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.RING; v3[entities.Obstacles.Ring.C_ARG_TYPE_X] = 700; v3[entities.Obstacles.Ring.C_ARG_TYPE_Y] = 300; v3[entities.Obstacles.Ring.C_ARG_TYPE_ROTATION] = 0; v3[entities.Obstacles.Ring.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v3[entities.Obstacles.Ring.C_ARG_TYPE_GROUP_ID] = 1; v2.push(v3); v3 = new Array(); v3[entities.Obstacles.Ring.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.RING; v3[entities.Obstacles.Ring.C_ARG_TYPE_X] = 100; v3[entities.Obstacles.Ring.C_ARG_TYPE_Y] = 300; v3[entities.Obstacles.Ring.C_ARG_TYPE_ROTATION] = 0; v3[entities.Obstacles.Ring.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v3[entities.Obstacles.Ring.C_ARG_TYPE_GROUP_ID] = 1; v2.push(v3); v3 = new Array(); v3[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v3[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 400; v3[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v3[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_HANGAR'; v2.push(v3); v3 = new Array(); v3[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v3[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 500; v3[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v3[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_WIND_RIBBON'; v3[entities.Obstacles.StaticObs.C_ARG_SCALE] = v7.getX() >= 0 ? 70 : -70; v2.push(v3); this.c.setConfigItemArr(config.levels.LevelConfig.AIR_OBSTACLES_ARRAY, v2); }; config.levels.Level_01 = v1; var v2 = v1.prototype; v2.getLevelConfig = function () { return this.c; }; v2.C_ENEMY_PLANE_IDX = 0; v2.C_TIME_LIMIT_SEC = 90; ASSetPropFlags(config.levels.Level_01.prototype, null, 1); } #endinitclip } movieClip 1817 __Packages.config.levels.Level_02 { #initclip if (!_global.config) { _global.config = new Object(); } if (!_global.config.levels) { _global.config.levels = new Object(); } if (!_global.config.levels.Level_02) { var v1 = function (levelId, gameConfig) { this.__gameConfig = gameConfig; this.c = new config.levels.LevelConfig(); var v5; var v10; v5 = this.__gameConfig.getPlayersPlaneConfig(); v10 = v5.getPlaneType(); v5.setStartPosType(enums.PlaneStartPosTypes.FIRST); this.c.setConfigItemArr(config.levels.LevelConfig.PLANES_POS_AND_CONF, [v5]); this.c.setConfigItem(config.levels.LevelConfig.TITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_TITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.SUBTITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_SUBTITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.MISSION, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_MISSION_TXT)); this.c.setConfigItemArr(config.levels.LevelConfig.OBJECTIVE_CLIP_DESC, ['S_MISSION_TARGETS', undefined, 'S_MISSION_BALOON', undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_OBJECTIVE_TXT)]); var v6 = enums.SkyTypes.BLUE; var v8; v8 = String(enums.SkyTypes.getInfo(v6, enums.SkyTypes.C_BRIEFING_WEATHER_CLIP_NAME)); this.c.setConfigItemArr(config.levels.LevelConfig.WEATHER_CLIP_DESC, [v8, undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_WEATHER_TXT)]); this.c.setConfigItemArr(config.levels.LevelConfig.HINTS_CLIP_DESC, ['S_MISSION_LIGHTBALL', undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_HINT_TXT)]); this.c.setConfigItem(config.levels.LevelConfig.TIME_LIMIT_SEC, this.C_TIME_LIMIT_SEC); this.c.setConfigItem(config.levels.LevelConfig.ARENA_SIZE_TYPE, enums.ArenaSizeTypes.MEDIUM); this.c.setConfigItem(config.levels.LevelConfig.LOCATION, enums.LocationTypes.NEVADA_DESERT); this.c.setConfigItem(config.levels.LevelConfig.WEATHER, enums.WeatherTypes.SUNNY); this.c.setConfigItem(config.levels.LevelConfig.SKY_TYPE, v6); var v7; v7 = new Vector2D(0, 0); this.c.setConfigItem(config.levels.LevelConfig.WIND_DIR, v7); this.c.setConfigItemArr(config.levels.LevelConfig.HINT_DIALOG_ARRAY, ['S_HGLD_COOLDOWN']); var v2; v2 = new Array(); var v9 = 100; var v3; v3 = new Array(); v3[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v3[entities.Obstacles.Target.C_ARG_TYPE_X] = 700; v3[entities.Obstacles.Target.C_ARG_TYPE_Y] = 150; v3[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 2; v3[entities.Obstacles.Target.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v2.push(v3); v3 = new Array(); v3[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v3[entities.Obstacles.Target.C_ARG_TYPE_X] = 700; v3[entities.Obstacles.Target.C_ARG_TYPE_Y] = 450; v3[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 2; v3[entities.Obstacles.Target.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v2.push(v3); v3 = new Array(); v3[entities.Obstacles.Baloon.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BALOON; v3[entities.Obstacles.Baloon.C_ARG_TYPE_X] = -100; v3[entities.Obstacles.Baloon.C_ARG_TYPE_Y] = 100 + 200 * Math.random(); v3[entities.Obstacles.Baloon.C_ARG_TYPE_VELOCITY] = 0; v3[entities.Obstacles.Baloon.C_ARG_TYPE_DIRECTION] = new Vector2D(-1, 0); v3[entities.Obstacles.Baloon.C_ARG_TYPE_HITPOINTS] = 5; v3[entities.Obstacles.Baloon.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v3[entities.Obstacles.Baloon.C_ARG_TYPE_ON_TEXT] = 'OPTIONAL\nTARGET'; v2.push(v3); v3 = new Array(); v3[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v3[entities.Obstacles.Target.C_ARG_TYPE_X] = 600; v3[entities.Obstacles.Target.C_ARG_TYPE_Y] = 325; v3[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 2; v3[entities.Obstacles.Target.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v2.push(v3); v3 = new Array(); v3[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v3[entities.Obstacles.Target.C_ARG_TYPE_X] = 850; v3[entities.Obstacles.Target.C_ARG_TYPE_Y] = 325; v3[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 2; v3[entities.Obstacles.Target.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v2.push(v3); v3 = new Array(); v3[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v3[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 400; v3[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v3[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_HANGAR'; v2.push(v3); v3 = new Array(); v3[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v3[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 500; v3[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v3[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_WIND_RIBBON'; v3[entities.Obstacles.StaticObs.C_ARG_SCALE] = v7.getX() >= 0 ? 70 : -70; v2.push(v3); this.c.setConfigItemArr(config.levels.LevelConfig.AIR_OBSTACLES_ARRAY, v2); }; config.levels.Level_02 = v1; var v2 = v1.prototype; v2.getLevelConfig = function () { return this.c; }; v2.C_ENEMY_PLANE_IDX = 0; v2.C_TIME_LIMIT_SEC = 60; ASSetPropFlags(config.levels.Level_02.prototype, null, 1); } #endinitclip } movieClip 1818 __Packages.config.levels.Level_03 { #initclip if (!_global.config) { _global.config = new Object(); } if (!_global.config.levels) { _global.config.levels = new Object(); } if (!_global.config.levels.Level_03) { var v1 = function (levelId, gameConfig) { this.__gameConfig = gameConfig; this.c = new config.levels.LevelConfig(); var v6; var v10; v6 = this.__gameConfig.getPlayersPlaneConfig(); v10 = v6.getPlaneType(); v6.setStartPosType(enums.PlaneStartPosTypes.FIRST); var v11; v11 = v6.getGroupId(); ++v11; var v7; var v8; v8 = config.levels.WorldConfig.getPlaneTypeFromIdxNotMy(v10, this.C_ENEMY_PLANE_IDX); v7 = new PlaneConfig(v8, enums.PlaneStartPosTypes.FOURTH, enums.DefaultKeyTypes.AI, enums.AIProfiles.DUMB, config.levels.WorldConfig.C_SP_NUM_OF_LIVES, v11++); var v3; v3 = config.levels.WorldConfig.addMoreStatHardMode(v10); v7.setPlaneAttributes(1 + v3, +v3, 2 + v3, 2 + v3, +v3); v7.setPlaneItemList([enums.ItemTypes.MACHINE_GUN]); this.c.setConfigItemArr(config.levels.LevelConfig.PLANES_POS_AND_CONF, [v6, v7]); this.c.setConfigItem(config.levels.LevelConfig.TITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_TITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.SUBTITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_SUBTITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.MISSION, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_MISSION_TXT)); var v14; var v13; v14 = String(enums.PlaneTypes.getPlaneInfo(v8, enums.PlaneTypes.C_INFO_PILOT_CLIP)); v13 = String(enums.PlaneTypes.getPlaneInfo(v8, enums.PlaneTypes.C_INFO_PLANE_CLIP)); this.c.setConfigItemArr(config.levels.LevelConfig.OBJECTIVE_CLIP_DESC, [v14, undefined, v13, undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_OBJECTIVE_TXT)]); var v9 = enums.SkyTypes.SUNRISE; var v15; v15 = String(enums.SkyTypes.getInfo(v9, enums.SkyTypes.C_BRIEFING_WEATHER_CLIP_NAME)); this.c.setConfigItemArr(config.levels.LevelConfig.WEATHER_CLIP_DESC, [v15, undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_WEATHER_TXT)]); this.c.setConfigItemArr(config.levels.LevelConfig.HINTS_CLIP_DESC, ['S_MISSION_LIGHTBALL', undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_HINT_TXT)]); this.c.setConfigItem(config.levels.LevelConfig.ARENA_SIZE_TYPE, enums.ArenaSizeTypes.SMALL); this.c.setConfigItem(config.levels.LevelConfig.LOCATION, enums.LocationTypes.NEVADA_DESERT); this.c.setConfigItem(config.levels.LevelConfig.WEATHER, enums.WeatherTypes.SUNNY); this.c.setConfigItem(config.levels.LevelConfig.SKY_TYPE, v9); var v12; v12 = new Vector2D(0, 0); this.c.setConfigItem(config.levels.LevelConfig.WIND_DIR, v12); this.c.setConfigItemArr(config.levels.LevelConfig.HINT_DIALOG_ARRAY, ['S_HGLD_DAMAGE_AREAS', 'S_HGLD_DAMAGE_INDICATORS']); var v4; v4 = new Array(); var v2; v2 = new Array(); v2[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v2[entities.Obstacles.Target.C_ARG_TYPE_X] = 100; v2[entities.Obstacles.Target.C_ARG_TYPE_Y] = 150; v2[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 3; v2[entities.Obstacles.Target.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v4.push(v2); v2 = new Array(); v2[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v2[entities.Obstacles.Target.C_ARG_TYPE_X] = 700; v2[entities.Obstacles.Target.C_ARG_TYPE_Y] = 450; v2[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 3; v2[entities.Obstacles.Target.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v4.push(v2); v2 = new Array(); v2[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v2[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 400; v2[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v2[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_HANGAR'; v4.push(v2); v2 = new Array(); v2[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v2[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 500; v2[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v2[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_WIND_RIBBON'; v2[entities.Obstacles.StaticObs.C_ARG_SCALE] = v12.getX() >= 0 ? 70 : -70; v4.push(v2); this.c.setConfigItemArr(config.levels.LevelConfig.AIR_OBSTACLES_ARRAY, v4); }; config.levels.Level_03 = v1; var v2 = v1.prototype; v2.getLevelConfig = function () { return this.c; }; v2.C_ENEMY_PLANE_IDX = 0; ASSetPropFlags(config.levels.Level_03.prototype, null, 1); } #endinitclip } movieClip 1819 __Packages.config.levels.Level_04 { #initclip if (!_global.config) { _global.config = new Object(); } if (!_global.config.levels) { _global.config.levels = new Object(); } if (!_global.config.levels.Level_04) { var v1 = function (levelId, gameConfig) { this.__gameConfig = gameConfig; this.c = new config.levels.LevelConfig(); var v7; var v11; v7 = this.__gameConfig.getPlayersPlaneConfig(); v11 = v7.getPlaneType(); v7.setStartPosType(enums.PlaneStartPosTypes.FIRST); var v12; v12 = v7.getGroupId(); ++v12; var v8; var v9; v9 = config.levels.WorldConfig.getPlaneTypeFromIdxNotMy(v11, this.C_ENEMY_PLANE_IDX); v8 = new PlaneConfig(v9, enums.PlaneStartPosTypes.FOURTH, enums.DefaultKeyTypes.AI, enums.AIProfiles.WEAK, config.levels.WorldConfig.C_SP_NUM_OF_LIVES, v12++); var v4; v4 = config.levels.WorldConfig.addMoreStatHardMode(v11); v8.setPlaneAttributes(+v4, +v4, 1 + v4, 2 + v4, 1 + v4); v8.setPlaneItemList([enums.ItemTypes.TWIN_MACHINE_GUN]); this.c.setConfigItemArr(config.levels.LevelConfig.PLANES_POS_AND_CONF, [v7, v8]); this.c.setConfigItem(config.levels.LevelConfig.TITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_TITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.SUBTITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_SUBTITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.MISSION, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_MISSION_TXT)); var v15; var v14; v15 = String(enums.PlaneTypes.getPlaneInfo(v9, enums.PlaneTypes.C_INFO_PILOT_CLIP)); v14 = String(enums.PlaneTypes.getPlaneInfo(v9, enums.PlaneTypes.C_INFO_PLANE_CLIP)); this.c.setConfigItemArr(config.levels.LevelConfig.OBJECTIVE_CLIP_DESC, [v15, undefined, v14, undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_OBJECTIVE_TXT)]); var v10 = enums.SkyTypes.GREY; var v16; v16 = String(enums.SkyTypes.getInfo(v10, enums.SkyTypes.C_BRIEFING_WEATHER_CLIP_NAME)); this.c.setConfigItemArr(config.levels.LevelConfig.WEATHER_CLIP_DESC, [v16, undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_WEATHER_TXT)]); this.c.setConfigItemArr(config.levels.LevelConfig.HINTS_CLIP_DESC, ['S_MISSION_LIGHTBALL', undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_HINT_TXT)]); this.c.setConfigItem(config.levels.LevelConfig.ARENA_SIZE_TYPE, enums.ArenaSizeTypes.SMALL); this.c.setConfigItem(config.levels.LevelConfig.LOCATION, enums.LocationTypes.NEVADA_DESERT); this.c.setConfigItem(config.levels.LevelConfig.WEATHER, enums.WeatherTypes.PARTLY); this.c.setConfigItem(config.levels.LevelConfig.SKY_TYPE, v10); var v13; v13 = new Vector2D(0, 0); this.c.setConfigItem(config.levels.LevelConfig.WIND_DIR, v13); this.c.setConfigItemArr(config.levels.LevelConfig.HINT_DIALOG_ARRAY, ['S_HGLD_BONUS_PARACHUTE', 'S_HGLD_BONUS_GUN_BERSERK']); var v5; v5 = new Array(); var v2; v2 = new Array(); v2[entities.Obstacles.StormCloud.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STORM_CLOUD; v2[entities.Obstacles.StormCloud.C_ARG_TYPE_X] = 800 * Math.random(); v2[entities.Obstacles.StormCloud.C_ARG_TYPE_Y] = 100 + 200 * Math.random(); v2[entities.Obstacles.StormCloud.C_ARG_TYPE_VELOCITY] = 0.5; v2[entities.Obstacles.StormCloud.C_ARG_TYPE_DIRECTION] = new Vector2D(-1, 0); v5.push(v2); var v3; v3 = new Array(); v3[entities.Obstacles.Baloon.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BALOON; v3[entities.Obstacles.Baloon.C_ARG_TYPE_X] = 800 * Math.random(); v3[entities.Obstacles.Baloon.C_ARG_TYPE_Y] = 100 + 200 * Math.random(); v3[entities.Obstacles.Baloon.C_ARG_TYPE_VELOCITY] = 0.3 + 1.2 * Math.random(); v3[entities.Obstacles.Baloon.C_ARG_TYPE_DIRECTION] = new Vector2D(-1, 0); v3[entities.Obstacles.Baloon.C_ARG_TYPE_HITPOINTS] = 8; v3[entities.Obstacles.Baloon.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v3[entities.Obstacles.Baloon.C_ARG_TYPE_ON_TEXT] = ''; v5.push(v3); v3 = new Array(); v3[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v3[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 400; v3[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v3[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_HANGAR'; v5.push(v3); v3 = new Array(); v3[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v3[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 500; v3[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v3[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_WIND_RIBBON'; v3[entities.Obstacles.StaticObs.C_ARG_SCALE] = v13.getX() >= 0 ? 70 : -70; v5.push(v3); this.c.setConfigItemArr(config.levels.LevelConfig.AIR_OBSTACLES_ARRAY, v5); var v17 = [enums.BonusTypes.GUN_BERSERK]; this.c.setConfigItemArr(config.levels.LevelConfig.BONUSES_ARRAY, v17); }; config.levels.Level_04 = v1; var v2 = v1.prototype; v2.getLevelConfig = function () { return this.c; }; v2.C_ENEMY_PLANE_IDX = 1; ASSetPropFlags(config.levels.Level_04.prototype, null, 1); } #endinitclip } movieClip 1820 __Packages.config.levels.Level_05 { #initclip if (!_global.config) { _global.config = new Object(); } if (!_global.config.levels) { _global.config.levels = new Object(); } if (!_global.config.levels.Level_05) { var v1 = function (levelId, gameConfig) { this.__gameConfig = gameConfig; this.c = new config.levels.LevelConfig(); var v6; var v10; v6 = this.__gameConfig.getPlayersPlaneConfig(); v10 = v6.getPlaneType(); v6.setStartPosType(enums.PlaneStartPosTypes.FIRST); var v11; v11 = v6.getGroupId(); ++v11; var v7; var v8; v8 = config.levels.WorldConfig.getPlaneTypeFromIdxNotMy(v10, this.C_ENEMY_PLANE_IDX); v7 = new PlaneConfig(v8, enums.PlaneStartPosTypes.FOURTH, enums.DefaultKeyTypes.AI, enums.AIProfiles.NORMAL, config.levels.WorldConfig.C_SP_NUM_OF_LIVES, v11++); var v4; v4 = config.levels.WorldConfig.addMoreStatHardMode(v10); v7.setPlaneAttributes(+v4, 3 + v4, 1 + v4, 2 + v4, 1 + v4); v7.setPlaneItemList([enums.ItemTypes.TWIN_MACHINE_GUN, enums.ItemTypes.HOMING_MISSILES]); this.c.setConfigItemArr(config.levels.LevelConfig.PLANES_POS_AND_CONF, [v6, v7]); this.c.setConfigItem(config.levels.LevelConfig.TITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_TITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.SUBTITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_SUBTITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.MISSION, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_MISSION_TXT)); var v14; var v13; v14 = String(enums.PlaneTypes.getPlaneInfo(v8, enums.PlaneTypes.C_INFO_PILOT_CLIP)); v13 = String(enums.PlaneTypes.getPlaneInfo(v8, enums.PlaneTypes.C_INFO_PLANE_CLIP)); this.c.setConfigItemArr(config.levels.LevelConfig.OBJECTIVE_CLIP_DESC, [v14, undefined, v13, undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_OBJECTIVE_TXT)]); var v9 = enums.SkyTypes.BLUE; var v15; v15 = String(enums.SkyTypes.getInfo(v9, enums.SkyTypes.C_BRIEFING_WEATHER_CLIP_NAME)); this.c.setConfigItemArr(config.levels.LevelConfig.WEATHER_CLIP_DESC, [v15, undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_WEATHER_TXT)]); this.c.setConfigItemArr(config.levels.LevelConfig.HINTS_CLIP_DESC, ['S_MISSION_LIGHTBALL', undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_HINT_TXT)]); this.c.setConfigItem(config.levels.LevelConfig.ARENA_SIZE_TYPE, enums.ArenaSizeTypes.SMALL); this.c.setConfigItem(config.levels.LevelConfig.LOCATION, enums.LocationTypes.NEVADA_DESERT); this.c.setConfigItem(config.levels.LevelConfig.WEATHER, enums.WeatherTypes.PARTLY); this.c.setConfigItem(config.levels.LevelConfig.SKY_TYPE, v9); var v12; v12 = new Vector2D(0, 0); this.c.setConfigItem(config.levels.LevelConfig.WIND_DIR, v12); this.c.setConfigItemArr(config.levels.LevelConfig.HINT_DIALOG_ARRAY, ['S_HGLD_BONUS_AFTERBURNER']); var v3; v3 = new Array(); var v2; v2 = new Array(); v2[entities.Obstacles.Baloon.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BALOON; v2[entities.Obstacles.Baloon.C_ARG_TYPE_X] = 1000 * Math.random() - 200; v2[entities.Obstacles.Baloon.C_ARG_TYPE_Y] = 100 + 200 * Math.random(); v2[entities.Obstacles.Baloon.C_ARG_TYPE_VELOCITY] = 0.8; v2[entities.Obstacles.Baloon.C_ARG_TYPE_DIRECTION] = new Vector2D(1, 0); v2[entities.Obstacles.Baloon.C_ARG_TYPE_HITPOINTS] = 8; v2[entities.Obstacles.Baloon.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v2[entities.Obstacles.Baloon.C_ARG_TYPE_ON_TEXT] = 'COVER HERE'; v3.push(v2); v2 = new Array(); v2[entities.Obstacles.Baloon.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BALOON; v2[entities.Obstacles.Baloon.C_ARG_TYPE_X] = 1000 * Math.random() - 200; v2[entities.Obstacles.Baloon.C_ARG_TYPE_Y] = 100 + 200 * Math.random(); v2[entities.Obstacles.Baloon.C_ARG_TYPE_VELOCITY] = 0.3; v2[entities.Obstacles.Baloon.C_ARG_TYPE_DIRECTION] = new Vector2D(1, 0); v2[entities.Obstacles.Baloon.C_ARG_TYPE_HITPOINTS] = 8; v2[entities.Obstacles.Baloon.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v2[entities.Obstacles.Baloon.C_ARG_TYPE_ON_TEXT] = 'COVER HERE'; v3.push(v2); v2 = new Array(); v2[entities.Obstacles.Baloon.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BALOON; v2[entities.Obstacles.Baloon.C_ARG_TYPE_X] = 1000 * Math.random() - 200; v2[entities.Obstacles.Baloon.C_ARG_TYPE_Y] = 100 + 250 * Math.random(); v2[entities.Obstacles.Baloon.C_ARG_TYPE_VELOCITY] = 1; v2[entities.Obstacles.Baloon.C_ARG_TYPE_DIRECTION] = new Vector2D(1, 0); v2[entities.Obstacles.Baloon.C_ARG_TYPE_HITPOINTS] = 8; v2[entities.Obstacles.Baloon.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v2[entities.Obstacles.Baloon.C_ARG_TYPE_ON_TEXT] = 'COVER HERE'; v3.push(v2); v2 = new Array(); v2[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v2[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 400; v2[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v2[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_HANGAR'; v3.push(v2); v2 = new Array(); v2[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v2[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 500; v2[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v2[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_WIND_RIBBON'; v2[entities.Obstacles.StaticObs.C_ARG_SCALE] = v12.getX() >= 0 ? 70 : -70; v3.push(v2); this.c.setConfigItemArr(config.levels.LevelConfig.AIR_OBSTACLES_ARRAY, v3); this.c.setConfigItemArr(config.levels.LevelConfig.BONUSES_ARRAY, [enums.BonusTypes.AFTERBURNER]); }; config.levels.Level_05 = v1; var v2 = v1.prototype; v2.getLevelConfig = function () { return this.c; }; v2.C_ENEMY_PLANE_IDX = 2; ASSetPropFlags(config.levels.Level_05.prototype, null, 1); } #endinitclip } movieClip 1821 __Packages.config.levels.Level_06 { #initclip if (!_global.config) { _global.config = new Object(); } if (!_global.config.levels) { _global.config.levels = new Object(); } if (!_global.config.levels.Level_06) { var v1 = function (levelId, gameConfig) { this.__gameConfig = gameConfig; this.c = new config.levels.LevelConfig(); var v7; var v11; v7 = this.__gameConfig.getPlayersPlaneConfig(); v11 = v7.getPlaneType(); v7.setStartPosType(enums.PlaneStartPosTypes.FIRST); var v12; v12 = v7.getGroupId(); ++v12; var v8; var v9; v9 = config.levels.WorldConfig.getPlaneTypeFromIdxNotMy(v11, this.C_ENEMY_PLANE_IDX); v8 = new PlaneConfig(v9, enums.PlaneStartPosTypes.FOURTH, enums.DefaultKeyTypes.AI, enums.AIProfiles.CLEVER, config.levels.WorldConfig.C_SP_NUM_OF_LIVES, v12++); var v5; v5 = config.levels.WorldConfig.addMoreStatHardMode(v11); v8.setPlaneAttributes(2 + v5, 2 + v5, 2 + v5, 3 + v5, 1 + v5); v8.setPlaneItemList([enums.ItemTypes.BURST_GUN, enums.ItemTypes.IMPACT_BOMBS]); this.c.setConfigItemArr(config.levels.LevelConfig.PLANES_POS_AND_CONF, [v7, v8]); this.c.setConfigItem(config.levels.LevelConfig.TITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_TITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.SUBTITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_SUBTITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.MISSION, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_MISSION_TXT)); var v15; var v14; v15 = String(enums.PlaneTypes.getPlaneInfo(v9, enums.PlaneTypes.C_INFO_PILOT_CLIP)); v14 = String(enums.PlaneTypes.getPlaneInfo(v9, enums.PlaneTypes.C_INFO_PLANE_CLIP)); this.c.setConfigItemArr(config.levels.LevelConfig.OBJECTIVE_CLIP_DESC, [v15, undefined, v14, undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_OBJECTIVE_TXT)]); var v10 = enums.SkyTypes.BLUE; var v16; v16 = String(enums.SkyTypes.getInfo(v10, enums.SkyTypes.C_BRIEFING_WEATHER_CLIP_NAME)); this.c.setConfigItemArr(config.levels.LevelConfig.WEATHER_CLIP_DESC, [v16, undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_WEATHER_TXT)]); this.c.setConfigItemArr(config.levels.LevelConfig.HINTS_CLIP_DESC, ['S_MISSION_LIGHTBALL', undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_HINT_TXT)]); this.c.setConfigItem(config.levels.LevelConfig.ARENA_SIZE_TYPE, enums.ArenaSizeTypes.SMALL); this.c.setConfigItem(config.levels.LevelConfig.LOCATION, enums.LocationTypes.NEVADA_DESERT); this.c.setConfigItem(config.levels.LevelConfig.WEATHER, enums.WeatherTypes.CLOUDY); this.c.setConfigItem(config.levels.LevelConfig.SKY_TYPE, v10); var v13; v13 = new Vector2D(0, 0); this.c.setConfigItem(config.levels.LevelConfig.WIND_DIR, v13); this.c.setConfigItemArr(config.levels.LevelConfig.HINT_DIALOG_ARRAY, ['S_HGLD_BONUS_BAD_WARNING', 'S_HGLD_BONUS_CONTENT_DETECTION', 'S_HGLD_BONUS_GUN_JAM']); var v2; v2 = new Array(); var v3; v3 = new Array(); v3[entities.Obstacles.BirdFormation.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BIRD_FORMATION; v3[entities.Obstacles.BirdFormation.C_ARG_TYPE_X] = 800 * Math.random(); v3[entities.Obstacles.BirdFormation.C_ARG_TYPE_Y] = 50 + 250 * Math.random(); v3[entities.Obstacles.BirdFormation.C_ARG_TYPE_VELOCITY] = 0.5 + 0.7 * Math.random(); v3[entities.Obstacles.BirdFormation.C_ARG_TYPE_DIRECTION] = new Vector2D(-1, 0); v2.push(v3); v3 = new Array(); v3[entities.Obstacles.BirdFormation.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BIRD_FORMATION; v3[entities.Obstacles.BirdFormation.C_ARG_TYPE_X] = 800 * Math.random(); v3[entities.Obstacles.BirdFormation.C_ARG_TYPE_Y] = 50 + 250 * Math.random(); v3[entities.Obstacles.BirdFormation.C_ARG_TYPE_VELOCITY] = 0.5 + 0.7 * Math.random(); v3[entities.Obstacles.BirdFormation.C_ARG_TYPE_DIRECTION] = new Vector2D(-1, 0); v2.push(v3); var v4; v4 = new Array(); v4[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v4[entities.Obstacles.Target.C_ARG_TYPE_X] = -150; v4[entities.Obstacles.Target.C_ARG_TYPE_Y] = 400; v4[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 5; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v4[entities.Obstacles.Target.C_ARG_TYPE_X] = -50; v4[entities.Obstacles.Target.C_ARG_TYPE_Y] = 300; v4[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 5; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v4[entities.Obstacles.Target.C_ARG_TYPE_X] = 50; v4[entities.Obstacles.Target.C_ARG_TYPE_Y] = 200; v4[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 5; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v4[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 400; v4[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v4[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_HANGAR'; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v4[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 500; v4[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v4[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_WIND_RIBBON'; v4[entities.Obstacles.StaticObs.C_ARG_SCALE] = v13.getX() >= 0 ? 70 : -70; v2.push(v4); this.c.setConfigItemArr(config.levels.LevelConfig.AIR_OBSTACLES_ARRAY, v2); this.c.setConfigItemArr(config.levels.LevelConfig.BONUSES_ARRAY, [enums.BonusTypes.GUN_BERSERK, enums.BonusTypes.GUN_JAM]); }; config.levels.Level_06 = v1; var v2 = v1.prototype; v2.getLevelConfig = function () { return this.c; }; v2.C_ENEMY_PLANE_IDX = 3; ASSetPropFlags(config.levels.Level_06.prototype, null, 1); } #endinitclip } movieClip 1822 __Packages.config.levels.Level_07 { #initclip if (!_global.config) { _global.config = new Object(); } if (!_global.config.levels) { _global.config.levels = new Object(); } if (!_global.config.levels.Level_07) { var v1 = function (levelId, gameConfig) { this.__gameConfig = gameConfig; this.c = new config.levels.LevelConfig(); var v6; var v10; v6 = this.__gameConfig.getPlayersPlaneConfig(); v10 = v6.getPlaneType(); v6.setStartPosType(enums.PlaneStartPosTypes.FIRST); this.c.setConfigItemArr(config.levels.LevelConfig.PLANES_POS_AND_CONF, [v6]); this.c.setConfigItem(config.levels.LevelConfig.TITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_TITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.SUBTITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_SUBTITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.MISSION, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_MISSION_TXT)); this.c.setConfigItemArr(config.levels.LevelConfig.OBJECTIVE_CLIP_DESC, ['S_MISSION_RINGS', undefined, 'S_MISSION_TARGETS', undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_OBJECTIVE_TXT)]); var v7 = enums.SkyTypes.BLUE; var v9; v9 = String(enums.SkyTypes.getInfo(v7, enums.SkyTypes.C_BRIEFING_WEATHER_CLIP_NAME)); this.c.setConfigItemArr(config.levels.LevelConfig.WEATHER_CLIP_DESC, [v9, undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_WEATHER_TXT)]); this.c.setConfigItemArr(config.levels.LevelConfig.HINTS_CLIP_DESC, ['S_MISSION_BONUS', undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_HINT_TXT)]); this.c.setConfigItem(config.levels.LevelConfig.TIME_LIMIT_SEC, this.C_TIME_LIMIT_SEC); this.c.setConfigItem(config.levels.LevelConfig.ARENA_SIZE_TYPE, enums.ArenaSizeTypes.LARGE); this.c.setConfigItem(config.levels.LevelConfig.LOCATION, enums.LocationTypes.NEVADA_DESERT); this.c.setConfigItem(config.levels.LevelConfig.WEATHER, enums.WeatherTypes.SUNNY); this.c.setConfigItem(config.levels.LevelConfig.SKY_TYPE, v7); var v8; v8 = new Vector2D(0, 0); this.c.setConfigItem(config.levels.LevelConfig.WIND_DIR, v8); this.c.setConfigItemArr(config.levels.LevelConfig.HINT_DIALOG_ARRAY, ['S_HGLD_DIVE']); var v2; v2 = new Array(); var v3 = 100; var v4; v4 = new Array(); v4[entities.Obstacles.Baloon.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BALOON; v4[entities.Obstacles.Baloon.C_ARG_TYPE_X] = 400; v4[entities.Obstacles.Baloon.C_ARG_TYPE_Y] = 260; v4[entities.Obstacles.Baloon.C_ARG_TYPE_VELOCITY] = 0; v4[entities.Obstacles.Baloon.C_ARG_TYPE_DIRECTION] = new Vector2D(-1, 0); v4[entities.Obstacles.Baloon.C_ARG_TYPE_HITPOINTS] = 15; v4[entities.Obstacles.Baloon.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v4[entities.Obstacles.Baloon.C_ARG_TYPE_ON_TEXT] = 'OPTIONAL TARGET'; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.Ring.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.RING; v4[entities.Obstacles.Ring.C_ARG_TYPE_X] = 400; v4[entities.Obstacles.Ring.C_ARG_TYPE_Y] = 100; v4[entities.Obstacles.Ring.C_ARG_TYPE_ROTATION] = 0; v4[entities.Obstacles.Ring.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v4[entities.Obstacles.Ring.C_ARG_TYPE_GROUP_ID] = 1; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.Ring.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.RING; v4[entities.Obstacles.Ring.C_ARG_TYPE_X] = 400; v4[entities.Obstacles.Ring.C_ARG_TYPE_Y] = 500; v4[entities.Obstacles.Ring.C_ARG_TYPE_ROTATION] = 0; v4[entities.Obstacles.Ring.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v4[entities.Obstacles.Ring.C_ARG_TYPE_GROUP_ID] = 1; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.Ring.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.RING; v4[entities.Obstacles.Ring.C_ARG_TYPE_X] = 700; v4[entities.Obstacles.Ring.C_ARG_TYPE_Y] = 300; v4[entities.Obstacles.Ring.C_ARG_TYPE_ROTATION] = 0; v4[entities.Obstacles.Ring.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v4[entities.Obstacles.Ring.C_ARG_TYPE_GROUP_ID] = 1; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.Ring.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.RING; v4[entities.Obstacles.Ring.C_ARG_TYPE_X] = 1100; v4[entities.Obstacles.Ring.C_ARG_TYPE_Y] = 150; v4[entities.Obstacles.Ring.C_ARG_TYPE_ROTATION] = 90; v4[entities.Obstacles.Ring.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v4[entities.Obstacles.Ring.C_ARG_TYPE_GROUP_ID] = 1; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.Ring.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.RING; v4[entities.Obstacles.Ring.C_ARG_TYPE_X] = 1100; v4[entities.Obstacles.Ring.C_ARG_TYPE_Y] = 450; v4[entities.Obstacles.Ring.C_ARG_TYPE_ROTATION] = 90; v4[entities.Obstacles.Ring.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v4[entities.Obstacles.Ring.C_ARG_TYPE_GROUP_ID] = 1; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.Ring.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.RING; v4[entities.Obstacles.Ring.C_ARG_TYPE_X] = 1400; v4[entities.Obstacles.Ring.C_ARG_TYPE_Y] = v3; v4[entities.Obstacles.Ring.C_ARG_TYPE_ROTATION] = 45; v4[entities.Obstacles.Ring.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v4[entities.Obstacles.Ring.C_ARG_TYPE_GROUP_ID] = 1; v2.push(v4); v3 += 200; v4 = new Array(); v4[entities.Obstacles.Ring.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.RING; v4[entities.Obstacles.Ring.C_ARG_TYPE_X] = 1400; v4[entities.Obstacles.Ring.C_ARG_TYPE_Y] = v3; v4[entities.Obstacles.Ring.C_ARG_TYPE_ROTATION] = 90; v4[entities.Obstacles.Ring.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v4[entities.Obstacles.Ring.C_ARG_TYPE_GROUP_ID] = 1; v2.push(v4); v3 += 200; v4 = new Array(); v4[entities.Obstacles.Ring.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.RING; v4[entities.Obstacles.Ring.C_ARG_TYPE_X] = 1400; v4[entities.Obstacles.Ring.C_ARG_TYPE_Y] = v3; v4[entities.Obstacles.Ring.C_ARG_TYPE_ROTATION] = -45; v4[entities.Obstacles.Ring.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v4[entities.Obstacles.Ring.C_ARG_TYPE_GROUP_ID] = 1; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.Ring.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.RING; v4[entities.Obstacles.Ring.C_ARG_TYPE_X] = 100; v4[entities.Obstacles.Ring.C_ARG_TYPE_Y] = 300; v4[entities.Obstacles.Ring.C_ARG_TYPE_ROTATION] = 0; v4[entities.Obstacles.Ring.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v4[entities.Obstacles.Ring.C_ARG_TYPE_GROUP_ID] = 1; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.Ring.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.RING; v4[entities.Obstacles.Ring.C_ARG_TYPE_X] = -250; v4[entities.Obstacles.Ring.C_ARG_TYPE_Y] = 200; v4[entities.Obstacles.Ring.C_ARG_TYPE_ROTATION] = 45; v4[entities.Obstacles.Ring.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v4[entities.Obstacles.Ring.C_ARG_TYPE_GROUP_ID] = 1; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.Ring.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.RING; v4[entities.Obstacles.Ring.C_ARG_TYPE_X] = -250; v4[entities.Obstacles.Ring.C_ARG_TYPE_Y] = 350; v4[entities.Obstacles.Ring.C_ARG_TYPE_ROTATION] = -45; v4[entities.Obstacles.Ring.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v4[entities.Obstacles.Ring.C_ARG_TYPE_GROUP_ID] = 1; v2.push(v4); v3 = 100; v4 = new Array(); v4[entities.Obstacles.Ring.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.RING; v4[entities.Obstacles.Ring.C_ARG_TYPE_X] = -600; v4[entities.Obstacles.Ring.C_ARG_TYPE_Y] = v3; v4[entities.Obstacles.Ring.C_ARG_TYPE_ROTATION] = -45; v4[entities.Obstacles.Ring.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v4[entities.Obstacles.Ring.C_ARG_TYPE_GROUP_ID] = 1; v2.push(v4); v3 += 200; v4 = new Array(); v4[entities.Obstacles.Ring.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.RING; v4[entities.Obstacles.Ring.C_ARG_TYPE_X] = -600; v4[entities.Obstacles.Ring.C_ARG_TYPE_Y] = v3; v4[entities.Obstacles.Ring.C_ARG_TYPE_ROTATION] = 90; v4[entities.Obstacles.Ring.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v4[entities.Obstacles.Ring.C_ARG_TYPE_GROUP_ID] = 1; v2.push(v4); v3 += 200; v4 = new Array(); v4[entities.Obstacles.Ring.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.RING; v4[entities.Obstacles.Ring.C_ARG_TYPE_X] = -600; v4[entities.Obstacles.Ring.C_ARG_TYPE_Y] = v3; v4[entities.Obstacles.Ring.C_ARG_TYPE_ROTATION] = 45; v4[entities.Obstacles.Ring.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v4[entities.Obstacles.Ring.C_ARG_TYPE_GROUP_ID] = 1; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v4[entities.Obstacles.Target.C_ARG_TYPE_X] = -500; v4[entities.Obstacles.Target.C_ARG_TYPE_Y] = 300; v4[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 2; v4[entities.Obstacles.Target.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v4[entities.Obstacles.Target.C_ARG_TYPE_X] = -50; v4[entities.Obstacles.Target.C_ARG_TYPE_Y] = 300; v4[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 2; v4[entities.Obstacles.Target.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v4[entities.Obstacles.Target.C_ARG_TYPE_X] = 1100; v4[entities.Obstacles.Target.C_ARG_TYPE_Y] = 300; v4[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 2; v4[entities.Obstacles.Target.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.InfoTable.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.INFO_TABLE; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_X] = 200; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_Y] = 200; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_CLIP_NAME] = 'S_INFO_LEVEL_01'; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_AUTO_FLY_IN_TIME] = undefined; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_AUTO_FLY_OUT_TIME] = undefined; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_CYCLE_TIME] = 9; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_FLY_IN_GROUP_ID] = undefined; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_FLY_OUT_GROUP_ID] = undefined; v4[entities.Obstacles.InfoTable.C_ARG_TYPE_GROUP_ID] = undefined; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v4[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 400; v4[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v4[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_HANGAR'; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v4[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 500; v4[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v4[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_WIND_RIBBON'; v4[entities.Obstacles.StaticObs.C_ARG_SCALE] = v8.getX() >= 0 ? 70 : -70; v2.push(v4); this.c.setConfigItemArr(config.levels.LevelConfig.AIR_OBSTACLES_ARRAY, v2); this.c.setConfigItemArr(config.levels.LevelConfig.BONUSES_ARRAY, [enums.BonusTypes.AFTERBURNER]); }; config.levels.Level_07 = v1; var v2 = v1.prototype; v2.getLevelConfig = function () { return this.c; }; v2.C_ENEMY_PLANE_IDX = 0; v2.C_TIME_LIMIT_SEC = 120; ASSetPropFlags(config.levels.Level_07.prototype, null, 1); } #endinitclip } movieClip 1823 __Packages.config.levels.Level_08 { #initclip if (!_global.config) { _global.config = new Object(); } if (!_global.config.levels) { _global.config.levels = new Object(); } if (!_global.config.levels.Level_08) { var v1 = function (levelId, gameConfig) { this.__gameConfig = gameConfig; this.c = new config.levels.LevelConfig(); var v4; var v7; v4 = this.__gameConfig.getPlayersPlaneConfig(); v7 = v4.getPlaneType(); v4.setStartPosType(enums.PlaneStartPosTypes.FIRST); var v9; v9 = v4.getGroupId(); ++v9; v4.setNumOfLives(config.levels.WorldConfig.C_LIVES_3_PLANES); var v10; var v11; v11 = config.levels.WorldConfig.getPlaneTypeFromIdxNotMy(v7, this.C_ENEMY_PLANE_1_IDX); v10 = new PlaneConfig(v11, enums.PlaneStartPosTypes.THIRD, enums.DefaultKeyTypes.AI, enums.AIProfiles.NORMAL, config.levels.WorldConfig.C_LIVES_3_PLANES, v9++); var v2; v2 = config.levels.WorldConfig.addMoreStatHardMode(v7); v10.setPlaneAttributes(1 + v2, 1 + v2, 1 + v2, 3 + v2, 2 + v2); v10.setPlaneItemList([enums.ItemTypes.MACHINE_GUN, enums.ItemTypes.IMPACT_BOMBS, enums.ItemTypes.PROXIMITY_DETECTOR]); var v8; var v12; v12 = config.levels.WorldConfig.getPlaneTypeFromIdxNotMy(v7, this.C_ENEMY_PLANE_2_IDX); v8 = new PlaneConfig(v12, enums.PlaneStartPosTypes.FOURTH, enums.DefaultKeyTypes.AI, enums.AIProfiles.NORMAL, config.levels.WorldConfig.C_LIVES_3_PLANES, v9++); v8.setPlaneAttributes(1 + v2, 2 + v2, 2 + v2, 3 + v2, 1 + v2); v8.setPlaneItemList([enums.ItemTypes.BURST_GUN, enums.ItemTypes.IMPACT_BOMBS, enums.ItemTypes.MALICIOUS_PARACHUTE]); this.c.setConfigItemArr(config.levels.LevelConfig.PLANES_POS_AND_CONF, [v4, v10, v8]); this.c.setConfigItem(config.levels.LevelConfig.TITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_TITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.SUBTITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_SUBTITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.MISSION, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_MISSION_TXT)); var v17; var v15; v17 = String(enums.PlaneTypes.getPlaneInfo(v11, enums.PlaneTypes.C_INFO_PILOT_CLIP)); v15 = String(enums.PlaneTypes.getPlaneInfo(v12, enums.PlaneTypes.C_INFO_PILOT_CLIP)); this.c.setConfigItemArr(config.levels.LevelConfig.OBJECTIVE_CLIP_DESC, [v17, undefined, v15, undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_OBJECTIVE_TXT)]); var v13 = enums.SkyTypes.SUNSET; var v16; v16 = String(enums.SkyTypes.getInfo(v13, enums.SkyTypes.C_BRIEFING_WEATHER_CLIP_NAME)); this.c.setConfigItemArr(config.levels.LevelConfig.WEATHER_CLIP_DESC, [v16, undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_WEATHER_TXT)]); this.c.setConfigItemArr(config.levels.LevelConfig.HINTS_CLIP_DESC, ['S_MISSION_LIGHTBALL', undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_HINT_TXT)]); this.c.setConfigItem(config.levels.LevelConfig.ARENA_SIZE_TYPE, enums.ArenaSizeTypes.MEDIUM); this.c.setConfigItem(config.levels.LevelConfig.LOCATION, enums.LocationTypes.NEVADA_DESERT); this.c.setConfigItem(config.levels.LevelConfig.WEATHER, enums.WeatherTypes.SUNNY); this.c.setConfigItem(config.levels.LevelConfig.SKY_TYPE, v13); var v14; v14 = new Vector2D(0, 0); this.c.setConfigItem(config.levels.LevelConfig.WIND_DIR, v14); this.c.setConfigItemArr(config.levels.LevelConfig.HINT_DIALOG_ARRAY, ['S_HGLD_BONUS_EXTRA_LIFE']); var v5; v5 = new Array(); var v3; v3 = new Array(); v3[entities.Obstacles.Baloon.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.AIRSHIP; v3[entities.Obstacles.Baloon.C_ARG_TYPE_X] = 800 * Math.random(); v3[entities.Obstacles.Baloon.C_ARG_TYPE_Y] = 50 + 100 * Math.random(); v3[entities.Obstacles.Baloon.C_ARG_TYPE_VELOCITY] = 0.1 + 0.75 * Math.random(); v3[entities.Obstacles.Baloon.C_ARG_TYPE_DIRECTION] = new Vector2D(-1, 0); v3[entities.Obstacles.Baloon.C_ARG_TYPE_HITPOINTS] = 100; v3[entities.Obstacles.Baloon.C_ARG_TYPE_ON_TEXT] = 'MVR-81'; v3[entities.Obstacles.Baloon.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v5.push(v3); v3 = new Array(); v3[entities.Obstacles.Baloon.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BALOON; v3[entities.Obstacles.Baloon.C_ARG_TYPE_X] = 1000 * Math.random() - 200; v3[entities.Obstacles.Baloon.C_ARG_TYPE_Y] = 250 + 200 * Math.random(); v3[entities.Obstacles.Baloon.C_ARG_TYPE_VELOCITY] = 1 + Math.random(); v3[entities.Obstacles.Baloon.C_ARG_TYPE_DIRECTION] = new Vector2D(1, 0); v3[entities.Obstacles.Baloon.C_ARG_TYPE_HITPOINTS] = 80; v3[entities.Obstacles.Baloon.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY_ALLY; v3[entities.Obstacles.Baloon.C_ARG_TYPE_ON_TEXT] = 'DEFEND ME!'; v3[entities.Obstacles.Baloon.C_ARG_TYPE_SHOW_HEALTH] = true; v5.push(v3); v3 = new Array(); v3[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v3[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 400; v3[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v3[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_HANGAR'; v5.push(v3); v3 = new Array(); v3[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v3[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 500; v3[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v3[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_WIND_RIBBON'; v3[entities.Obstacles.StaticObs.C_ARG_SCALE] = v14.getX() >= 0 ? 70 : -70; v5.push(v3); this.c.setConfigItemArr(config.levels.LevelConfig.AIR_OBSTACLES_ARRAY, v5); this.c.setConfigItemArr(config.levels.LevelConfig.BONUSES_ARRAY, [enums.BonusTypes.EXTRA_LIFE]); }; config.levels.Level_08 = v1; var v2 = v1.prototype; v2.getLevelConfig = function () { return this.c; }; v2.C_ENEMY_PLANE_1_IDX = 1; v2.C_ENEMY_PLANE_2_IDX = 2; ASSetPropFlags(config.levels.Level_08.prototype, null, 1); } #endinitclip } movieClip 1824 __Packages.config.levels.Level_09 { #initclip if (!_global.config) { _global.config = new Object(); } if (!_global.config.levels) { _global.config.levels = new Object(); } if (!_global.config.levels.Level_09) { var v1 = function (levelId, gameConfig) { this.__gameConfig = gameConfig; this.c = new config.levels.LevelConfig(); var v6; var v9; v6 = this.__gameConfig.getPlayersPlaneConfig(); v9 = v6.getPlaneType(); v6.setStartPosType(enums.PlaneStartPosTypes.FIRST); var v11; v11 = v6.getGroupId(); ++v11; v6.setNumOfLives(config.levels.WorldConfig.C_LIVES_3_PLANES); var v12; var v13; v13 = config.levels.WorldConfig.getPlaneTypeFromIdxNotMy(v9, this.C_ENEMY_PLANE_1_IDX); v12 = new PlaneConfig(v13, enums.PlaneStartPosTypes.THIRD, enums.DefaultKeyTypes.AI, enums.AIProfiles.NORMAL, config.levels.WorldConfig.C_LIVES_3_PLANES, v11++); var v2; v2 = config.levels.WorldConfig.addMoreStatHardMode(v9); v12.setPlaneAttributes(2 + v2, 2 + v2, 2 + v2, 4 + v2, 2 + v2); v12.setPlaneItemList([enums.ItemTypes.TWIN_MACHINE_GUN, enums.ItemTypes.IMPACT_BOMBS, enums.ItemTypes.PROXIMITY_DETECTOR]); var v10; var v14; v14 = config.levels.WorldConfig.getPlaneTypeFromIdxNotMy(v9, this.C_ENEMY_PLANE_2_IDX); v10 = new PlaneConfig(v14, enums.PlaneStartPosTypes.FOURTH, enums.DefaultKeyTypes.AI, enums.AIProfiles.NORMAL, config.levels.WorldConfig.C_LIVES_3_PLANES, v11++); v10.setPlaneAttributes(2 + v2, 3 + v2, 2 + v2, 4 + v2, 2 + v2); v10.setPlaneItemList([enums.ItemTypes.BURST_GUN, enums.ItemTypes.HOMING_MISSILES, enums.ItemTypes.GUIDANCE_SYSTEM]); this.c.setConfigItemArr(config.levels.LevelConfig.PLANES_POS_AND_CONF, [v6, v12, v10]); this.c.setConfigItem(config.levels.LevelConfig.TITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_TITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.SUBTITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_SUBTITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.MISSION, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_MISSION_TXT)); var v18; var v16; v18 = String(enums.PlaneTypes.getPlaneInfo(v13, enums.PlaneTypes.C_INFO_PILOT_CLIP)); v16 = String(enums.PlaneTypes.getPlaneInfo(v14, enums.PlaneTypes.C_INFO_PILOT_CLIP)); this.c.setConfigItemArr(config.levels.LevelConfig.OBJECTIVE_CLIP_DESC, [v18, undefined, v16, undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_OBJECTIVE_TXT)]); var v15 = enums.SkyTypes.GREY; var v17; v17 = String(enums.SkyTypes.getInfo(v15, enums.SkyTypes.C_BRIEFING_WEATHER_CLIP_NAME)); this.c.setConfigItemArr(config.levels.LevelConfig.WEATHER_CLIP_DESC, [v17, undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_WEATHER_TXT)]); this.c.setConfigItemArr(config.levels.LevelConfig.HINTS_CLIP_DESC, ['S_MISSION_LIGHTBALL', undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_HINT_TXT)]); this.c.setConfigItem(config.levels.LevelConfig.ARENA_SIZE_TYPE, enums.ArenaSizeTypes.MEDIUM); this.c.setConfigItem(config.levels.LevelConfig.LOCATION, enums.LocationTypes.NEVADA_DESERT); this.c.setConfigItem(config.levels.LevelConfig.WEATHER, enums.WeatherTypes.CLOUDY); this.c.setConfigItem(config.levels.LevelConfig.SKY_TYPE, v15); var v5; v5 = new Vector2D(this.C_WIND_STR, 0); this.c.setConfigItem(config.levels.LevelConfig.WIND_DIR, v5); this.c.setConfigItemArr(config.levels.LevelConfig.HINT_DIALOG_ARRAY, ['S_HGLD_WINDSOCK']); var v7; v7 = new Array(); var v3; v3 = new Array(); v3[entities.Obstacles.StormCloud.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STORM_CLOUD; v3[entities.Obstacles.StormCloud.C_ARG_TYPE_X] = 800 * Math.random(); v3[entities.Obstacles.StormCloud.C_ARG_TYPE_Y] = 100 + 200 * Math.random(); v3[entities.Obstacles.StormCloud.C_ARG_TYPE_VELOCITY] = 1 + Math.abs(v5.getX()) * Math.random(); v3[entities.Obstacles.StormCloud.C_ARG_TYPE_DIRECTION] = new Vector2D(v5.getX() >= 0 ? 1 : -1, 0); v7.push(v3); v3 = new Array(); v3[entities.Obstacles.StormCloud.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STORM_CLOUD; v3[entities.Obstacles.StormCloud.C_ARG_TYPE_X] = -150 + 950 * Math.random(); v3[entities.Obstacles.StormCloud.C_ARG_TYPE_Y] = 200 + 200 * Math.random(); v3[entities.Obstacles.StormCloud.C_ARG_TYPE_VELOCITY] = 1 + Math.abs(v5.getX()) * Math.random(); v3[entities.Obstacles.StormCloud.C_ARG_TYPE_DIRECTION] = new Vector2D(v5.getX() >= 0 ? 1 : -1, 0); v7.push(v3); var v4; v4 = new Array(); v4[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v4[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 400; v4[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v4[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_HANGAR'; v7.push(v4); v4 = new Array(); v4[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v4[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 500; v4[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v4[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_WIND_RIBBON'; v4[entities.Obstacles.StaticObs.C_ARG_SCALE] = v5.getX() >= 0 ? 70 : -70; v7.push(v4); this.c.setConfigItemArr(config.levels.LevelConfig.AIR_OBSTACLES_ARRAY, v7); this.c.setConfigItemArr(config.levels.LevelConfig.BONUSES_ARRAY, [enums.BonusTypes.AFTERBURNER, enums.BonusTypes.GUN_BERSERK]); }; config.levels.Level_09 = v1; var v2 = v1.prototype; v2.getLevelConfig = function () { return this.c; }; v2.C_ENEMY_PLANE_1_IDX = 2; v2.C_ENEMY_PLANE_2_IDX = 3; v2.C_WIND_STR = -1.1; ASSetPropFlags(config.levels.Level_09.prototype, null, 1); } #endinitclip } movieClip 1825 __Packages.config.levels.Level_10 { #initclip if (!_global.config) { _global.config = new Object(); } if (!_global.config.levels) { _global.config.levels = new Object(); } if (!_global.config.levels.Level_10) { var v1 = function (levelId, gameConfig) { this.__gameConfig = gameConfig; this.c = new config.levels.LevelConfig(); var v5; var v7; v5 = this.__gameConfig.getPlayersPlaneConfig(); v7 = v5.getPlaneType(); v5.setStartPosType(enums.PlaneStartPosTypes.FIRST); var v13; v13 = v5.getGroupId(); ++v13; v5.setNumOfLives(config.levels.WorldConfig.C_LIVES_3_PLANES); var v9; var v10; v10 = config.levels.WorldConfig.getPlaneTypeFromIdxNotMy(v7, this.C_ENEMY_PLANE_1_IDX); var v14; v14 = v13; v9 = new PlaneConfig(v10, enums.PlaneStartPosTypes.THIRD, enums.DefaultKeyTypes.AI, enums.AIProfiles.NORMAL, config.levels.WorldConfig.C_LIVES_3_PLANES, v14); var v3; v3 = config.levels.WorldConfig.addMoreStatHardMode(v7); v9.setPlaneAttributes(2 + v3, 2 + v3, 2 + v3, 3 + v3, 2 + v3); v9.setPlaneItemList([enums.ItemTypes.BURST_GUN, enums.ItemTypes.HOMING_MISSILES]); var v8; var v11; v11 = config.levels.WorldConfig.getPlaneTypeFromIdxNotMy(v7, this.C_ENEMY_PLANE_2_IDX); v8 = new PlaneConfig(v11, enums.PlaneStartPosTypes.FOURTH, enums.DefaultKeyTypes.AI, enums.AIProfiles.NORMAL, config.levels.WorldConfig.C_LIVES_3_PLANES, v14); v8.setPlaneAttributes(1 + v3, 2 + v3, 3 + v3, 4 + v3, 2 + v3); v8.setPlaneItemList([enums.ItemTypes.TWIN_MACHINE_GUN, enums.ItemTypes.EMP_DISRUPTOR, enums.ItemTypes.GAUSS_ACCELERATOR]); this.c.setConfigItemArr(config.levels.LevelConfig.PLANES_POS_AND_CONF, [v5, v9, v8]); this.c.setConfigItem(config.levels.LevelConfig.TITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_TITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.SUBTITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_SUBTITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.MISSION, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_MISSION_TXT)); var v18; var v16; v18 = String(enums.PlaneTypes.getPlaneInfo(v10, enums.PlaneTypes.C_INFO_PILOT_CLIP)); v16 = String(enums.PlaneTypes.getPlaneInfo(v11, enums.PlaneTypes.C_INFO_PILOT_CLIP)); this.c.setConfigItemArr(config.levels.LevelConfig.OBJECTIVE_CLIP_DESC, [v18, undefined, v16, undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_OBJECTIVE_TXT)]); var v12 = enums.SkyTypes.SUNRISE; var v17; v17 = String(enums.SkyTypes.getInfo(v12, enums.SkyTypes.C_BRIEFING_WEATHER_CLIP_NAME)); this.c.setConfigItemArr(config.levels.LevelConfig.WEATHER_CLIP_DESC, [v17, undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_WEATHER_TXT)]); this.c.setConfigItemArr(config.levels.LevelConfig.HINTS_CLIP_DESC, ['S_MISSION_LIGHTBALL', undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_HINT_TXT)]); this.c.setConfigItem(config.levels.LevelConfig.ARENA_SIZE_TYPE, enums.ArenaSizeTypes.MEDIUM); this.c.setConfigItem(config.levels.LevelConfig.LOCATION, enums.LocationTypes.NEVADA_DESERT); this.c.setConfigItem(config.levels.LevelConfig.WEATHER, enums.WeatherTypes.PARTLY); this.c.setConfigItem(config.levels.LevelConfig.SKY_TYPE, v12); var v15; v15 = new Vector2D(this.C_WIND_STR, 0); this.c.setConfigItem(config.levels.LevelConfig.WIND_DIR, v15); var v2; v2 = new Array(); var v4; v4 = new Array(); v4[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v4[entities.Obstacles.Target.C_ARG_TYPE_X] = 400; v4[entities.Obstacles.Target.C_ARG_TYPE_Y] = 275; v4[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 10; v4[entities.Obstacles.Target.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v4[entities.Obstacles.Target.C_ARG_TYPE_X] = 200; v4[entities.Obstacles.Target.C_ARG_TYPE_Y] = 150; v4[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 10; v4[entities.Obstacles.Target.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v4[entities.Obstacles.Target.C_ARG_TYPE_X] = 600; v4[entities.Obstacles.Target.C_ARG_TYPE_Y] = 150; v4[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 10; v4[entities.Obstacles.Target.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v4[entities.Obstacles.Target.C_ARG_TYPE_X] = 400; v4[entities.Obstacles.Target.C_ARG_TYPE_Y] = 450; v4[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 10; v4[entities.Obstacles.Target.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v4[entities.Obstacles.Target.C_ARG_TYPE_X] = 300; v4[entities.Obstacles.Target.C_ARG_TYPE_Y] = 430; v4[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 10; v4[entities.Obstacles.Target.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v4[entities.Obstacles.Target.C_ARG_TYPE_X] = 200; v4[entities.Obstacles.Target.C_ARG_TYPE_Y] = 380; v4[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 10; v4[entities.Obstacles.Target.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v4[entities.Obstacles.Target.C_ARG_TYPE_X] = 500; v4[entities.Obstacles.Target.C_ARG_TYPE_Y] = 430; v4[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 10; v4[entities.Obstacles.Target.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v4[entities.Obstacles.Target.C_ARG_TYPE_X] = 600; v4[entities.Obstacles.Target.C_ARG_TYPE_Y] = 380; v4[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 10; v4[entities.Obstacles.Target.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.Baloon.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BALOON; v4[entities.Obstacles.Baloon.C_ARG_TYPE_X] = -100; v4[entities.Obstacles.Baloon.C_ARG_TYPE_Y] = 200; v4[entities.Obstacles.Baloon.C_ARG_TYPE_VELOCITY] = 0; v4[entities.Obstacles.Baloon.C_ARG_TYPE_DIRECTION] = new Vector2D(1, 0); v4[entities.Obstacles.Baloon.C_ARG_TYPE_HITPOINTS] = 25; v4[entities.Obstacles.Baloon.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v4[entities.Obstacles.Baloon.C_ARG_TYPE_ON_TEXT] = 'HIT ME!'; v4[entities.Obstacles.Baloon.C_ARG_TYPE_SHOW_HEALTH] = true; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.Baloon.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BALOON; v4[entities.Obstacles.Baloon.C_ARG_TYPE_X] = 900; v4[entities.Obstacles.Baloon.C_ARG_TYPE_Y] = 350; v4[entities.Obstacles.Baloon.C_ARG_TYPE_VELOCITY] = 0; v4[entities.Obstacles.Baloon.C_ARG_TYPE_DIRECTION] = new Vector2D(1, 0); v4[entities.Obstacles.Baloon.C_ARG_TYPE_HITPOINTS] = 25; v4[entities.Obstacles.Baloon.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v4[entities.Obstacles.Baloon.C_ARG_TYPE_ON_TEXT] = 'HIT ME!'; v4[entities.Obstacles.Baloon.C_ARG_TYPE_SHOW_HEALTH] = true; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v4[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 400; v4[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v4[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_HANGAR'; v2.push(v4); v4 = new Array(); v4[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v4[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 500; v4[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v4[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_WIND_RIBBON'; v4[entities.Obstacles.StaticObs.C_ARG_SCALE] = v15.getX() >= 0 ? 70 : -70; v2.push(v4); this.c.setConfigItemArr(config.levels.LevelConfig.AIR_OBSTACLES_ARRAY, v2); this.c.setConfigItemArr(config.levels.LevelConfig.BONUSES_ARRAY, [enums.BonusTypes.EXTRA_LIFE, enums.BonusTypes.GUN_BERSERK, enums.BonusTypes.AFTERBURNER, enums.BonusTypes.GUN_JAM]); }; config.levels.Level_10 = v1; var v2 = v1.prototype; v2.getLevelConfig = function () { return this.c; }; v2.C_ENEMY_PLANE_1_IDX = 3; v2.C_ENEMY_PLANE_2_IDX = 4; v2.C_WIND_STR = 0; ASSetPropFlags(config.levels.Level_10.prototype, null, 1); } #endinitclip } movieClip 1826 __Packages.config.levels.Level_11 { #initclip if (!_global.config) { _global.config = new Object(); } if (!_global.config.levels) { _global.config.levels = new Object(); } if (!_global.config.levels.Level_11) { var v1 = function (levelId, gameConfig) { this.__gameConfig = gameConfig; this.c = new config.levels.LevelConfig(); var v6; var v8; v6 = this.__gameConfig.getPlayersPlaneConfig(); v8 = v6.getPlaneType(); v6.setStartPosType(enums.PlaneStartPosTypes.FIRST); var v10; v10 = v6.getGroupId(); ++v10; v6.setNumOfLives(config.levels.WorldConfig.C_LIVES_3_PLANES); var v11; var v12; v12 = config.levels.WorldConfig.getPlaneTypeFromIdxNotMy(v8, this.C_ENEMY_PLANE_1_IDX); v11 = new PlaneConfig(v12, enums.PlaneStartPosTypes.THIRD, enums.DefaultKeyTypes.AI, enums.AIProfiles.NORMAL, config.levels.WorldConfig.C_LIVES_3_PLANES, v10++); var v2; v2 = config.levels.WorldConfig.addMoreStatHardMode(v8); v11.setPlaneAttributes(2 + v2, 2 + v2, 2 + v2, 4 + v2, 2 + v2); v11.setPlaneItemList([enums.ItemTypes.MACHINE_GUN, enums.ItemTypes.TWIN_MACHINE_GUN, enums.ItemTypes.IMPACT_BOMBS, enums.ItemTypes.GAUSS_ACCELERATOR, enums.ItemTypes.PROXIMITY_DETECTOR]); var v9; var v13; v13 = config.levels.WorldConfig.getPlaneTypeFromIdxNotMy(v8, this.C_ENEMY_PLANE_2_IDX); v9 = new PlaneConfig(v13, enums.PlaneStartPosTypes.FOURTH, enums.DefaultKeyTypes.AI, enums.AIProfiles.NORMAL, config.levels.WorldConfig.C_LIVES_3_PLANES, v10++); v9.setPlaneAttributes(3 + v2, 3 + v2, 3 + v2, 4 + v2, 2 + v2); v9.setPlaneItemList([enums.ItemTypes.MACHINE_GUN, enums.ItemTypes.BURST_GUN, enums.ItemTypes.HOMING_MISSILES, enums.ItemTypes.GAUSS_ACCELERATOR, enums.ItemTypes.GUIDANCE_SYSTEM]); this.c.setConfigItemArr(config.levels.LevelConfig.PLANES_POS_AND_CONF, [v6, v11, v9]); this.c.setConfigItem(config.levels.LevelConfig.TITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_TITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.SUBTITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_SUBTITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.MISSION, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_MISSION_TXT)); var v18; var v16; v18 = String(enums.PlaneTypes.getPlaneInfo(v12, enums.PlaneTypes.C_INFO_PILOT_CLIP)); v16 = String(enums.PlaneTypes.getPlaneInfo(v13, enums.PlaneTypes.C_INFO_PILOT_CLIP)); this.c.setConfigItemArr(config.levels.LevelConfig.OBJECTIVE_CLIP_DESC, [v18, undefined, v16, undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_OBJECTIVE_TXT)]); var v14 = enums.SkyTypes.BLUE; var v17; v17 = String(enums.SkyTypes.getInfo(v14, enums.SkyTypes.C_BRIEFING_WEATHER_CLIP_NAME)); this.c.setConfigItemArr(config.levels.LevelConfig.WEATHER_CLIP_DESC, [v17, undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_WEATHER_TXT)]); this.c.setConfigItemArr(config.levels.LevelConfig.HINTS_CLIP_DESC, ['S_MISSION_LIGHTBALL', undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_HINT_TXT)]); this.c.setConfigItem(config.levels.LevelConfig.ARENA_SIZE_TYPE, enums.ArenaSizeTypes.MEDIUM); this.c.setConfigItem(config.levels.LevelConfig.LOCATION, enums.LocationTypes.NEVADA_DESERT); this.c.setConfigItem(config.levels.LevelConfig.WEATHER, enums.WeatherTypes.SUNNY); this.c.setConfigItem(config.levels.LevelConfig.SKY_TYPE, v14); var v15; v15 = new Vector2D(this.C_WIND_STR, 0); this.c.setConfigItem(config.levels.LevelConfig.WIND_DIR, v15); var v3; v3 = new Array(); var v4; v4 = new Array(); v4[entities.Obstacles.BirdFormation.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BIRD_FORMATION; v4[entities.Obstacles.BirdFormation.C_ARG_TYPE_X] = -500 + 1300 * Math.random(); v4[entities.Obstacles.BirdFormation.C_ARG_TYPE_Y] = 50 + 350 * Math.random(); v4[entities.Obstacles.BirdFormation.C_ARG_TYPE_VELOCITY] = 0.7 + 0.9 * Math.random(); v4[entities.Obstacles.BirdFormation.C_ARG_TYPE_DIRECTION] = new Vector2D(-1, 0); v3.push(v4); v4 = new Array(); v4[entities.Obstacles.BirdFormation.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BIRD_FORMATION; v4[entities.Obstacles.BirdFormation.C_ARG_TYPE_X] = -500 + 1300 * Math.random(); v4[entities.Obstacles.BirdFormation.C_ARG_TYPE_Y] = 50 + 350 * Math.random(); v4[entities.Obstacles.BirdFormation.C_ARG_TYPE_VELOCITY] = 0.99 + 0.9 * Math.random(); v4[entities.Obstacles.BirdFormation.C_ARG_TYPE_DIRECTION] = new Vector2D(-1, 0); v3.push(v4); var v5; v5 = new Array(); v5[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v5[entities.Obstacles.Target.C_ARG_TYPE_X] = -100; v5[entities.Obstacles.Target.C_ARG_TYPE_Y] = 430; v5[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 10; v5[entities.Obstacles.Target.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v3.push(v5); v5 = new Array(); v5[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v5[entities.Obstacles.Target.C_ARG_TYPE_X] = -200; v5[entities.Obstacles.Target.C_ARG_TYPE_Y] = 280; v5[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 10; v5[entities.Obstacles.Target.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v3.push(v5); v5 = new Array(); v5[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v5[entities.Obstacles.Target.C_ARG_TYPE_X] = 900; v5[entities.Obstacles.Target.C_ARG_TYPE_Y] = 430; v5[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 10; v5[entities.Obstacles.Target.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v3.push(v5); v5 = new Array(); v5[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v5[entities.Obstacles.Target.C_ARG_TYPE_X] = 1000; v5[entities.Obstacles.Target.C_ARG_TYPE_Y] = 280; v5[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 10; v5[entities.Obstacles.Target.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v3.push(v5); v5 = new Array(); v5[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v5[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 400; v5[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v5[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_HANGAR'; v3.push(v5); v5 = new Array(); v5[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v5[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 500; v5[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v5[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_WIND_RIBBON'; v5[entities.Obstacles.StaticObs.C_ARG_SCALE] = v15.getX() >= 0 ? 70 : -70; v3.push(v5); this.c.setConfigItemArr(config.levels.LevelConfig.AIR_OBSTACLES_ARRAY, v3); this.c.setConfigItemArr(config.levels.LevelConfig.BONUSES_ARRAY, [enums.BonusTypes.GUN_BERSERK, enums.BonusTypes.AFTERBURNER, enums.BonusTypes.EXTRA_LIFE]); }; config.levels.Level_11 = v1; var v2 = v1.prototype; v2.getLevelConfig = function () { return this.c; }; v2.C_ENEMY_PLANE_1_IDX = 1; v2.C_ENEMY_PLANE_2_IDX = 3; v2.C_WIND_STR = 0; ASSetPropFlags(config.levels.Level_11.prototype, null, 1); } #endinitclip } movieClip 1827 __Packages.config.levels.Level_12 { #initclip if (!_global.config) { _global.config = new Object(); } if (!_global.config.levels) { _global.config.levels = new Object(); } if (!_global.config.levels.Level_12) { var v1 = function (levelId, gameConfig) { this.__gameConfig = gameConfig; this.c = new config.levels.LevelConfig(); var v5; var v7; v5 = this.__gameConfig.getPlayersPlaneConfig(); v7 = v5.getPlaneType(); v5.setStartPosType(enums.PlaneStartPosTypes.FIRST); var v9; v9 = v5.getGroupId(); ++v9; v5.setNumOfLives(config.levels.WorldConfig.C_LIVES_3_PLANES); var v10; var v11; v11 = config.levels.WorldConfig.getPlaneTypeFromIdxNotMy(v7, this.C_ENEMY_PLANE_1_IDX); v10 = new PlaneConfig(v11, enums.PlaneStartPosTypes.THIRD, enums.DefaultKeyTypes.AI, enums.AIProfiles.NORMAL, config.levels.WorldConfig.C_LIVES_3_PLANES, v9++); var v2; v2 = config.levels.WorldConfig.addMoreStatHardMode(v7); v10.setPlaneAttributes(3 + v2, 2 + v2, 2 + v2, 4 + v2, 2 + v2); v10.setPlaneItemList([enums.ItemTypes.TWIN_MACHINE_GUN, enums.ItemTypes.IMPACT_BOMBS, enums.ItemTypes.GAUSS_ACCELERATOR, enums.ItemTypes.PROXIMITY_DETECTOR, enums.ItemTypes.MALICIOUS_PARACHUTE]); var v8; var v12; v12 = config.levels.WorldConfig.getPlaneTypeFromIdxNotMy(v7, this.C_ENEMY_PLANE_2_IDX); v8 = new PlaneConfig(v12, enums.PlaneStartPosTypes.FOURTH, enums.DefaultKeyTypes.AI, enums.AIProfiles.NORMAL, config.levels.WorldConfig.C_LIVES_3_PLANES, v9++); v8.setPlaneAttributes(2 + v2, 3 + v2, 3 + v2, 4 + v2, 3 + v2); v8.setPlaneItemList([enums.ItemTypes.BURST_GUN, enums.ItemTypes.HOMING_MISSILES, enums.ItemTypes.GAUSS_ACCELERATOR, enums.ItemTypes.GUIDANCE_SYSTEM, enums.ItemTypes.EMERGENCY_PARACHUTE]); this.c.setConfigItemArr(config.levels.LevelConfig.PLANES_POS_AND_CONF, [v5, v10, v8]); this.c.setConfigItem(config.levels.LevelConfig.TITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_TITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.SUBTITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_SUBTITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.MISSION, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_MISSION_TXT)); var v17; var v15; v17 = String(enums.PlaneTypes.getPlaneInfo(v11, enums.PlaneTypes.C_INFO_PILOT_CLIP)); v15 = String(enums.PlaneTypes.getPlaneInfo(v12, enums.PlaneTypes.C_INFO_PILOT_CLIP)); this.c.setConfigItemArr(config.levels.LevelConfig.OBJECTIVE_CLIP_DESC, [v17, undefined, v15, undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_OBJECTIVE_TXT)]); var v13 = enums.SkyTypes.NIGHT; var v16; v16 = String(enums.SkyTypes.getInfo(v13, enums.SkyTypes.C_BRIEFING_WEATHER_CLIP_NAME)); this.c.setConfigItemArr(config.levels.LevelConfig.WEATHER_CLIP_DESC, [v16, undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_WEATHER_TXT)]); this.c.setConfigItemArr(config.levels.LevelConfig.HINTS_CLIP_DESC, ['S_MISSION_LIGHTBALL', undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_HINT_TXT)]); this.c.setConfigItemArr(config.levels.LevelConfig.HINT_DIALOG_ARRAY, ['S_HGLD_BONUS_DRUNKEN_PILOT']); this.c.setConfigItem(config.levels.LevelConfig.ARENA_SIZE_TYPE, enums.ArenaSizeTypes.MEDIUM); this.c.setConfigItem(config.levels.LevelConfig.LOCATION, enums.LocationTypes.NEVADA_DESERT); this.c.setConfigItem(config.levels.LevelConfig.WEATHER, enums.WeatherTypes.PARTLY); this.c.setConfigItem(config.levels.LevelConfig.SKY_TYPE, v13); var v14; v14 = new Vector2D(this.C_WIND_STR, 0); this.c.setConfigItem(config.levels.LevelConfig.WIND_DIR, v14); var v4; v4 = new Array(); var v3; v3 = new Array(); v3[entities.Obstacles.Baloon.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BALOON; v3[entities.Obstacles.Baloon.C_ARG_TYPE_X] = -100; v3[entities.Obstacles.Baloon.C_ARG_TYPE_Y] = 395; v3[entities.Obstacles.Baloon.C_ARG_TYPE_VELOCITY] = 0; v3[entities.Obstacles.Baloon.C_ARG_TYPE_DIRECTION] = new Vector2D(1, 0); v3[entities.Obstacles.Baloon.C_ARG_TYPE_HITPOINTS] = 80; v3[entities.Obstacles.Baloon.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY_ALLY; v3[entities.Obstacles.Baloon.C_ARG_TYPE_ON_TEXT] = 'ALLY'; v3[entities.Obstacles.Baloon.C_ARG_TYPE_SHOW_HEALTH] = true; v4.push(v3); v3 = new Array(); v3[entities.Obstacles.Baloon.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BALOON; v3[entities.Obstacles.Baloon.C_ARG_TYPE_X] = -200; v3[entities.Obstacles.Baloon.C_ARG_TYPE_Y] = 400; v3[entities.Obstacles.Baloon.C_ARG_TYPE_VELOCITY] = 0; v3[entities.Obstacles.Baloon.C_ARG_TYPE_DIRECTION] = new Vector2D(1, 0); v3[entities.Obstacles.Baloon.C_ARG_TYPE_HITPOINTS] = 80; v3[entities.Obstacles.Baloon.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY_ALLY; v3[entities.Obstacles.Baloon.C_ARG_TYPE_ON_TEXT] = 'ALLY'; v3[entities.Obstacles.Baloon.C_ARG_TYPE_SHOW_HEALTH] = true; v4.push(v3); v3 = new Array(); v3[entities.Obstacles.Baloon.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BALOON; v3[entities.Obstacles.Baloon.C_ARG_TYPE_X] = -300; v3[entities.Obstacles.Baloon.C_ARG_TYPE_Y] = 410; v3[entities.Obstacles.Baloon.C_ARG_TYPE_VELOCITY] = 0; v3[entities.Obstacles.Baloon.C_ARG_TYPE_DIRECTION] = new Vector2D(1, 0); v3[entities.Obstacles.Baloon.C_ARG_TYPE_HITPOINTS] = 80; v3[entities.Obstacles.Baloon.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY_ALLY; v3[entities.Obstacles.Baloon.C_ARG_TYPE_ON_TEXT] = 'ALLY'; v3[entities.Obstacles.Baloon.C_ARG_TYPE_SHOW_HEALTH] = true; v4.push(v3); v3 = new Array(); v3[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v3[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 400; v3[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v3[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_HANGAR'; v4.push(v3); v3 = new Array(); v3[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v3[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 500; v3[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v3[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_WIND_RIBBON'; v3[entities.Obstacles.StaticObs.C_ARG_SCALE] = v14.getX() >= 0 ? 70 : -70; v4.push(v3); this.c.setConfigItemArr(config.levels.LevelConfig.AIR_OBSTACLES_ARRAY, v4); this.c.setConfigItemArr(config.levels.LevelConfig.BONUSES_ARRAY, [enums.BonusTypes.GUN_BERSERK, enums.BonusTypes.AFTERBURNER, enums.BonusTypes.EXTRA_LIFE, enums.BonusTypes.GUN_JAM, enums.BonusTypes.DRUNKEN_PILOT]); }; config.levels.Level_12 = v1; var v2 = v1.prototype; v2.getLevelConfig = function () { return this.c; }; v2.C_ENEMY_PLANE_1_IDX = 2; v2.C_ENEMY_PLANE_2_IDX = 4; v2.C_WIND_STR = 0; ASSetPropFlags(config.levels.Level_12.prototype, null, 1); } #endinitclip } movieClip 1828 __Packages.config.levels.Level_13 { #initclip if (!_global.config) { _global.config = new Object(); } if (!_global.config.levels) { _global.config.levels = new Object(); } if (!_global.config.levels.Level_13) { var v1 = function (levelId, gameConfig) { this.__gameConfig = gameConfig; this.c = new config.levels.LevelConfig(); var v5; var v10; v5 = this.__gameConfig.getPlayersPlaneConfig(); v10 = v5.getPlaneType(); v5.setStartPosType(enums.PlaneStartPosTypes.FIRST); v5.setNumOfLives(config.levels.WorldConfig.C_LIVES_3_PLANES); this.c.setConfigItemArr(config.levels.LevelConfig.PLANES_POS_AND_CONF, [v5]); this.c.setConfigItem(config.levels.LevelConfig.TITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_TITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.SUBTITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_SUBTITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.MISSION, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_MISSION_TXT)); var v6 = enums.SkyTypes.SUNRISE; var v8; v8 = String(enums.SkyTypes.getInfo(v6, enums.SkyTypes.C_BRIEFING_WEATHER_CLIP_NAME)); this.c.setConfigItemArr(config.levels.LevelConfig.OBJECTIVE_CLIP_DESC, ['S_MISSION_AIRSHIP', undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_OBJECTIVE_TXT)]); this.c.setConfigItemArr(config.levels.LevelConfig.WEATHER_CLIP_DESC, [v8, undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_WEATHER_TXT)]); this.c.setConfigItemArr(config.levels.LevelConfig.WEATHER_CLIP_DESC, ['S_MISSION_WEATHER', undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_WEATHER_TXT)]); this.c.setConfigItemArr(config.levels.LevelConfig.HINTS_CLIP_DESC, ['S_MISSION_BONUS', undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_HINT_TXT)]); this.c.setConfigItem(config.levels.LevelConfig.TIME_LIMIT_SEC, this.C_TIME_LIMIT_SEC); this.c.setConfigItem(config.levels.LevelConfig.TIME_LIMIT_SEC_IS_POSITIVE, true); this.c.setConfigItem(config.levels.LevelConfig.ARENA_SIZE_TYPE, enums.ArenaSizeTypes.LARGE); this.c.setConfigItem(config.levels.LevelConfig.LOCATION, enums.LocationTypes.NEVADA_DESERT); this.c.setConfigItem(config.levels.LevelConfig.WEATHER, enums.WeatherTypes.SUNNY); this.c.setConfigItem(config.levels.LevelConfig.SKY_TYPE, v6); var v7; v7 = new Vector2D(0, 0); this.c.setConfigItem(config.levels.LevelConfig.WIND_DIR, v7); var v2; v2 = new Array(); var v9 = 100; var v3; v3 = new Array(); v3[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v3[entities.Obstacles.Target.C_ARG_TYPE_X] = -600; v3[entities.Obstacles.Target.C_ARG_TYPE_Y] = 150; v3[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 5; v3[entities.Obstacles.Target.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v2.push(v3); v3 = new Array(); v3[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v3[entities.Obstacles.Target.C_ARG_TYPE_X] = -600; v3[entities.Obstacles.Target.C_ARG_TYPE_Y] = 300; v3[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 5; v3[entities.Obstacles.Target.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v2.push(v3); v3 = new Array(); v3[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v3[entities.Obstacles.Target.C_ARG_TYPE_X] = -600; v3[entities.Obstacles.Target.C_ARG_TYPE_Y] = 450; v3[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 5; v3[entities.Obstacles.Target.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v2.push(v3); v3 = new Array(); v3[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v3[entities.Obstacles.Target.C_ARG_TYPE_X] = 1400; v3[entities.Obstacles.Target.C_ARG_TYPE_Y] = 150; v3[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 5; v3[entities.Obstacles.Target.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v2.push(v3); v3 = new Array(); v3[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v3[entities.Obstacles.Target.C_ARG_TYPE_X] = 1400; v3[entities.Obstacles.Target.C_ARG_TYPE_Y] = 300; v3[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 5; v3[entities.Obstacles.Target.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v2.push(v3); v3 = new Array(); v3[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v3[entities.Obstacles.Target.C_ARG_TYPE_X] = 1400; v3[entities.Obstacles.Target.C_ARG_TYPE_Y] = 450; v3[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 5; v3[entities.Obstacles.Target.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v2.push(v3); v3 = new Array(); v3[entities.Obstacles.Baloon.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BALOON; v3[entities.Obstacles.Baloon.C_ARG_TYPE_X] = -500 * Math.random(); v3[entities.Obstacles.Baloon.C_ARG_TYPE_Y] = 100; v3[entities.Obstacles.Baloon.C_ARG_TYPE_VELOCITY] = 1.5; v3[entities.Obstacles.Baloon.C_ARG_TYPE_DIRECTION] = new Vector2D(1, 0); v3[entities.Obstacles.Baloon.C_ARG_TYPE_HITPOINTS] = 15; v3[entities.Obstacles.Baloon.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v3[entities.Obstacles.Baloon.C_ARG_TYPE_ON_TEXT] = 'HIT ME!'; v2.push(v3); v3 = new Array(); v3[entities.Obstacles.Baloon.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BALOON; v3[entities.Obstacles.Baloon.C_ARG_TYPE_X] = -500 * Math.random(); v3[entities.Obstacles.Baloon.C_ARG_TYPE_Y] = 200; v3[entities.Obstacles.Baloon.C_ARG_TYPE_VELOCITY] = 1; v3[entities.Obstacles.Baloon.C_ARG_TYPE_DIRECTION] = new Vector2D(1, 0); v3[entities.Obstacles.Baloon.C_ARG_TYPE_HITPOINTS] = 15; v3[entities.Obstacles.Baloon.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v3[entities.Obstacles.Baloon.C_ARG_TYPE_ON_TEXT] = 'HIT ME!'; v2.push(v3); v3 = new Array(); v3[entities.Obstacles.Baloon.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BALOON; v3[entities.Obstacles.Baloon.C_ARG_TYPE_X] = -500 * Math.random(); v3[entities.Obstacles.Baloon.C_ARG_TYPE_Y] = 300; v3[entities.Obstacles.Baloon.C_ARG_TYPE_VELOCITY] = 0.6; v3[entities.Obstacles.Baloon.C_ARG_TYPE_DIRECTION] = new Vector2D(1, 0); v3[entities.Obstacles.Baloon.C_ARG_TYPE_HITPOINTS] = 15; v3[entities.Obstacles.Baloon.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v3[entities.Obstacles.Baloon.C_ARG_TYPE_ON_TEXT] = 'HIT ME!'; v2.push(v3); v3 = new Array(); v3[entities.Obstacles.Baloon.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BALOON; v3[entities.Obstacles.Baloon.C_ARG_TYPE_X] = 1300 - 500 * Math.random(); v3[entities.Obstacles.Baloon.C_ARG_TYPE_Y] = 100; v3[entities.Obstacles.Baloon.C_ARG_TYPE_VELOCITY] = 1.5; v3[entities.Obstacles.Baloon.C_ARG_TYPE_DIRECTION] = new Vector2D(-1, 0); v3[entities.Obstacles.Baloon.C_ARG_TYPE_HITPOINTS] = 15; v3[entities.Obstacles.Baloon.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v3[entities.Obstacles.Baloon.C_ARG_TYPE_ON_TEXT] = 'HIT ME!'; v2.push(v3); v3 = new Array(); v3[entities.Obstacles.Baloon.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BALOON; v3[entities.Obstacles.Baloon.C_ARG_TYPE_X] = 1300 - 500 * Math.random(); v3[entities.Obstacles.Baloon.C_ARG_TYPE_Y] = 200; v3[entities.Obstacles.Baloon.C_ARG_TYPE_VELOCITY] = 1; v3[entities.Obstacles.Baloon.C_ARG_TYPE_DIRECTION] = new Vector2D(-1, 0); v3[entities.Obstacles.Baloon.C_ARG_TYPE_HITPOINTS] = 15; v3[entities.Obstacles.Baloon.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v3[entities.Obstacles.Baloon.C_ARG_TYPE_ON_TEXT] = 'HIT ME!'; v2.push(v3); v3 = new Array(); v3[entities.Obstacles.Baloon.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BALOON; v3[entities.Obstacles.Baloon.C_ARG_TYPE_X] = 1300 - 500 * Math.random(); v3[entities.Obstacles.Baloon.C_ARG_TYPE_Y] = 300; v3[entities.Obstacles.Baloon.C_ARG_TYPE_VELOCITY] = 0.6; v3[entities.Obstacles.Baloon.C_ARG_TYPE_DIRECTION] = new Vector2D(-1, 0); v3[entities.Obstacles.Baloon.C_ARG_TYPE_HITPOINTS] = 15; v3[entities.Obstacles.Baloon.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v3[entities.Obstacles.Baloon.C_ARG_TYPE_ON_TEXT] = 'HIT ME!'; v2.push(v3); v3 = new Array(); v3[entities.Obstacles.Baloon.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.AIRSHIP; v3[entities.Obstacles.Baloon.C_ARG_TYPE_X] = 800 * Math.random(); v3[entities.Obstacles.Baloon.C_ARG_TYPE_Y] = 100 + 150 * Math.random(); v3[entities.Obstacles.Baloon.C_ARG_TYPE_VELOCITY] = 0.1 + 0.2 * Math.random(); v3[entities.Obstacles.Baloon.C_ARG_TYPE_DIRECTION] = new Vector2D(-1, 0); v3[entities.Obstacles.Baloon.C_ARG_TYPE_HITPOINTS] = 70; v3[entities.Obstacles.Baloon.C_ARG_TYPE_ON_TEXT] = 'DESTROY ME!'; v3[entities.Obstacles.Baloon.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v2.push(v3); v3 = new Array(); v3[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v3[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 400; v3[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v3[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_HANGAR'; v2.push(v3); v3 = new Array(); v3[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v3[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 500; v3[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v3[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_WIND_RIBBON'; v3[entities.Obstacles.StaticObs.C_ARG_SCALE] = v7.getX() >= 0 ? 70 : -70; v2.push(v3); this.c.setConfigItemArr(config.levels.LevelConfig.AIR_OBSTACLES_ARRAY, v2); this.c.setConfigItemArr(config.levels.LevelConfig.BONUSES_ARRAY, [enums.BonusTypes.GUN_BERSERK]); }; config.levels.Level_13 = v1; var v2 = v1.prototype; v2.getLevelConfig = function () { return this.c; }; v2.C_ENEMY_PLANE_IDX = 0; v2.C_TIME_LIMIT_SEC = 180; ASSetPropFlags(config.levels.Level_13.prototype, null, 1); } #endinitclip } movieClip 1829 __Packages.config.levels.Level_14 { #initclip if (!_global.config) { _global.config = new Object(); } if (!_global.config.levels) { _global.config.levels = new Object(); } if (!_global.config.levels.Level_14) { var v1 = function (levelId, gameConfig) { this.__gameConfig = gameConfig; this.c = new config.levels.LevelConfig(); var v5; var v8; v5 = this.__gameConfig.getPlayersPlaneConfig(); v8 = v5.getPlaneType(); v5.setStartPosType(enums.PlaneStartPosTypes.FIRST); var v9; v9 = v5.getGroupId(); ++v9; v5.setNumOfLives(config.levels.WorldConfig.C_LIVES_4_PLANES); var v12; var v13; v13 = config.levels.WorldConfig.getPlaneTypeFromIdxNotMy(v8, this.C_ENEMY_PLANE_1_IDX); v12 = new PlaneConfig(v13, enums.PlaneStartPosTypes.SECOND, enums.DefaultKeyTypes.AI, enums.AIProfiles.NORMAL, config.levels.WorldConfig.C_LIVES_4_PLANES, v9++); var v2; v2 = config.levels.WorldConfig.addMoreStatHardMode(v8); v12.setPlaneAttributes(3 + v2, 2 + v2, 2 + v2, 4 + v2, 3 + v2); v12.setPlaneItemList([enums.ItemTypes.MACHINE_GUN, enums.ItemTypes.TAIL_GUN, enums.ItemTypes.AUTO_REPAIR_PACK, enums.ItemTypes.MALICIOUS_PARACHUTE, enums.ItemTypes.GAUSS_ACCELERATOR]); var v11; var v15; v15 = config.levels.WorldConfig.getPlaneTypeFromIdxNotMy(v8, this.C_ENEMY_PLANE_2_IDX); v11 = new PlaneConfig(v15, enums.PlaneStartPosTypes.THIRD, enums.DefaultKeyTypes.AI, enums.AIProfiles.NORMAL, config.levels.WorldConfig.C_LIVES_4_PLANES, v9++); v11.setPlaneAttributes(4 + v2, 3 + v2, 3 + v2, 4 + v2, 2 + v2); v11.setPlaneItemList([enums.ItemTypes.TWIN_MACHINE_GUN, enums.ItemTypes.IMPACT_BOMBS, enums.ItemTypes.PROXIMITY_DETECTOR]); var v10; var v14; v14 = config.levels.WorldConfig.getPlaneTypeFromIdxNotMy(v8, this.C_ENEMY_PLANE_3_IDX); v10 = new PlaneConfig(v14, enums.PlaneStartPosTypes.FOURTH, enums.DefaultKeyTypes.AI, enums.AIProfiles.NORMAL, config.levels.WorldConfig.C_LIVES_4_PLANES, v9++); v10.setPlaneAttributes(3 + v2, 3 + v2, 3 + v2, 4 + v2, 3 + v2); v10.setPlaneItemList([enums.ItemTypes.MACHINE_GUN, enums.ItemTypes.BURST_GUN, enums.ItemTypes.HOMING_MISSILES, enums.ItemTypes.GUIDANCE_SYSTEM]); this.c.setConfigItemArr(config.levels.LevelConfig.PLANES_POS_AND_CONF, [v5, v12, v11, v10]); this.c.setConfigItem(config.levels.LevelConfig.TITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_TITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.SUBTITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_SUBTITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.MISSION, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_MISSION_TXT)); var v21; var v18; var v19; v21 = String(enums.PlaneTypes.getPlaneInfo(v13, enums.PlaneTypes.C_INFO_PILOT_CLIP)); v18 = String(enums.PlaneTypes.getPlaneInfo(v15, enums.PlaneTypes.C_INFO_PILOT_CLIP)); v19 = String(enums.PlaneTypes.getPlaneInfo(v14, enums.PlaneTypes.C_INFO_PILOT_CLIP)); this.c.setConfigItemArr(config.levels.LevelConfig.OBJECTIVE_CLIP_DESC, [v21, undefined, v18, undefined, v19, undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_OBJECTIVE_TXT)]); var v16 = enums.SkyTypes.GREY; var v20; v20 = String(enums.SkyTypes.getInfo(v16, enums.SkyTypes.C_BRIEFING_WEATHER_CLIP_NAME)); this.c.setConfigItemArr(config.levels.LevelConfig.WEATHER_CLIP_DESC, [v20, undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_WEATHER_TXT)]); this.c.setConfigItemArr(config.levels.LevelConfig.HINTS_CLIP_DESC, ['S_MISSION_LIGHTBALL', undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_HINT_TXT)]); this.c.setConfigItem(config.levels.LevelConfig.ARENA_SIZE_TYPE, enums.ArenaSizeTypes.LARGE); this.c.setConfigItem(config.levels.LevelConfig.LOCATION, enums.LocationTypes.DOLOMITES); this.c.setConfigItem(config.levels.LevelConfig.WEATHER, enums.WeatherTypes.SUNNY); this.c.setConfigItem(config.levels.LevelConfig.SKY_TYPE, v16); var v17; v17 = new Vector2D(this.C_WIND_STR, 0); this.c.setConfigItem(config.levels.LevelConfig.WIND_DIR, v17); this.c.setConfigItemArr(config.levels.LevelConfig.HINT_DIALOG_ARRAY, ['S_HGLD_BONUS_SCREWCUTTER']); var v6; v6 = new Array(); var v4; v4 = new Array(); v4[entities.Obstacles.Tornado.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TORNADO; v4[entities.Obstacles.Tornado.C_ARG_TYPE_X] = 950; v4[entities.Obstacles.Tornado.C_ARG_TYPE_VELOCITY] = 1; v4[entities.Obstacles.Tornado.C_ARG_TYPE_DIRECTION] = new Vector2D(-1, 0); v6.push(v4); var v3; v3 = new Array(); v3[entities.Obstacles.Baloon.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BALOON; v3[entities.Obstacles.Baloon.C_ARG_TYPE_X] = -100; v3[entities.Obstacles.Baloon.C_ARG_TYPE_Y] = 200; v3[entities.Obstacles.Baloon.C_ARG_TYPE_VELOCITY] = 3; v3[entities.Obstacles.Baloon.C_ARG_TYPE_DIRECTION] = new Vector2D(-1, 0); v3[entities.Obstacles.Baloon.C_ARG_TYPE_HITPOINTS] = 35; v3[entities.Obstacles.Baloon.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v3[entities.Obstacles.Baloon.C_ARG_TYPE_ON_TEXT] = ''; v6.push(v3); v3 = new Array(); v3[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v3[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 400; v3[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v3[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_HANGAR'; v6.push(v3); v3 = new Array(); v3[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v3[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 500; v3[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v3[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_WIND_RIBBON'; v3[entities.Obstacles.StaticObs.C_ARG_SCALE] = v17.getX() >= 0 ? 70 : -70; v6.push(v3); this.c.setConfigItemArr(config.levels.LevelConfig.AIR_OBSTACLES_ARRAY, v6); this.c.setConfigItemArr(config.levels.LevelConfig.BONUSES_ARRAY, [enums.BonusTypes.SCREWCUTTER]); }; config.levels.Level_14 = v1; var v2 = v1.prototype; v2.getLevelConfig = function () { return this.c; }; v2.C_ENEMY_PLANE_1_IDX = 1; v2.C_ENEMY_PLANE_2_IDX = 2; v2.C_ENEMY_PLANE_3_IDX = 3; v2.C_WIND_STR = -1; ASSetPropFlags(config.levels.Level_14.prototype, null, 1); } #endinitclip } movieClip 1830 __Packages.config.levels.Level_15 { #initclip if (!_global.config) { _global.config = new Object(); } if (!_global.config.levels) { _global.config.levels = new Object(); } if (!_global.config.levels.Level_15) { var v1 = function (levelId, gameConfig) { this.__gameConfig = gameConfig; this.c = new config.levels.LevelConfig(); var v4 = 1; var v18 = Const.C_COLOR_DARK_GREEN; var v6 = 2; var v19 = Const.C_COLOR_DARK_RED; GrpMan.setGroupColor(v4, v18); GrpMan.setGroupColor(v6, v19); GrpMan.setIsGroupColorShowed(true); var v7; var v9; v7 = this.__gameConfig.getPlayersPlaneConfig(); v9 = v7.getPlaneType(); v7.setStartPosType(enums.PlaneStartPosTypes.FIRST); v7.setGroupId(v4); v7.setNumOfLives(config.levels.WorldConfig.C_LIVES_4_PLANES); var v12; var v13; v13 = config.levels.WorldConfig.getPlaneTypeFromIdxNotMy(v9, this.C_ENEMY_PLANE_1_IDX); v12 = new PlaneConfig(v13, enums.PlaneStartPosTypes.SECOND, enums.DefaultKeyTypes.AI, enums.AIProfiles.NORMAL, config.levels.WorldConfig.C_LIVES_4_PLANES, v4, enums.TargetTypes.NONE); var v2; v2 = config.levels.WorldConfig.addMoreStatHardMode(v9); v12.setPlaneAttributes(2 + v2, 2 + v2, 2 + v2, 4 + v2, 3 + v2); v12.setPlaneItemList([enums.ItemTypes.TWIN_MACHINE_GUN, enums.ItemTypes.IMPACT_BOMBS, enums.ItemTypes.PROXIMITY_DETECTOR]); var v11; var v15; v15 = config.levels.WorldConfig.getPlaneTypeFromIdxNotMy(v9, this.C_ENEMY_PLANE_2_IDX); v11 = new PlaneConfig(v15, enums.PlaneStartPosTypes.THIRD, enums.DefaultKeyTypes.AI, enums.AIProfiles.NORMAL, config.levels.WorldConfig.C_LIVES_4_PLANES, v6, enums.TargetTypes.NONE); v11.setPlaneAttributes(2 + v2, 3 + v2, 3 + v2, 4 + v2, 3 + v2); v11.setPlaneItemList([enums.ItemTypes.BURST_GUN, enums.ItemTypes.HOMING_MISSILES, enums.ItemTypes.GUIDANCE_SYSTEM]); var v10; var v14; v14 = config.levels.WorldConfig.getPlaneTypeFromIdxNotMy(v9, this.C_ENEMY_PLANE_3_IDX); v10 = new PlaneConfig(v14, enums.PlaneStartPosTypes.FOURTH, enums.DefaultKeyTypes.AI, enums.AIProfiles.NORMAL, config.levels.WorldConfig.C_LIVES_4_PLANES, v6, enums.TargetTypes.NONE); v10.setPlaneAttributes(4 + v2, 3 + v2, 3 + v2, 4 + v2, 3 + v2); v10.setPlaneItemList([enums.ItemTypes.MACHINE_GUN, enums.ItemTypes.BURST_GUN, enums.ItemTypes.HOMING_MISSILES]); this.c.setConfigItemArr(config.levels.LevelConfig.PLANES_POS_AND_CONF, [v7, v12, v11, v10]); this.c.setConfigItem(config.levels.LevelConfig.TITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_TITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.SUBTITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_SUBTITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.MISSION, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_MISSION_TXT)); var v23; var v20; var v21; v23 = String(enums.PlaneTypes.getPlaneInfo(v13, enums.PlaneTypes.C_INFO_PILOT_CLIP)); v20 = String(enums.PlaneTypes.getPlaneInfo(v15, enums.PlaneTypes.C_INFO_PILOT_CLIP)); v21 = String(enums.PlaneTypes.getPlaneInfo(v14, enums.PlaneTypes.C_INFO_PILOT_CLIP)); this.c.setConfigItemArr(config.levels.LevelConfig.OBJECTIVE_CLIP_DESC, [v20, undefined, v21, undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_OBJECTIVE_TXT)]); var v16 = enums.SkyTypes.BLUE; var v22; v22 = String(enums.SkyTypes.getInfo(v16, enums.SkyTypes.C_BRIEFING_WEATHER_CLIP_NAME)); this.c.setConfigItemArr(config.levels.LevelConfig.WEATHER_CLIP_DESC, [v22, undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_WEATHER_TXT)]); this.c.setConfigItemArr(config.levels.LevelConfig.HINTS_CLIP_DESC, ['S_MISSION_LIGHTBALL', undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_HINT_TXT)]); this.c.setConfigItem(config.levels.LevelConfig.ARENA_SIZE_TYPE, enums.ArenaSizeTypes.LARGE); this.c.setConfigItem(config.levels.LevelConfig.TIME_LIMIT_SEC, this.C_TIME_LIMIT_SEC); this.c.setConfigItem(config.levels.LevelConfig.LOCATION, enums.LocationTypes.DOLOMITES); this.c.setConfigItem(config.levels.LevelConfig.WEATHER, enums.WeatherTypes.SUNNY); this.c.setConfigItem(config.levels.LevelConfig.SKY_TYPE, v16); var v17; v17 = new Vector2D(this.C_WIND_STR, 0); this.c.setConfigItem(config.levels.LevelConfig.WIND_DIR, v17); this.c.setConfigItemArr(config.levels.LevelConfig.HINT_DIALOG_ARRAY, ['S_HGLD_TEAM_GROUPING', 'S_HGLD_BONUS_ENGINE_FAILURE']); var v3; v3 = new Array(); var v5; v5 = new Array(); v5[entities.Obstacles.Baloon.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BALOON; v5[entities.Obstacles.Baloon.C_ARG_TYPE_X] = -500; v5[entities.Obstacles.Baloon.C_ARG_TYPE_Y] = 100; v5[entities.Obstacles.Baloon.C_ARG_TYPE_VELOCITY] = 0; v5[entities.Obstacles.Baloon.C_ARG_TYPE_DIRECTION] = new Vector2D(1, 0); v5[entities.Obstacles.Baloon.C_ARG_TYPE_HITPOINTS] = 25; v5[entities.Obstacles.Baloon.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.SECONDARY_ALLY; v5[entities.Obstacles.Baloon.C_ARG_TYPE_ON_TEXT] = 'DEFEND ME!'; v5[entities.Obstacles.Baloon.C_ARG_TYPE_GROUP_ID] = v4; v5[entities.Obstacles.Baloon.C_ARG_TYPE_SHOW_HEALTH] = true; v3.push(v5); v5 = new Array(); v5[entities.Obstacles.Baloon.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BALOON; v5[entities.Obstacles.Baloon.C_ARG_TYPE_X] = -300; v5[entities.Obstacles.Baloon.C_ARG_TYPE_Y] = 200; v5[entities.Obstacles.Baloon.C_ARG_TYPE_VELOCITY] = 0; v5[entities.Obstacles.Baloon.C_ARG_TYPE_DIRECTION] = new Vector2D(1, 0); v5[entities.Obstacles.Baloon.C_ARG_TYPE_HITPOINTS] = 25; v5[entities.Obstacles.Baloon.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.SECONDARY_ALLY; v5[entities.Obstacles.Baloon.C_ARG_TYPE_ON_TEXT] = 'DEFEND ME!'; v5[entities.Obstacles.Baloon.C_ARG_TYPE_GROUP_ID] = v4; v5[entities.Obstacles.Baloon.C_ARG_TYPE_SHOW_HEALTH] = true; v3.push(v5); v5 = new Array(); v5[entities.Obstacles.Baloon.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BALOON; v5[entities.Obstacles.Baloon.C_ARG_TYPE_X] = -400; v5[entities.Obstacles.Baloon.C_ARG_TYPE_Y] = 400; v5[entities.Obstacles.Baloon.C_ARG_TYPE_VELOCITY] = 0; v5[entities.Obstacles.Baloon.C_ARG_TYPE_DIRECTION] = new Vector2D(1, 0); v5[entities.Obstacles.Baloon.C_ARG_TYPE_HITPOINTS] = 25; v5[entities.Obstacles.Baloon.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.SECONDARY_ALLY; v5[entities.Obstacles.Baloon.C_ARG_TYPE_ON_TEXT] = 'DEFEND ME!'; v5[entities.Obstacles.Baloon.C_ARG_TYPE_GROUP_ID] = v4; v5[entities.Obstacles.Baloon.C_ARG_TYPE_SHOW_HEALTH] = true; v3.push(v5); v5 = new Array(); v5[entities.Obstacles.Baloon.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BALOON; v5[entities.Obstacles.Baloon.C_ARG_TYPE_X] = 1300; v5[entities.Obstacles.Baloon.C_ARG_TYPE_Y] = 100; v5[entities.Obstacles.Baloon.C_ARG_TYPE_VELOCITY] = 0; v5[entities.Obstacles.Baloon.C_ARG_TYPE_DIRECTION] = new Vector2D(-1, 0); v5[entities.Obstacles.Baloon.C_ARG_TYPE_HITPOINTS] = 60; v5[entities.Obstacles.Baloon.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v5[entities.Obstacles.Baloon.C_ARG_TYPE_ON_TEXT] = 'DESTROY ME!'; v5[entities.Obstacles.Baloon.C_ARG_TYPE_GROUP_ID] = v6; v5[entities.Obstacles.Baloon.C_ARG_TYPE_SHOW_HEALTH] = true; v3.push(v5); v5 = new Array(); v5[entities.Obstacles.Baloon.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BALOON; v5[entities.Obstacles.Baloon.C_ARG_TYPE_X] = 1100; v5[entities.Obstacles.Baloon.C_ARG_TYPE_Y] = 200; v5[entities.Obstacles.Baloon.C_ARG_TYPE_VELOCITY] = 0; v5[entities.Obstacles.Baloon.C_ARG_TYPE_DIRECTION] = new Vector2D(-1, 0); v5[entities.Obstacles.Baloon.C_ARG_TYPE_HITPOINTS] = 60; v5[entities.Obstacles.Baloon.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v5[entities.Obstacles.Baloon.C_ARG_TYPE_ON_TEXT] = 'DESTROY ME!'; v5[entities.Obstacles.Baloon.C_ARG_TYPE_GROUP_ID] = v6; v5[entities.Obstacles.Baloon.C_ARG_TYPE_SHOW_HEALTH] = true; v3.push(v5); v5 = new Array(); v5[entities.Obstacles.Baloon.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BALOON; v5[entities.Obstacles.Baloon.C_ARG_TYPE_X] = 1200; v5[entities.Obstacles.Baloon.C_ARG_TYPE_Y] = 400; v5[entities.Obstacles.Baloon.C_ARG_TYPE_VELOCITY] = 0; v5[entities.Obstacles.Baloon.C_ARG_TYPE_DIRECTION] = new Vector2D(-1, 0); v5[entities.Obstacles.Baloon.C_ARG_TYPE_HITPOINTS] = 60; v5[entities.Obstacles.Baloon.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.PRIMARY; v5[entities.Obstacles.Baloon.C_ARG_TYPE_ON_TEXT] = 'DESTROY ME!'; v5[entities.Obstacles.Baloon.C_ARG_TYPE_GROUP_ID] = v6; v5[entities.Obstacles.Baloon.C_ARG_TYPE_SHOW_HEALTH] = true; v3.push(v5); v5 = new Array(); v5[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v5[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 400; v5[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v5[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_HANGAR'; v3.push(v5); v5 = new Array(); v5[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v5[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 500; v5[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v5[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_WIND_RIBBON'; v5[entities.Obstacles.StaticObs.C_ARG_SCALE] = v17.getX() >= 0 ? 70 : -70; v3.push(v5); this.c.setConfigItemArr(config.levels.LevelConfig.AIR_OBSTACLES_ARRAY, v3); this.c.setConfigItemArr(config.levels.LevelConfig.BONUSES_ARRAY, [enums.BonusTypes.SCREWCUTTER, enums.BonusTypes.AFTERBURNER, enums.BonusTypes.GUN_JAM, enums.BonusTypes.ENGINE_FAILURE, enums.BonusTypes.EXTRA_LIFE, enums.BonusTypes.DRUNKEN_PILOT]); }; config.levels.Level_15 = v1; var v2 = v1.prototype; v2.getLevelConfig = function () { return this.c; }; v2.C_ENEMY_PLANE_1_IDX = 1; v2.C_ENEMY_PLANE_2_IDX = 2; v2.C_ENEMY_PLANE_3_IDX = 3; v2.C_WIND_STR = 0; v2.C_TIME_LIMIT_SEC = 180; ASSetPropFlags(config.levels.Level_15.prototype, null, 1); } #endinitclip } movieClip 1831 __Packages.config.levels.Level_16 { #initclip if (!_global.config) { _global.config = new Object(); } if (!_global.config.levels) { _global.config.levels = new Object(); } if (!_global.config.levels.Level_16) { var v1 = function (levelId, gameConfig) { this.__gameConfig = gameConfig; this.c = new config.levels.LevelConfig(); var v8 = 1; var v19 = Const.C_COLOR_DARK_GREEN; var v17 = 2; var v20 = Const.C_COLOR_DARK_RED; GrpMan.setGroupColor(v8, v19); GrpMan.setGroupColor(v17, v20); GrpMan.setIsGroupColorShowed(true); var v5; var v9; v5 = this.__gameConfig.getPlayersPlaneConfig(); v9 = v5.getPlaneType(); v5.setStartPosType(enums.PlaneStartPosTypes.FIRST); v5.setGroupId(v8); v5.setNumOfLives(config.levels.WorldConfig.C_LIVES_4_PLANES); var v13; var v14; v14 = config.levels.WorldConfig.getPlaneTypeFromIdxNotMy(v9, this.C_ENEMY_PLANE_1_IDX); v13 = new PlaneConfig(v14, enums.PlaneStartPosTypes.SECOND, enums.DefaultKeyTypes.AI, enums.AIProfiles.NORMAL, config.levels.WorldConfig.C_LIVES_4_PLANES, v8, enums.TargetTypes.NONE); var v2; v2 = config.levels.WorldConfig.addMoreStatHardMode(v9); v13.setPlaneAttributes(2 + v2, 2 + v2, 2 + v2, 4 + v2, 2 + v2); v13.setPlaneItemList([enums.ItemTypes.TWIN_MACHINE_GUN, enums.ItemTypes.IMPACT_BOMBS, enums.ItemTypes.GAUSS_ACCELERATOR]); var v12; var v15; v15 = config.levels.WorldConfig.getPlaneTypeFromIdxNotMy(v9, this.C_ENEMY_PLANE_2_IDX); v12 = new PlaneConfig(v15, enums.PlaneStartPosTypes.THIRD, enums.DefaultKeyTypes.AI, enums.AIProfiles.NORMAL, config.levels.WorldConfig.C_LIVES_4_PLANES, v8, enums.TargetTypes.NONE); v12.setPlaneAttributes(2 + v2, 3 + v2, 3 + v2, 4 + v2, 3 + v2); v12.setPlaneItemList([enums.ItemTypes.MACHINE_GUN, enums.ItemTypes.BURST_GUN, enums.ItemTypes.HOMING_MISSILES, enums.ItemTypes.GUIDANCE_SYSTEM]); var v11; var v10; v10 = config.levels.WorldConfig.getPlaneTypeFromIdxNotMy(v9, this.C_ENEMY_PLANE_3_IDX); v11 = new PlaneConfig(v10, enums.PlaneStartPosTypes.FOURTH, enums.DefaultKeyTypes.AI, enums.AIProfiles.NORMAL, config.levels.WorldConfig.C_LIVES_4_PLANES, v17); v11.setPlaneAttributes(4 + v2, 5 + v2, 3 + v2, 5 + v2, 5 + v2); v11.setPlaneItemList([enums.ItemTypes.TWIN_MACHINE_GUN, enums.ItemTypes.TAIL_GUN, enums.ItemTypes.HOMING_MISSILES, enums.ItemTypes.MALICIOUS_PARACHUTE, enums.ItemTypes.MAGNETIC_DEFLECTOR, enums.ItemTypes.AUTO_REPAIR_PACK, enums.ItemTypes.GUIDANCE_SYSTEM, enums.ItemTypes.GAUSS_ACCELERATOR, enums.ItemTypes.EMERGENCY_PARACHUTE, enums.ItemTypes.BURST_GUN]); this.c.setConfigItemArr(config.levels.LevelConfig.PLANES_POS_AND_CONF, [v5, v13, v12, v11]); this.c.setConfigItem(config.levels.LevelConfig.TITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_TITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.SUBTITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_SUBTITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.MISSION, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_MISSION_TXT)); var v25; var v24; var v21; v25 = String(enums.PlaneTypes.getPlaneInfo(v14, enums.PlaneTypes.C_INFO_PILOT_CLIP)); v24 = String(enums.PlaneTypes.getPlaneInfo(v15, enums.PlaneTypes.C_INFO_PILOT_CLIP)); v21 = String(enums.PlaneTypes.getPlaneInfo(v10, enums.PlaneTypes.C_INFO_PILOT_CLIP)); var v23; v23 = String(enums.PlaneTypes.getPlaneInfo(v10, enums.PlaneTypes.C_INFO_PLANE_CLIP)); this.c.setConfigItemArr(config.levels.LevelConfig.OBJECTIVE_CLIP_DESC, [v21, 'S_PILOT_1', v23, 'S_PILOT_1', config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_OBJECTIVE_TXT)]); var v16 = enums.SkyTypes.BLUE; var v22; v22 = String(enums.SkyTypes.getInfo(v16, enums.SkyTypes.C_BRIEFING_WEATHER_CLIP_NAME)); this.c.setConfigItemArr(config.levels.LevelConfig.WEATHER_CLIP_DESC, [v22, undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_WEATHER_TXT)]); this.c.setConfigItemArr(config.levels.LevelConfig.HINTS_CLIP_DESC, ['S_MISSION_LIGHTBALL', undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_HINT_TXT)]); this.c.setConfigItem(config.levels.LevelConfig.ARENA_SIZE_TYPE, enums.ArenaSizeTypes.LARGE); this.c.setConfigItem(config.levels.LevelConfig.LOCATION, enums.LocationTypes.DOLOMITES); this.c.setConfigItem(config.levels.LevelConfig.WEATHER, enums.WeatherTypes.SUNNY); this.c.setConfigItem(config.levels.LevelConfig.SKY_TYPE, v16); var v18; v18 = new Vector2D(this.C_WIND_STR, 0); this.c.setConfigItem(config.levels.LevelConfig.WIND_DIR, v18); var v6; v6 = new Array(); var v4; v4 = new Array(); v4[entities.Obstacles.Baloon.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BALOON; v4[entities.Obstacles.Baloon.C_ARG_TYPE_X] = 1000 * Math.random() - 200; v4[entities.Obstacles.Baloon.C_ARG_TYPE_Y] = 100 + 200 * Math.random(); v4[entities.Obstacles.Baloon.C_ARG_TYPE_VELOCITY] = 0.8 + Math.random(); v4[entities.Obstacles.Baloon.C_ARG_TYPE_DIRECTION] = new Vector2D(1, 0); v4[entities.Obstacles.Baloon.C_ARG_TYPE_HITPOINTS] = 8; v4[entities.Obstacles.Baloon.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v4[entities.Obstacles.Baloon.C_ARG_TYPE_ON_TEXT] = ''; v6.push(v4); var v3; v3 = new Array(); v3[entities.Obstacles.BirdFormation.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BIRD_FORMATION; v3[entities.Obstacles.BirdFormation.C_ARG_TYPE_X] = 800 * Math.random(); v3[entities.Obstacles.BirdFormation.C_ARG_TYPE_Y] = 50 + 250 * Math.random(); v3[entities.Obstacles.BirdFormation.C_ARG_TYPE_VELOCITY] = 0.5 + 0.7 * Math.random(); v3[entities.Obstacles.BirdFormation.C_ARG_TYPE_DIRECTION] = new Vector2D(-1, 0); v6.push(v3); v4 = new Array(); v4[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v4[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 400; v4[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v4[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_HANGAR'; v6.push(v4); v4 = new Array(); v4[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v4[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 500; v4[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v4[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_WIND_RIBBON'; v4[entities.Obstacles.StaticObs.C_ARG_SCALE] = v18.getX() >= 0 ? 70 : -70; v6.push(v4); this.c.setConfigItemArr(config.levels.LevelConfig.AIR_OBSTACLES_ARRAY, v6); this.c.setConfigItemArr(config.levels.LevelConfig.BONUSES_ARRAY, [enums.BonusTypes.GUN_BERSERK, enums.BonusTypes.AFTERBURNER, enums.BonusTypes.SCREWCUTTER, enums.BonusTypes.EXTRA_LIFE, enums.BonusTypes.GUN_JAM, enums.BonusTypes.ENGINE_FAILURE, enums.BonusTypes.DRUNKEN_PILOT]); }; config.levels.Level_16 = v1; var v2 = v1.prototype; v2.getLevelConfig = function () { return this.c; }; v2.C_ENEMY_PLANE_1_IDX = 2; v2.C_ENEMY_PLANE_2_IDX = 3; v2.C_ENEMY_PLANE_3_IDX = 4; v2.C_WIND_STR = 0; ASSetPropFlags(config.levels.Level_16.prototype, null, 1); } #endinitclip } movieClip 1832 __Packages.config.levels.Level_17 { #initclip if (!_global.config) { _global.config = new Object(); } if (!_global.config.levels) { _global.config.levels = new Object(); } if (!_global.config.levels.Level_17) { var v1 = function (levelId, gameConfig) { this.__gameConfig = gameConfig; this.c = new config.levels.LevelConfig(); GrpMan.setIsGroupColorShowed(false); var v4; var v7; v4 = this.__gameConfig.getPlayersPlaneConfig(); v7 = v4.getPlaneType(); v4.setStartPosType(enums.PlaneStartPosTypes.FIRST); var v8; v8 = v4.getGroupId(); ++v8; v4.setNumOfLives(config.levels.WorldConfig.C_LIVES_4_PLANES); var v11; var v12; v12 = config.levels.WorldConfig.getPlaneTypeFromIdxNotMy(v7, this.C_ENEMY_PLANE_1_IDX); v11 = new PlaneConfig(v12, enums.PlaneStartPosTypes.THIRD, enums.DefaultKeyTypes.AI, enums.AIProfiles.NORMAL, config.levels.WorldConfig.C_LIVES_4_PLANES, v8++); var v2; v2 = config.levels.WorldConfig.addMoreStatHardMode(v7); v11.setPlaneAttributes(2 + v2, 2 + v2, 2 + v2, 4 + v2, 3 + v2); v11.setPlaneItemList([enums.ItemTypes.TWIN_MACHINE_GUN, enums.ItemTypes.IMPACT_BOMBS, enums.ItemTypes.PROXIMITY_DETECTOR, enums.ItemTypes.GAUSS_ACCELERATOR, enums.ItemTypes.AUTO_REPAIR_PACK]); var v10; var v14; v14 = config.levels.WorldConfig.getPlaneTypeFromIdxNotMy(v7, this.C_ENEMY_PLANE_2_IDX); v10 = new PlaneConfig(v14, enums.PlaneStartPosTypes.FOURTH, enums.DefaultKeyTypes.AI, enums.AIProfiles.NORMAL, config.levels.WorldConfig.C_LIVES_4_PLANES, v8++); v10.setPlaneAttributes(4 + v2, 3 + v2, 3 + v2, 4 + v2, 3 + v2); v10.setPlaneItemList([enums.ItemTypes.MACHINE_GUN, enums.ItemTypes.BURST_GUN, enums.ItemTypes.HOMING_MISSILES, enums.ItemTypes.GUIDANCE_SYSTEM, enums.ItemTypes.GAUSS_ACCELERATOR, enums.ItemTypes.AUTO_REPAIR_PACK]); var v9; var v13; v13 = config.levels.WorldConfig.getPlaneTypeFromIdxNotMy(v7, this.C_ENEMY_PLANE_3_IDX); v9 = new PlaneConfig(v13, enums.PlaneStartPosTypes.SECOND, enums.DefaultKeyTypes.AI, enums.AIProfiles.NORMAL, config.levels.WorldConfig.C_LIVES_4_PLANES, v8++); v9.setPlaneAttributes(3 + v2, 4 + v2, 5 + v2, 5 + v2, 4 + v2); v9.setPlaneItemList([enums.ItemTypes.TWIN_MACHINE_GUN, enums.ItemTypes.TAIL_GUN, enums.ItemTypes.HOMING_MISSILES, enums.ItemTypes.MALICIOUS_PARACHUTE, enums.ItemTypes.MAGNETIC_DEFLECTOR, enums.ItemTypes.GUIDANCE_SYSTEM, enums.ItemTypes.GAUSS_ACCELERATOR]); this.c.setConfigItemArr(config.levels.LevelConfig.PLANES_POS_AND_CONF, [v4, v11, v10, v9]); this.c.setConfigItem(config.levels.LevelConfig.TITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_TITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.SUBTITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_SUBTITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.MISSION, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_MISSION_TXT)); var v20; var v17; var v18; v20 = String(enums.PlaneTypes.getPlaneInfo(v12, enums.PlaneTypes.C_INFO_PILOT_CLIP)); v17 = String(enums.PlaneTypes.getPlaneInfo(v14, enums.PlaneTypes.C_INFO_PILOT_CLIP)); v18 = String(enums.PlaneTypes.getPlaneInfo(v13, enums.PlaneTypes.C_INFO_PILOT_CLIP)); this.c.setConfigItemArr(config.levels.LevelConfig.OBJECTIVE_CLIP_DESC, [v20, undefined, v17, undefined, v18, undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_OBJECTIVE_TXT)]); var v15 = enums.SkyTypes.SUNSET; var v19; v19 = String(enums.SkyTypes.getInfo(v15, enums.SkyTypes.C_BRIEFING_WEATHER_CLIP_NAME)); this.c.setConfigItemArr(config.levels.LevelConfig.WEATHER_CLIP_DESC, [v19, undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_WEATHER_TXT)]); this.c.setConfigItemArr(config.levels.LevelConfig.HINTS_CLIP_DESC, ['S_MISSION_LIGHTBALL', undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_HINT_TXT)]); this.c.setConfigItem(config.levels.LevelConfig.ARENA_SIZE_TYPE, enums.ArenaSizeTypes.LARGE); this.c.setConfigItem(config.levels.LevelConfig.LOCATION, enums.LocationTypes.DOLOMITES); this.c.setConfigItem(config.levels.LevelConfig.WEATHER, enums.WeatherTypes.SUNNY); this.c.setConfigItem(config.levels.LevelConfig.SKY_TYPE, v15); var v16; v16 = new Vector2D(this.C_WIND_STR, 0); this.c.setConfigItem(config.levels.LevelConfig.WIND_DIR, v16); var v5; v5 = new Array(); var v3; v3 = new Array(); v3[entities.Obstacles.Baloon.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BALOON; v3[entities.Obstacles.Baloon.C_ARG_TYPE_X] = 1000 * Math.random() - 200; v3[entities.Obstacles.Baloon.C_ARG_TYPE_Y] = 100 + 200 * Math.random(); v3[entities.Obstacles.Baloon.C_ARG_TYPE_VELOCITY] = 0.8 + Math.random(); v3[entities.Obstacles.Baloon.C_ARG_TYPE_DIRECTION] = new Vector2D(1, 0); v3[entities.Obstacles.Baloon.C_ARG_TYPE_HITPOINTS] = 8; v3[entities.Obstacles.Baloon.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v3[entities.Obstacles.Baloon.C_ARG_TYPE_ON_TEXT] = ''; v5.push(v3); v3 = new Array(); v3[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v3[entities.Obstacles.Target.C_ARG_TYPE_X] = 700; v3[entities.Obstacles.Target.C_ARG_TYPE_Y] = 150; v3[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 10; v3[entities.Obstacles.Target.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v5.push(v3); v3 = new Array(); v3[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v3[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 400; v3[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v3[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_HANGAR'; v5.push(v3); v3 = new Array(); v3[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v3[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 500; v3[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v3[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_WIND_RIBBON'; v3[entities.Obstacles.StaticObs.C_ARG_SCALE] = v16.getX() >= 0 ? 70 : -70; v5.push(v3); this.c.setConfigItemArr(config.levels.LevelConfig.AIR_OBSTACLES_ARRAY, v5); this.c.setConfigItemArr(config.levels.LevelConfig.BONUSES_ARRAY, [enums.BonusTypes.GUN_BERSERK, enums.BonusTypes.AFTERBURNER, enums.BonusTypes.SCREWCUTTER, enums.BonusTypes.EXTRA_LIFE, enums.BonusTypes.GUN_JAM, enums.BonusTypes.ENGINE_FAILURE, enums.BonusTypes.DRUNKEN_PILOT]); }; config.levels.Level_17 = v1; var v2 = v1.prototype; v2.getLevelConfig = function () { return this.c; }; v2.C_ENEMY_PLANE_1_IDX = 2; v2.C_ENEMY_PLANE_2_IDX = 3; v2.C_ENEMY_PLANE_3_IDX = 4; v2.C_WIND_STR = 0; ASSetPropFlags(config.levels.Level_17.prototype, null, 1); } #endinitclip } movieClip 1833 __Packages.config.levels.Level_18 { #initclip if (!_global.config) { _global.config = new Object(); } if (!_global.config.levels) { _global.config.levels = new Object(); } if (!_global.config.levels.Level_18) { var v1 = function (levelId, gameConfig) { this.__gameConfig = gameConfig; this.c = new config.levels.LevelConfig(); GrpMan.setIsGroupColorShowed(false); var v5; var v7; v5 = this.__gameConfig.getPlayersPlaneConfig(); v7 = v5.getPlaneType(); v5.setStartPosType(enums.PlaneStartPosTypes.FIRST); var v8; v8 = v5.getGroupId(); ++v8; v5.setNumOfLives(config.levels.WorldConfig.C_LIVES_4_PLANES); var v11; var v12; v12 = config.levels.WorldConfig.getPlaneTypeFromIdxNotMy(v7, this.C_ENEMY_PLANE_1_IDX); v11 = new PlaneConfig(v12, enums.PlaneStartPosTypes.THIRD, enums.DefaultKeyTypes.AI, enums.AIProfiles.NORMAL, config.levels.WorldConfig.C_LIVES_4_PLANES, v8++); var v2; v2 = config.levels.WorldConfig.addMoreStatHardMode(v7); v11.setPlaneAttributes(3 + v2, 2 + v2, 2 + v2, 4 + v2, 3 + v2); v11.setPlaneItemList([enums.ItemTypes.TWIN_MACHINE_GUN, enums.ItemTypes.IMPACT_BOMBS, enums.ItemTypes.PROXIMITY_DETECTOR, enums.ItemTypes.GAUSS_ACCELERATOR, enums.ItemTypes.AUTO_REPAIR_PACK]); var v10; var v14; v14 = config.levels.WorldConfig.getPlaneTypeFromIdxNotMy(v7, this.C_ENEMY_PLANE_2_IDX); v10 = new PlaneConfig(v14, enums.PlaneStartPosTypes.FOURTH, enums.DefaultKeyTypes.AI, enums.AIProfiles.NORMAL, config.levels.WorldConfig.C_LIVES_4_PLANES, v8++); v10.setPlaneAttributes(4 + v2, 3 + v2, 3 + v2, 4 + v2, 4 + v2); v10.setPlaneItemList([enums.ItemTypes.MACHINE_GUN, enums.ItemTypes.BURST_GUN, enums.ItemTypes.HOMING_MISSILES, enums.ItemTypes.GUIDANCE_SYSTEM, enums.ItemTypes.GAUSS_ACCELERATOR, enums.ItemTypes.AUTO_REPAIR_PACK]); var v9; var v13; v13 = config.levels.WorldConfig.getPlaneTypeFromIdxNotMy(v7, this.C_ENEMY_PLANE_3_IDX); v9 = new PlaneConfig(v13, enums.PlaneStartPosTypes.SECOND, enums.DefaultKeyTypes.AI, enums.AIProfiles.NORMAL, config.levels.WorldConfig.C_LIVES_4_PLANES, v8++); v9.setPlaneAttributes(3 + v2, 5 + v2, 5 + v2, 5 + v2, 5 + v2); v9.setPlaneItemList([enums.ItemTypes.TWIN_MACHINE_GUN, enums.ItemTypes.TAIL_GUN, enums.ItemTypes.HOMING_MISSILES, enums.ItemTypes.MALICIOUS_PARACHUTE, enums.ItemTypes.MAGNETIC_DEFLECTOR, enums.ItemTypes.GUIDANCE_SYSTEM, enums.ItemTypes.GAUSS_ACCELERATOR]); this.c.setConfigItemArr(config.levels.LevelConfig.PLANES_POS_AND_CONF, [v5, v11, v10, v9]); this.c.setConfigItem(config.levels.LevelConfig.TITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_TITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.SUBTITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_SUBTITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.MISSION, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_MISSION_TXT)); var v20; var v17; var v18; v20 = String(enums.PlaneTypes.getPlaneInfo(v12, enums.PlaneTypes.C_INFO_PILOT_CLIP)); v17 = String(enums.PlaneTypes.getPlaneInfo(v14, enums.PlaneTypes.C_INFO_PILOT_CLIP)); v18 = String(enums.PlaneTypes.getPlaneInfo(v13, enums.PlaneTypes.C_INFO_PILOT_CLIP)); this.c.setConfigItemArr(config.levels.LevelConfig.OBJECTIVE_CLIP_DESC, [v20, undefined, v17, undefined, v18, undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_OBJECTIVE_TXT)]); var v15 = enums.SkyTypes.NIGHT; var v19; v19 = String(enums.SkyTypes.getInfo(v15, enums.SkyTypes.C_BRIEFING_WEATHER_CLIP_NAME)); this.c.setConfigItemArr(config.levels.LevelConfig.WEATHER_CLIP_DESC, [v19, undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_WEATHER_TXT)]); this.c.setConfigItemArr(config.levels.LevelConfig.HINTS_CLIP_DESC, ['S_MISSION_LIGHTBALL', undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_HINT_TXT)]); this.c.setConfigItem(config.levels.LevelConfig.ARENA_SIZE_TYPE, enums.ArenaSizeTypes.LARGE); this.c.setConfigItem(config.levels.LevelConfig.LOCATION, enums.LocationTypes.DOLOMITES); this.c.setConfigItem(config.levels.LevelConfig.WEATHER, enums.WeatherTypes.SUNNY); this.c.setConfigItem(config.levels.LevelConfig.SKY_TYPE, v15); var v16; v16 = new Vector2D(this.C_WIND_STR, 0); this.c.setConfigItem(config.levels.LevelConfig.WIND_DIR, v16); var v3; v3 = new Array(); var v4; v4 = new Array(); v4[entities.Obstacles.Baloon.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BALOON; v4[entities.Obstacles.Baloon.C_ARG_TYPE_X] = -700; v4[entities.Obstacles.Baloon.C_ARG_TYPE_Y] = 400; v4[entities.Obstacles.Baloon.C_ARG_TYPE_VELOCITY] = 0; v4[entities.Obstacles.Baloon.C_ARG_TYPE_DIRECTION] = new Vector2D(1, 0); v4[entities.Obstacles.Baloon.C_ARG_TYPE_HITPOINTS] = 20; v4[entities.Obstacles.Baloon.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v4[entities.Obstacles.Baloon.C_ARG_TYPE_ON_TEXT] = ''; v3.push(v4); v4 = new Array(); v4[entities.Obstacles.Baloon.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BALOON; v4[entities.Obstacles.Baloon.C_ARG_TYPE_X] = -550; v4[entities.Obstacles.Baloon.C_ARG_TYPE_Y] = 450; v4[entities.Obstacles.Baloon.C_ARG_TYPE_VELOCITY] = 0; v4[entities.Obstacles.Baloon.C_ARG_TYPE_DIRECTION] = new Vector2D(1, 0); v4[entities.Obstacles.Baloon.C_ARG_TYPE_HITPOINTS] = 20; v4[entities.Obstacles.Baloon.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v4[entities.Obstacles.Baloon.C_ARG_TYPE_ON_TEXT] = ''; v3.push(v4); v4 = new Array(); v4[entities.Obstacles.Baloon.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BALOON; v4[entities.Obstacles.Baloon.C_ARG_TYPE_X] = -300; v4[entities.Obstacles.Baloon.C_ARG_TYPE_Y] = 450; v4[entities.Obstacles.Baloon.C_ARG_TYPE_VELOCITY] = 0; v4[entities.Obstacles.Baloon.C_ARG_TYPE_DIRECTION] = new Vector2D(1, 0); v4[entities.Obstacles.Baloon.C_ARG_TYPE_HITPOINTS] = 20; v4[entities.Obstacles.Baloon.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v4[entities.Obstacles.Baloon.C_ARG_TYPE_ON_TEXT] = ''; v3.push(v4); v4 = new Array(); v4[entities.Obstacles.Baloon.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BALOON; v4[entities.Obstacles.Baloon.C_ARG_TYPE_X] = 1000; v4[entities.Obstacles.Baloon.C_ARG_TYPE_Y] = 450; v4[entities.Obstacles.Baloon.C_ARG_TYPE_VELOCITY] = 0; v4[entities.Obstacles.Baloon.C_ARG_TYPE_DIRECTION] = new Vector2D(1, 0); v4[entities.Obstacles.Baloon.C_ARG_TYPE_HITPOINTS] = 20; v4[entities.Obstacles.Baloon.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v4[entities.Obstacles.Baloon.C_ARG_TYPE_ON_TEXT] = ''; v3.push(v4); v4 = new Array(); v4[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v4[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 400; v4[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v4[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_HANGAR'; v3.push(v4); v4 = new Array(); v4[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v4[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 500; v4[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v4[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_WIND_RIBBON'; v4[entities.Obstacles.StaticObs.C_ARG_SCALE] = v16.getX() >= 0 ? 70 : -70; v3.push(v4); this.c.setConfigItemArr(config.levels.LevelConfig.AIR_OBSTACLES_ARRAY, v3); this.c.setConfigItemArr(config.levels.LevelConfig.BONUSES_ARRAY, [enums.BonusTypes.GUN_BERSERK, enums.BonusTypes.AFTERBURNER, enums.BonusTypes.SCREWCUTTER, enums.BonusTypes.EXTRA_LIFE, enums.BonusTypes.GUN_JAM, enums.BonusTypes.ENGINE_FAILURE, enums.BonusTypes.DRUNKEN_PILOT]); }; config.levels.Level_18 = v1; var v2 = v1.prototype; v2.getLevelConfig = function () { return this.c; }; v2.C_ENEMY_PLANE_1_IDX = 2; v2.C_ENEMY_PLANE_2_IDX = 3; v2.C_ENEMY_PLANE_3_IDX = 4; v2.C_WIND_STR = 0; ASSetPropFlags(config.levels.Level_18.prototype, null, 1); } #endinitclip } movieClip 1834 __Packages.config.levels.Level_19 { #initclip if (!_global.config) { _global.config = new Object(); } if (!_global.config.levels) { _global.config.levels = new Object(); } if (!_global.config.levels.Level_19) { var v1 = function (levelId, gameConfig) { this.__gameConfig = gameConfig; this.c = new config.levels.LevelConfig(); var v3; var v10; v3 = this.__gameConfig.getPlayersPlaneConfig(); v10 = v3.getPlaneType(); v3.setStartPosType(enums.PlaneStartPosTypes.FIRST); v3.setNumOfLives(config.levels.WorldConfig.C_LIVES_4_PLANES); GrpMan.setIsGroupColorShowed(false); var v11; v11 = v3.getGroupId(); ++v11; var v8; var v9; v9 = config.levels.WorldConfig.getPlaneTypeFromIdxNotMy(v10, this.C_ENEMY_PLANE_IDX); v8 = new PlaneConfig(v9, enums.PlaneStartPosTypes.AIRSHIP, enums.DefaultKeyTypes.AI, enums.AIProfiles.CLEVER, config.levels.WorldConfig.C_LIVES_4_PLANES + 3, v11++); var v6; v6 = config.levels.WorldConfig.addMoreStatHardMode(v10); v8.setPlaneAttributes(5 + v6, 3 + v6, 4 + v6, 6, 6); v8.setPlaneItemList([enums.ItemTypes.TWIN_MACHINE_GUN, enums.ItemTypes.ACOUSTIC_RIFLE, enums.ItemTypes.BURST_GUN, enums.ItemTypes.IMPACT_BOMBS, enums.ItemTypes.NUKE, enums.ItemTypes.HOMING_MISSILES, enums.ItemTypes.PROXIMITY_DETECTOR, enums.ItemTypes.GUIDANCE_SYSTEM, enums.ItemTypes.MAGNETIC_DEFLECTOR, enums.ItemTypes.AUTO_REPAIR_PACK]); this.c.setConfigItemArr(config.levels.LevelConfig.PLANES_POS_AND_CONF, [v3, v8]); this.c.setConfigItem(config.levels.LevelConfig.TITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_TITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.SUBTITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_SUBTITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.MISSION, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_MISSION_TXT)); var v13; var v12; v13 = String(enums.PlaneTypes.getPlaneInfo(v9, enums.PlaneTypes.C_INFO_PILOT_CLIP)); v12 = String(enums.PlaneTypes.getPlaneInfo(v9, enums.PlaneTypes.C_INFO_PLANE_CLIP)); this.c.setConfigItemArr(config.levels.LevelConfig.OBJECTIVE_CLIP_DESC, [v13, undefined, v12, 'S_PILOT_1', config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_OBJECTIVE_TXT)]); var v7 = enums.SkyTypes.GREY; v7 = UtilMath.getRandomNaturalNumber(0, enums.SkyTypes.COUNT - 1); var v14; v14 = String(enums.SkyTypes.getInfo(v7, enums.SkyTypes.C_BRIEFING_WEATHER_CLIP_NAME)); this.c.setConfigItemArr(config.levels.LevelConfig.WEATHER_CLIP_DESC, [v14, undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_WEATHER_TXT)]); this.c.setConfigItemArr(config.levels.LevelConfig.HINTS_CLIP_DESC, ['S_MISSION_LIGHTBALL', undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_HINT_TXT)]); this.c.setConfigItem(config.levels.LevelConfig.ARENA_SIZE_TYPE, enums.ArenaSizeTypes.MEDIUM); this.c.setConfigItem(config.levels.LevelConfig.LOCATION, enums.LocationTypes.DOLOMITES); this.c.setConfigItem(config.levels.LevelConfig.WEATHER, enums.WeatherTypes.PARTLY); this.c.setConfigItem(config.levels.LevelConfig.SKY_TYPE, v7); var v15; v15 = new Vector2D(0, 0); this.c.setConfigItem(config.levels.LevelConfig.WIND_DIR, v15); var v5; v5 = new Array(); var v2; v2 = new Array(); v2[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v2[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 400; v2[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v2[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_HANGAR'; v5.push(v2); v2 = new Array(); v2[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v2[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 500; v2[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v2[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_WIND_RIBBON'; v2[entities.Obstacles.StaticObs.C_ARG_SCALE] = -70; v5.push(v2); v5.push(v2); this.c.setConfigItemArr(config.levels.LevelConfig.AIR_OBSTACLES_ARRAY, v5); this.c.setConfigItemArr(config.levels.LevelConfig.BONUSES_ARRAY, [enums.BonusTypes.GUN_BERSERK, enums.BonusTypes.AFTERBURNER, enums.BonusTypes.SCREWCUTTER, enums.BonusTypes.EXTRA_LIFE, enums.BonusTypes.GUN_JAM, enums.BonusTypes.ENGINE_FAILURE, enums.BonusTypes.DRUNKEN_PILOT]); }; config.levels.Level_19 = v1; var v2 = v1.prototype; v2.getLevelConfig = function () { return this.c; }; v2.C_ENEMY_PLANE_IDX = 5; ASSetPropFlags(config.levels.Level_19.prototype, null, 1); } #endinitclip } movieClip 1835 __Packages.config.levels.Level_20 { #initclip if (!_global.config) { _global.config = new Object(); } if (!_global.config.levels) { _global.config.levels = new Object(); } if (!_global.config.levels.Level_20) { var v1 = function (levelId, gameConfig) { this.__gameConfig = gameConfig; this.c = new config.levels.LevelConfig(); var v6; var v4; v6 = this.__gameConfig.getPlayersPlaneConfig(); v4 = v6.getPlaneType(); v6.setStartPosType(enums.PlaneStartPosTypes.AIRSHIP); v6.setNumOfLives(config.levels.WorldConfig.C_LIVES_4_PLANES); GrpMan.setIsGroupColorShowed(false); var v5; v5 = v6.getGroupId(); ++v5; var v12; var v13; v13 = config.levels.WorldConfig.getPlaneTypeFromIdxNotMy(v4, this.C_ENEMY_PLANE_1_IDX); v12 = new PlaneConfig(v13, enums.PlaneStartPosTypes.FIRST, enums.DefaultKeyTypes.AI, enums.AIProfiles.NORMAL, config.levels.WorldConfig.C_LIVES_4_PLANES, v5++); var v2; v2 = config.levels.WorldConfig.addMoreStatHardMode(v4); v12.setPlaneAttributes(4 + v2, 4 + v2, 4 + v2, 4 + v2, 5 + v2); v12.setPlaneItemList([enums.ItemTypes.TWIN_MACHINE_GUN, enums.ItemTypes.IMPACT_BOMBS, enums.ItemTypes.PROXIMITY_DETECTOR, enums.ItemTypes.GAUSS_ACCELERATOR, enums.ItemTypes.AUTO_REPAIR_PACK]); var v11; var v15; v15 = config.levels.WorldConfig.getPlaneTypeFromIdxNotMy(v4, this.C_ENEMY_PLANE_2_IDX); v11 = new PlaneConfig(v15, enums.PlaneStartPosTypes.SECOND, enums.DefaultKeyTypes.AI, enums.AIProfiles.NORMAL, config.levels.WorldConfig.C_LIVES_4_PLANES, v5++); v11.setPlaneAttributes(3 + v2, 5 + v2, 5 + v2, 5 + v2, 5 + v2); v11.setPlaneItemList([enums.ItemTypes.MACHINE_GUN, enums.ItemTypes.BURST_GUN, enums.ItemTypes.HOMING_MISSILES, enums.ItemTypes.GUIDANCE_SYSTEM, enums.ItemTypes.GAUSS_ACCELERATOR, enums.ItemTypes.AUTO_REPAIR_PACK]); var v10; var v14; v14 = config.levels.WorldConfig.getPlaneTypeFromIdxNotMy(v4, this.C_ENEMY_PLANE_3_IDX); v10 = new PlaneConfig(v14, enums.PlaneStartPosTypes.THIRD, enums.DefaultKeyTypes.AI, enums.AIProfiles.NORMAL, config.levels.WorldConfig.C_LIVES_4_PLANES, v5++); v10.setPlaneAttributes(4 + v2, 5 + v2, 5 + v2, 6, 5 + v2); v10.setPlaneItemList([enums.ItemTypes.TWIN_MACHINE_GUN, enums.ItemTypes.TAIL_GUN, enums.ItemTypes.HOMING_MISSILES, enums.ItemTypes.MALICIOUS_PARACHUTE, enums.ItemTypes.MAGNETIC_DEFLECTOR, enums.ItemTypes.GUIDANCE_SYSTEM, enums.ItemTypes.GAUSS_ACCELERATOR]); var v9; var v17; v17 = config.levels.WorldConfig.getPlaneTypeFromIdxNotMy(v4, this.C_ENEMY_PLANE_4_IDX); v9 = new PlaneConfig(v17, enums.PlaneStartPosTypes.FOURTH, enums.DefaultKeyTypes.AI, enums.AIProfiles.NORMAL, config.levels.WorldConfig.C_LIVES_4_PLANES, v5++); v9.setPlaneAttributes(3 + v2, 5 + v2, 5 + v2, 6, 5 + v2); v9.setPlaneItemList([enums.ItemTypes.TWIN_MACHINE_GUN, enums.ItemTypes.TAIL_GUN, enums.ItemTypes.HOMING_MISSILES, enums.ItemTypes.MALICIOUS_PARACHUTE, enums.ItemTypes.MAGNETIC_DEFLECTOR, enums.ItemTypes.GUIDANCE_SYSTEM, enums.ItemTypes.GAUSS_ACCELERATOR]); this.c.setConfigItemArr(config.levels.LevelConfig.PLANES_POS_AND_CONF, [v6, v12, v11, v10, v9]); this.c.setConfigItem(config.levels.LevelConfig.TITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_TITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.SUBTITLE, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_SUBTITLE_TXT)); this.c.setConfigItem(config.levels.LevelConfig.MISSION, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_MISSION_TXT)); var v22; var v20; var v21; v22 = String(enums.PlaneTypes.getPlaneInfo(v13, enums.PlaneTypes.C_INFO_PILOT_CLIP)); v20 = String(enums.PlaneTypes.getPlaneInfo(v15, enums.PlaneTypes.C_INFO_PILOT_CLIP)); v21 = String(enums.PlaneTypes.getPlaneInfo(v14, enums.PlaneTypes.C_INFO_PILOT_CLIP)); this.c.setConfigItemArr(config.levels.LevelConfig.OBJECTIVE_CLIP_DESC, ['S_MISSION_PLANE_TARGET', undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_OBJECTIVE_TXT)]); var v16 = enums.SkyTypes.BLUE; var v18; v18 = String(enums.SkyTypes.getInfo(v16, enums.SkyTypes.C_BRIEFING_WEATHER_CLIP_NAME)); this.c.setConfigItemArr(config.levels.LevelConfig.WEATHER_CLIP_DESC, [v18, undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_WEATHER_TXT)]); this.c.setConfigItemArr(config.levels.LevelConfig.HINTS_CLIP_DESC, ['S_MISSION_LIGHTBALL', undefined, config.levels.WorldConfig.getLevelInfo(levelId, config.levels.WorldConfig.C_INFO_HINT_TXT)]); this.c.setConfigItem(config.levels.LevelConfig.ARENA_SIZE_TYPE, enums.ArenaSizeTypes.LARGE); this.c.setConfigItem(config.levels.LevelConfig.LOCATION, enums.LocationTypes.DOLOMITES); this.c.setConfigItem(config.levels.LevelConfig.WEATHER, enums.WeatherTypes.SUNNY); this.c.setConfigItem(config.levels.LevelConfig.SKY_TYPE, v16); var v19; v19 = new Vector2D(0, 0); this.c.setConfigItem(config.levels.LevelConfig.WIND_DIR, v19); var v8; v8 = new Array(); var v3; v3 = new Array(); v3[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v3[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 400; v3[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v3[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_HANGAR'; v8.push(v3); v3 = new Array(); v3[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v3[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 500; v3[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v3[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_WIND_RIBBON'; v3[entities.Obstacles.StaticObs.C_ARG_SCALE] = -70; v8.push(v3); v8.push(v3); this.c.setConfigItemArr(config.levels.LevelConfig.AIR_OBSTACLES_ARRAY, v8); this.c.setConfigItemArr(config.levels.LevelConfig.BONUSES_ARRAY, [enums.BonusTypes.AFTERBURNER]); }; config.levels.Level_20 = v1; var v2 = v1.prototype; v2.getLevelConfig = function () { return this.c; }; v2.C_ENEMY_PLANE_1_IDX = 2; v2.C_ENEMY_PLANE_2_IDX = 3; v2.C_ENEMY_PLANE_3_IDX = 4; v2.C_ENEMY_PLANE_4_IDX = 5; ASSetPropFlags(config.levels.Level_20.prototype, null, 1); } #endinitclip } movieClip 1836 __Packages.config.levels.DefenceWaveLevel { #initclip if (!_global.config) { _global.config = new Object(); } if (!_global.config.levels) { _global.config.levels = new Object(); } if (!_global.config.levels.DefenceWaveLevel) { var v1 = function (levelId, gameConfig) { this.__timeLimit += (levelId - 1) * this.C_TIME_LIMIT_PER_WAVE_INC; this.__gameConfig = gameConfig; this.C_INFO_SUBTITLE_TXT += String(levelId); this.c = new config.levels.LevelConfig(); this.c.setConfigItem(config.levels.LevelConfig.TITLE, this.C_INFO_TITLE_TXT); this.c.setConfigItem(config.levels.LevelConfig.SUBTITLE, this.C_INFO_SUBTITLE_TXT); this.c.setConfigItem(config.levels.LevelConfig.MISSION, this.C_INFO_MISSION_TXT); this.c.setConfigItemArr(config.levels.LevelConfig.OBJECTIVE_CLIP_DESC, ['S_MISSION_BALOON', undefined, this.C_INFO_OBJECTIVE_TXT]); this.c.setConfigItemArr(config.levels.LevelConfig.WEATHER_CLIP_DESC, ['S_MISSION_WEATHER', undefined, this.C_INFO_WEATHER_TXT]); this.c.setConfigItemArr(config.levels.LevelConfig.HINTS_CLIP_DESC, ['S_MISSION_LIGHTBALL', undefined, this.C_INFO_HINT_TXT]); if (levelId < this.C_CHANGE_LOCATION_WAVE_LIMIT) { this.c.setConfigItem(config.levels.LevelConfig.LOCATION, enums.LocationTypes.NEVADA_DESERT); } else { this.c.setConfigItem(config.levels.LevelConfig.LOCATION, enums.LocationTypes.DOLOMITES); } var v36; v36 = UtilMath.getRandomNaturalNumber(0, enums.WeatherTypes.COUNT - 1); this.c.setConfigItem(config.levels.LevelConfig.WEATHER, v36); var v27; v27 = UtilMath.getRandomNaturalNumber(0, enums.SkyTypes.COUNT - 1); this.c.setConfigItem(config.levels.LevelConfig.SKY_TYPE, v27); var v35; if (levelId % 7 == 0) { v35 = 3; } else { v35 = 1; } var v34; v34 = v35 * 2 * Math.random() - v35; this.c.setConfigItem(config.levels.LevelConfig.WIND_DIR, new Vector2D(v34, 0)); var v18; v18 = new Array(); var v28; if ((v27 == enums.SkyTypes.GREY || v27 == enums.SkyTypes.NIGHT) && Math.random() < 0.5) { var v37; v37 = UtilMath.getRandomSign() * (v34 + 0.3); v28 = new Array(); v28[entities.Obstacles.StormCloud.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STORM_CLOUD; v28[entities.Obstacles.StormCloud.C_ARG_TYPE_X] = 1000 * Math.random(); v28[entities.Obstacles.StormCloud.C_ARG_TYPE_Y] = 70 + 200 * Math.random(); v28[entities.Obstacles.StormCloud.C_ARG_TYPE_VELOCITY] = v37; v28[entities.Obstacles.StormCloud.C_ARG_TYPE_DIRECTION] = new Vector2D(UtilMath.getRandomSign(), 0); v18.push(v28); } if (v27 == enums.SkyTypes.GREY && Math.random() < 0.3 && levelId > 5) { v28 = new Array(); v28[entities.Obstacles.Tornado.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TORNADO; v28[entities.Obstacles.Tornado.C_ARG_TYPE_X] = 700; v28[entities.Obstacles.Tornado.C_ARG_TYPE_VELOCITY] = 0.1 + 0.3 * Math.random(); v28[entities.Obstacles.Tornado.C_ARG_TYPE_DIRECTION] = new Vector2D(UtilMath.getRandomSign(), 0); v18.push(v28); } if (v27 != enums.SkyTypes.GREY && v27 != enums.SkyTypes.NIGHT && Math.random() < 0.4) { var v38; v38 = UtilMath.getRandomSign() * (v34 + 0.5); v28 = new Array(); v28[entities.Obstacles.BirdFormation.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BIRD_FORMATION; v28[entities.Obstacles.BirdFormation.C_ARG_TYPE_X] = 1000 * Math.random(); v28[entities.Obstacles.BirdFormation.C_ARG_TYPE_Y] = 25000 * Math.random(); v28[entities.Obstacles.BirdFormation.C_ARG_TYPE_VELOCITY] = v38; v28[entities.Obstacles.BirdFormation.C_ARG_TYPE_DIRECTION] = new Vector2D(UtilMath.getRandomSign(), 0); v18.push(v28); } var v31; v31 = 5 + Math.round(levelId / 5); var v2; v2 = 0; while (v2 < v31) { if (Math.random() < 0.5) { v28 = new Array(); v28[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v28[entities.Obstacles.Target.C_ARG_TYPE_X] = -500 + 1500 * Math.random(); v28[entities.Obstacles.Target.C_ARG_TYPE_Y] = 100 + 350 * Math.random(); v28[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 3 + levelId / 2; v28[entities.Obstacles.Target.C_ARG_TYPE_GROUP_ID] = 1; v28[entities.Obstacles.Target.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v18.push(v28); } ++v2; } var v30; v30 = 3; v2 = 0; while (v2 < v30) { var v11 = 300 + 100 * Math.random(); v28 = new Array(); v28[entities.Obstacles.Baloon.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BALOON; v28[entities.Obstacles.Baloon.C_ARG_TYPE_X] = 200 + 600 * Math.random(); v28[entities.Obstacles.Baloon.C_ARG_TYPE_Y] = v11; v28[entities.Obstacles.Baloon.C_ARG_TYPE_VELOCITY] = v11 / (this.__timeLimit * 50 + 2 * Math.random()); v28[entities.Obstacles.Baloon.C_ARG_TYPE_DIRECTION] = new Vector2D(0, -1); v28[entities.Obstacles.Baloon.C_ARG_TYPE_HITPOINTS] = this.C_BALOON_HP_WAVE_INCREMENT * levelId; v28[entities.Obstacles.Baloon.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.SECONDARY_ALLY; v28[entities.Obstacles.Baloon.C_ARG_TYPE_ON_TEXT] = 'DEFEND ME!'; v28[entities.Obstacles.Baloon.C_ARG_TYPE_SHOW_HEALTH] = true; v18.push(v28); ++v2; } v28 = new Array(); v28[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v28[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 400; v28[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v28[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_HANGAR'; v18.push(v28); v28 = new Array(); v28[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v28[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 500; v28[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v28[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_WIND_RIBBON'; v28[entities.Obstacles.StaticObs.C_ARG_SCALE] = v34 >= 0 ? 70 : -70; v18.push(v28); this.c.setConfigItemArr(config.levels.LevelConfig.AIR_OBSTACLES_ARRAY, v18); var v24; v24 = new Array(); var v26; v26 = this.__gameConfig.getPlayersPlaneConfig(); v24.push(v26); var v10; var v23 = 1; if (levelId >= 5) { v23 = 2; } if (levelId >= 8) { v23 = 3; } var v32 = 20; var v25; var v33 = 2 + Math.round(levelId / 10); if (levelId <= 2) { v33 = 1; } if (v33 > enums.AIProfiles.COUNT - 1) { v33 = enums.AIProfiles.COUNT - 1; } v25 = UtilMath.getRandomNaturalNumber(2, v33); var v21; var v20; var v29 = 1; v2 = 0; while (v2 < v23) { v20 = (UtilMath.getRandomNaturalNumber(0, enums.PlaneTypes.COUNT - 2) + v2) % (enums.PlaneTypes.COUNT - 2); v21 = config.levels.WorldConfig.getPlaneTypeFromIdxNotMy(v26.getPlaneType(), v20); v10 = new PlaneConfig(v21, 1 + v2, enums.DefaultKeyTypes.AI, v25, v32, v29, enums.TargetTypes.NONE); var v3; v3 = Math.round(levelId / 4); if (v3 > 6) { v3 = 0; } var v4; v4 = Math.round(v3 - 3); if (v4 < 0) { v4 = 1; } var v8; v8 = Math.round(levelId / 3); if (v8 > 6) { v8 = 0; } var v17; v17 = Math.round(v8 - 3); if (v17 < 0) { v17 = 1; } var v16; var v15; var v14; var v13; var v12; v16 = UtilMath.getRandomNaturalNumber(v4, v3); v15 = UtilMath.getRandomNaturalNumber(v4, v3); v14 = UtilMath.getRandomNaturalNumber(v4, v3); v13 = UtilMath.getRandomNaturalNumber(v4, v3); v12 = UtilMath.getRandomNaturalNumber(v4, v3); v10.setPlaneAttributes(v16, v15, v14, v13, v12); var v5; v5 = new Array(); var v19 = (levelId + 1) * this.AI_CASH_LIMIT_PER_WAVE; var v9 = 2 + Math.round(levelId / 5); if (v9 > 3) { v9 = 3; } var v7 = 1 + Math.round(levelId / 5); if (v7 > 3) { v7 = 3; } v5 = this.buyRandomItems(v19, v9, v7); if (!(this.isItemBought(v5, enums.ItemTypes.TWIN_MACHINE_GUN) || this.isItemBought(v5, enums.ItemTypes.BURST_GUN) || this.isItemBought(v5, enums.ItemTypes.ACOUSTIC_RIFLE))) { v5.push(enums.ItemTypes.MACHINE_GUN); } v10.setPlaneItemList(v5); v24.push(v10); ++v2; } this.c.setConfigItemArr(config.levels.LevelConfig.PLANES_POS_AND_CONF, v24); var v22; v22 = new Array(); v22.push(enums.BonusTypes.GUN_BERSERK); v22.push(enums.BonusTypes.AFTERBURNER); v22.push(enums.BonusTypes.SCREWCUTTER); v22.push(enums.BonusTypes.EXTRA_LIFE); v22.push(enums.BonusTypes.GUN_JAM); v22.push(enums.BonusTypes.ENGINE_FAILURE); v22.push(enums.BonusTypes.ENGINE_JAM); v22.push(enums.BonusTypes.DRUNKEN_PILOT); this.c.setConfigItemArr(config.levels.LevelConfig.BONUSES_ARRAY, v22); this.c.setConfigItemArr(config.levels.LevelConfig.BONUSES_ARRAY, v22); this.c.setConfigItem(config.levels.LevelConfig.ARENA_SIZE_TYPE, enums.ArenaSizeTypes.MEDIUM); this.c.setConfigItem(config.levels.LevelConfig.TIME_LIMIT_SEC, this.__timeLimit); this.c.setConfigItem(config.levels.LevelConfig.TIME_LIMIT_SEC_IS_POSITIVE, true); }; config.levels.DefenceWaveLevel = v1; var v2 = v1.prototype; v2.getLevelConfig = function () { return this.c; }; v2.buyRandomItems = function (cashLimit, primWLimit, secWLimit) { var v6; v6 = new Array(); primWLimit = (primWLimit == undefined) ? 2 : primWLimit; secWLimit = (secWLimit == undefined) ? 2 : secWLimit; var v4 = cashLimit / 2; var v2; var v7; v7 = enums.ItemTypes.ItemShopOrder.length; var v1; var v5; var v3; v2 = v7; while (v2 > 0) { v1 = enums.ItemTypes.ItemShopOrder[v2]; v5 = Number(enums.ItemTypes.getItemInfo(v1, enums.ItemTypes.CLASS_NO)); v3 = Number(enums.ItemTypes.getItemInfo(v1, enums.ItemTypes.COST)); if (v5 == enums.ItemTypes.CLASS_NO_PRIMARY_WEAPON) { if (v3 < v4 && Math.random() < 0.7) { v6.push(v1); v4 -= v3; --primWLimit; if (primWLimit <= 0) { break; } } } --v2; } v4 += cashLimit / 2; v2 = v7; while (v2 > 0) { v1 = enums.ItemTypes.ItemShopOrder[v2]; v5 = Number(enums.ItemTypes.getItemInfo(v1, enums.ItemTypes.CLASS_NO)); v3 = Number(enums.ItemTypes.getItemInfo(v1, enums.ItemTypes.COST)); if (v5 == enums.ItemTypes.CLASS_NO_SECONDARY_WEAPON) { if (v3 < v4 && Math.random() < 0.7) { v6.push(v1); v4 -= v3; --secWLimit; if (secWLimit <= 0) { break; } } } --v2; } v2 = v7; while (v2 > 0) { v1 = enums.ItemTypes.ItemShopOrder[v2]; v5 = Number(enums.ItemTypes.getItemInfo(v1, enums.ItemTypes.CLASS_NO)); v3 = Number(enums.ItemTypes.getItemInfo(v1, enums.ItemTypes.COST)); if (v5 == enums.ItemTypes.CLASS_NO_DEVICE) { if (v1 == enums.ItemTypes.BONUS_XRAY || v1 == enums.ItemTypes.TARGETTING_SYSTEM || v1 == enums.ItemTypes.ADVANCED_WEAPON_RACK || v1 == enums.ItemTypes.EXTRA_CARGO_STORAGE) { } else { if (v3 < v4 && Math.random() < 0.7) { v6.push(v1); v4 -= v3; } } } --v2; } return v6; }; v2.isItemBought = function (itemList, itemId) { var v1; var v2; v2 = itemList.length; v1 = 0; while (v1 < v2) { if (itemList[v1] == itemId) { return true; } ++v1; } return false; }; v1.FIRST_WAVE_ID = 1; v1.C_PLAYER_LIVES_COUNT = 3; v2.AI_CASH_LIMIT_PER_WAVE = 700; v2.C_INFO_TITLE_TXT = 'Baloon defence'; v2.C_INFO_SUBTITLE_TXT = 'Wave '; v2.C_INFO_MISSION_TXT = 'Your task is to defend the rising baloons until the time limit runs out.'; v2.C_INFO_OBJECTIVE_TXT = '- defend the baloons until time limit runs out\n- at least one baloon must survive!'; v2.C_INFO_WEATHER_TXT = 'No information'; v2.C_INFO_HINT_TXT = 'Be careful, your weapons can damage baloons as well!'; v2.__timeLimit = 50; v2.C_CHANGE_LOCATION_WAVE_LIMIT = 10; v2.C_TIME_LIMIT_PER_WAVE_INC = 5; v2.C_BALOON_HP_WAVE_INCREMENT = 5; ASSetPropFlags(config.levels.DefenceWaveLevel.prototype, null, 1); } #endinitclip } movieClip 1837 __Packages.config.levels.MultiplayerLevel { #initclip if (!_global.config) { _global.config = new Object(); } if (!_global.config.levels) { _global.config.levels = new Object(); } if (!_global.config.levels.MultiplayerLevel) { var v1 = function (gameConfig) { this.__gameConfig = gameConfig; this.c = new config.levels.LevelConfig(); var v15; v15 = UtilMath.getRandomNaturalNumber(0, enums.LocationTypes.COUNT - 1); this.c.setConfigItem(config.levels.LevelConfig.LOCATION, v15); var v16; v16 = UtilMath.getRandomNaturalNumber(0, enums.WeatherTypes.COUNT - 1); this.c.setConfigItem(config.levels.LevelConfig.WEATHER, v16); var v7; v7 = UtilMath.getRandomNaturalNumber(0, enums.SkyTypes.COUNT - 1); this.c.setConfigItem(config.levels.LevelConfig.SKY_TYPE, v7); var v12; if (Math.random() < 20) { v12 = 2; } else { v12 = Math.random(); } if (Math.random() < 70) { v12 = 0; } else { if (Math.random() < 20) { v12 = 2; } else { v12 = Math.random(); } } var v13; v13 = v12 * Math.random() * UtilMath.getRandomSign(); this.c.setConfigItem(config.levels.LevelConfig.WIND_DIR, new Vector2D(v13, 0)); var v3; v3 = new Array(); var v8; if ((v7 == enums.SkyTypes.GREY || v7 == enums.SkyTypes.NIGHT) && Math.random() < 0.5) { var v17; v17 = UtilMath.getRandomSign() * (v13 + 0.3); v8 = new Array(); v8[entities.Obstacles.StormCloud.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STORM_CLOUD; v8[entities.Obstacles.StormCloud.C_ARG_TYPE_X] = 1000 * Math.random(); v8[entities.Obstacles.StormCloud.C_ARG_TYPE_Y] = 70 + 200 * Math.random(); v8[entities.Obstacles.StormCloud.C_ARG_TYPE_VELOCITY] = v17; v8[entities.Obstacles.StormCloud.C_ARG_TYPE_DIRECTION] = new Vector2D(UtilMath.getRandomSign(), 0); v3.push(v8); } if (v7 == enums.SkyTypes.GREY && Math.random() < 0.3) { v8 = new Array(); v8[entities.Obstacles.Tornado.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TORNADO; v8[entities.Obstacles.Tornado.C_ARG_TYPE_X] = 700; v8[entities.Obstacles.Tornado.C_ARG_TYPE_VELOCITY] = 0.1 + 0.3 * Math.random(); v8[entities.Obstacles.Tornado.C_ARG_TYPE_DIRECTION] = new Vector2D(UtilMath.getRandomSign(), 0); v3.push(v8); } if (v7 != enums.SkyTypes.GREY && v7 != enums.SkyTypes.NIGHT && Math.random() < 0.4) { var v21; v21 = UtilMath.getRandomSign() * (v13 + 0.5); v8 = new Array(); v8[entities.Obstacles.BirdFormation.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BIRD_FORMATION; v8[entities.Obstacles.BirdFormation.C_ARG_TYPE_X] = 1000 * Math.random(); v8[entities.Obstacles.BirdFormation.C_ARG_TYPE_Y] = 25000 * Math.random(); v8[entities.Obstacles.BirdFormation.C_ARG_TYPE_VELOCITY] = v21; v8[entities.Obstacles.BirdFormation.C_ARG_TYPE_DIRECTION] = new Vector2D(UtilMath.getRandomSign(), 0); v3.push(v8); } var v10; v10 = UtilMath.getRandomNaturalNumber(0, 4); var v2; v2 = 0; while (v2 < v10) { if (Math.random() < 0.5) { v8 = new Array(); v8[entities.Obstacles.Target.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.TARGET; v8[entities.Obstacles.Target.C_ARG_TYPE_X] = +(800 * Math.random()); v8[entities.Obstacles.Target.C_ARG_TYPE_Y] = 100 + 350 * Math.random(); v8[entities.Obstacles.Target.C_ARG_TYPE_HITPOINTS] = 5 + UtilMath.getRandomNaturalNumber(0, 5); v8[entities.Obstacles.Target.C_ARG_TYPE_GROUP_ID] = 1; v8[entities.Obstacles.Target.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v3.push(v8); } ++v2; } var v9; v9 = UtilMath.getRandomNaturalNumber(0, 3); v2 = 0; while (v2 < v9) { var v4 = 300 + 100 * Math.random(); v8 = new Array(); v8[entities.Obstacles.Baloon.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.BALOON; v8[entities.Obstacles.Baloon.C_ARG_TYPE_X] = 100 + 600 * Math.random(); v8[entities.Obstacles.Baloon.C_ARG_TYPE_Y] = v4; v8[entities.Obstacles.Baloon.C_ARG_TYPE_VELOCITY] = 2 * Math.random(); v8[entities.Obstacles.Baloon.C_ARG_TYPE_DIRECTION] = new Vector2D(UtilMath.getRandomSign(), 0); v8[entities.Obstacles.Baloon.C_ARG_TYPE_HITPOINTS] = 15 + UtilMath.getRandomNaturalNumber(0, 25); v8[entities.Obstacles.Baloon.C_ARG_TYPE_TARGET_TYPE] = enums.TargetTypes.NONE; v8[entities.Obstacles.Baloon.C_ARG_TYPE_ON_TEXT] = 'HIT ME!'; v8[entities.Obstacles.Baloon.C_ARG_TYPE_SHOW_HEALTH] = true; v3.push(v8); ++v2; } v8 = new Array(); v8[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v8[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 400; v8[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v8[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_HANGAR'; v3.push(v8); v8 = new Array(); v8[entities.Obstacles.StaticObs.C_ARG_TYPE_OBSTACLE_TYPE] = enums.ObstacleTypes.STATIC_OBSTACLE; v8[entities.Obstacles.StaticObs.C_ARG_TYPE_X] = 500; v8[entities.Obstacles.StaticObs.C_ARG_TYPE_Y] = 575; v8[entities.Obstacles.StaticObs.C_ARG_CLIP_NAME] = 'S_WIND_RIBBON'; v8[entities.Obstacles.StaticObs.C_ARG_SCALE] = v13 >= 0 ? 70 : -70; v3.push(v8); this.c.setConfigItemArr(config.levels.LevelConfig.AIR_OBSTACLES_ARRAY, v3); var v11; v11 = new Array(); var v14; v14 = this.__gameConfig.getPlaneConfig(0, enums.GameTypes.MULTIPLAYER); v11.push(v14); var v20; v20 = this.__gameConfig.getPlaneConfig(1, enums.GameTypes.MULTIPLAYER); v11.push(v20); var v19; v19 = this.__gameConfig.getPlaneConfig(2, enums.GameTypes.MULTIPLAYER); v11.push(v19); var v18; v18 = this.__gameConfig.getPlaneConfig(3, enums.GameTypes.MULTIPLAYER); v11.push(v18); this.c.setConfigItemArr(config.levels.LevelConfig.PLANES_POS_AND_CONF, v11); var v5; var v6; v6 = enums.BonusTypes.TOTAL_BONUSES; v5 = new Array(); v2 = 0; while (v2 < v6) { v5.push(v2); ++v2; } this.c.setConfigItemArr(config.levels.LevelConfig.BONUSES_ARRAY, v5); this.c.setConfigItem(config.levels.LevelConfig.ARENA_SIZE_TYPE, enums.ArenaSizeTypes.SMALL); }; config.levels.MultiplayerLevel = v1; var v2 = v1.prototype; v2.getLevelConfig = function () { return this.c; }; v1.FIRST_WAVE_ID = 1; v1.C_PLAYER_LIVES_COUNT = 3; v2.AI_CASH_LIMIT_PER_WAVE = 700; v2.C_INFO_TITLE_TXT = 'Baloon defence'; v2.C_INFO_SUBTITLE_TXT = 'Wave '; v2.C_INFO_MISSION_TXT = 'Your task is to defend the rising baloons until the time limit runs out.'; v2.C_INFO_OBJECTIVE_TXT = '- defend the baloons until time limit runs out\n- at least one baloon mus survive!'; v2.C_INFO_WEATHER_TXT = 'No information'; v2.C_INFO_HINT_TXT = 'Be careful, you weapons can damage baloons as well!'; v2.C_CHANGE_LOCATION_WAVE_LIMIT = 10; v2.C_TIME_LIMIT_PER_WAVE_INC = 5; v2.C_BALOON_HP_WAVE_INCREMENT = 5; ASSetPropFlags(config.levels.MultiplayerLevel.prototype, null, 1); } #endinitclip } movieClip 1838 __Packages.GameConfig { #initclip if (!_global.GameConfig) { var v1 = function () { GameConfig.__myInstance = this; mx.events.EventDispatcher.initialize(this); this.numOfPlayers = Const.C_MAX_NUM_OF_PLAYERS; this.instantPlay = false; this.isMusicOn = true; this.isSoundFxOn = true; this.GFXQuality = GameConfig.C_DEFAULT_QUALITY; this.playerControlArray = new Array(); var v3; v3 = 0; while (v3 < Const.C_MAX_NUM_OF_PLAYERS) { this.playerControlArray.push(0); ++v3; } this.SetDefaultControls(); this.InitCookie(); this.UpdateNumOfPlayers(); var v4; v4 = GameConfig.GFXQualityArray[this.GFXQuality]; _root._quality = GameConfig.GFXQualityArray[v4]; this.gamePaused = false; this.playerPositionInGame = 'MENU'; this.InitPlaneConfigs(); this.InitScoreHolders(); }; _global.GameConfig = v1; var v2 = v1.prototype; v1.getInstance = function () { if (GameConfig.__myInstance == undefined) { GameConfig.__myInstance = new GameConfig(); } else { return GameConfig.__myInstance; } }; v2.InitPlaneConfigs = function () { this.__singlePlayerCurrPlaneConfig = new PlaneConfig(enums.PlaneTypes.CAMEL, enums.PlaneStartPosTypes.FIRST, this.getGeneralControlsType(), undefined, config.levels.WorldConfig.C_SP_NUM_OF_LIVES, undefined, enums.TargetTypes.NONE); this.__singleLevelCurrPlaneConfig = new PlaneConfig(enums.PlaneTypes.CAMEL, enums.PlaneStartPosTypes.FIRST, this.getGeneralControlsType(), undefined, config.levels.WorldConfig.C_SP_NUM_OF_LIVES, undefined, enums.TargetTypes.NONE); this.__singleLevelCurrPlaneConfig.setCash(this.C_SINGLE_LEVEL_CASH_AMOUNT); this.__defenceModeCurrPlaneConfig = new PlaneConfig(enums.PlaneTypes.CAMEL, enums.PlaneStartPosTypes.FIRST, this.getGeneralControlsType(), undefined, config.levels.DefenceWaveLevel.C_PLAYER_LIVES_COUNT, undefined, enums.TargetTypes.NONE); this.__multiplayerCurrPlaneConfigArr = new Array(); var v2; v2 = new PlaneConfig(enums.PlaneTypes.CAMEL, enums.PlaneStartPosTypes.FIRST, enums.DefaultKeyTypes.A_W_D, undefined, config.levels.WorldConfig.C_MULTIPLAYER_NUM_OF_LIVES, undefined, enums.TargetTypes.PRIMARY); v2.setCash(this.C_MULTIPLAYER_CASH_AMOUNT); this.__multiplayerCurrPlaneConfigArr.push(v2); v2 = new PlaneConfig(enums.PlaneTypes.HANRIOT, enums.PlaneStartPosTypes.SECOND, enums.DefaultKeyTypes.J_I_L, undefined, config.levels.WorldConfig.C_MULTIPLAYER_NUM_OF_LIVES, undefined, enums.TargetTypes.PRIMARY); v2.setCash(this.C_MULTIPLAYER_CASH_AMOUNT); this.__multiplayerCurrPlaneConfigArr.push(v2); v2 = new PlaneConfig(enums.PlaneTypes.PFALZ, enums.PlaneStartPosTypes.THIRD, enums.DefaultKeyTypes.LEFT_UP_RIGHT_ONLY, undefined, config.levels.WorldConfig.C_MULTIPLAYER_NUM_OF_LIVES, undefined, enums.TargetTypes.PRIMARY); v2.setCash(this.C_MULTIPLAYER_CASH_AMOUNT); this.__multiplayerCurrPlaneConfigArr.push(v2); v2 = new PlaneConfig(enums.PlaneTypes.ALBATROS, enums.PlaneStartPosTypes.FOURTH, enums.DefaultKeyTypes.NUMPAD_4_8_6, undefined, config.levels.WorldConfig.C_MULTIPLAYER_NUM_OF_LIVES, undefined, enums.TargetTypes.PRIMARY); v2.setCash(this.C_MULTIPLAYER_CASH_AMOUNT); this.__multiplayerCurrPlaneConfigArr.push(v2); this.loadMultiplayer(); }; v2.InitScoreHolders = function () { this.__singlePlayerScoreHolder = new ScoreHolder(); this.__singleLevelScoreHolder = new ScoreHolder(); this.__tutorialScoreHolder = new ScoreHolder(); this.__defenceScoreHolder = new ScoreHolder(); this.__multiplayerScoreHolderArr = new Array(); var v2; v2 = new ScoreHolder(); this.__multiplayerScoreHolderArr.push(v2); v2 = new ScoreHolder(); this.__multiplayerScoreHolderArr.push(v2); v2 = new ScoreHolder(); this.__multiplayerScoreHolderArr.push(v2); v2 = new ScoreHolder(); this.__multiplayerScoreHolderArr.push(v2); }; v2.SetDefaultControls = function () { this.playerControlArray[0] = enums.DefaultKeyTypes.LEFT_UP_RIGHT; this.playerControlArray[1] = enums.DefaultKeyTypes.A_W_D; this.playerControlArray[2] = enums.DefaultKeyTypes.NUMPAD_4_8_6; this.playerControlArray[3] = enums.DefaultKeyTypes.J_I_L; this.UpdateNumOfPlayers(); }; v2.InitCookie = function () { this.cookieObj = SharedObject.getLocal(GameConfig.C_COOKIE_FILE_NAME, GameConfig.C_SHARED_OBJECT_PATH); if (!this.isCookieCreated(this.cookieObj)) { this.cookieObj.data.cookieCreated = true; this.cookieObj.data.playerControlArray = new Array(); var v3; v3 = 0; while (v3 < Const.C_MAX_NUM_OF_PLAYERS) { this.cookieObj.data.playerControlArray.push(this.playerControlArray[v3]); ++v3; } this.cookieObj.data.isMusicOn = this.isMusicOn; this.cookieObj.data.isSoundFxOn = this.isSoundFxOn; this.cookieObj.data.GFXQuality = this.GFXQuality; this.cookieObj.data.isCampaignCompleted = this.__isCampaignCompleted; this.cookieObj.data.isCampaignCompletedNotifShowed = this.__isCampaignCompletedNotifShowed; } else { var v4; v4 = this.cookieObj.data.cookieCreated; var v3 = 0; while (v3 < Const.C_MAX_NUM_OF_PLAYERS) { this.playerControlArray[v3] = this.cookieObj.data.playerControlArray[v3]; ++v3; } this.isMusicOn = this.cookieObj.data.isMusicOn; this.isSoundFxOn = this.cookieObj.data.isSoundFxOn; this.GFXQuality = this.cookieObj.data.GFXQuality; if (this.GFXQuality == undefined || this.GFXQuality == null) { this.GFXQuality = GameConfig.C_DEFAULT_QUALITY; } this.__isCampaignCompleted = this.cookieObj.data.isCampaignCompleted; this.__isCampaignCompletedNotifShowed = this.cookieObj.data.isCampaignCompletedNotifShowed; } GameConfig.InitSingleLevelLevelLocks(this.cookieObj); _root._quality = GameConfig.GFXQualityArray[this.GFXQuality]; }; v2.UpdateCookieData = function () { var v3; v3 = SharedObject.getLocal(GameConfig.C_COOKIE_FILE_NAME, GameConfig.C_SHARED_OBJECT_PATH); var v2; v2 = 0; while (v2 < Const.C_MAX_NUM_OF_PLAYERS) { v3.data.playerControlArray[v2] = this.playerControlArray[v2]; ++v2; } v3.data.isMusicOn = this.isMusicOn; v3.data.isSoundFxOn = this.isSoundFxOn; v3.data.GFXQuality = this.GFXQuality; }; v2.FlushCookie = function () { this.UpdateCookieData(); this.cookieObj.flush(); }; v2.NextControlsVal = function (idx) { var v3; v3 = enums.DefaultKeyTypes.count; var v2; v2 = this.playerControlArray[idx]; var v5; v5 = (v2 + 1) % v3; this.playerControlArray[idx] = v5; this.UpdateNumOfPlayers(); return this.playerControlArray[idx]; }; v2.PrevControlsVal = function (idx) { var v3; v3 = enums.DefaultKeyTypes.count; var v4; v4 = this.playerControlArray[idx]; var v2; v2 = (v4 - 1) % v3; if (v2 >= 0) { v2 = v2; this.playerControlArray[idx] = v2; this.UpdateNumOfPlayers(); return this.playerControlArray[idx]; } v2 = v3 - 1; this.playerControlArray[idx] = v2; this.UpdateNumOfPlayers(); return this.playerControlArray[idx]; }; v2.UpdateNumOfPlayers = function () { var v2; var v3; v3 = 0; v2 = 0; while (v2 < Const.C_MAX_NUM_OF_PLAYERS) { if (this.playerControlArray[v2] != enums.DefaultKeyTypes.OFF) { ++v3; } ++v2; } this.numOfPlayers = v3; if (this.instantPlay) { this.numOfPlayers = Const.C_MAX_NUM_OF_PLAYERS; } }; v2.isSoundFXEnabled = function () { return this.isSoundFxOn; }; v2.isMusicEnabled = function () { return this.isMusicOn; }; v2.ToggleSoundFX = function () { this.isSoundFxOn = !this.isSoundFxOn; if (this.isSoundFxOn == false) { this.__world.StopAllSoundFX(); } this.UpdateCookieData(); this.dispatchEvent({'target': this, 'type': GameConfig.EVT_TOGGLE_SFX, 'state': this.isSoundFxOn}); return this.isSoundFxOn; }; v2.ToggleMusic = function () { this.isMusicOn = !this.isMusicOn; if (this.isMusicOn == true) { if (this.getPlayerPositionInGame() == 'MENU') { this.__mainMenu.PlayMenuMusic(); } if (this.getPlayerPositionInGame() == 'GAME') { this.__world.PlayGameMusic(); } this.UpdateCookieData(); this.dispatchEvent({'target': this, 'type': GameConfig.EVT_TOGGLE_MUSIC, 'state': this.isMusicOn}); return this.isMusicOn; } if (this.getPlayerPositionInGame() == 'MENU') { this.__mainMenu.StopMenuMusic(); } if (this.getPlayerPositionInGame() == 'GAME') { this.__world.StopGameMusic(); } this.UpdateCookieData(); this.dispatchEvent({'target': this, 'type': GameConfig.EVT_TOGGLE_MUSIC, 'state': this.isMusicOn}); return this.isMusicOn; }; v2.ToggleGFXQuality = function () { var v3; v3 = GameConfig.GFXQualityArray.length; this.GFXQuality = (this.GFXQuality + 1) % v3; _root._quality = GameConfig.GFXQualityArray[this.GFXQuality]; this.UpdateCookieData(); return GameConfig.GFXQualityArray[this.GFXQuality]; }; v2.GetQuality = function () { return GameConfig.GFXQualityArray[this.GFXQuality]; }; v2.GetToggleMusicClipFrameStateName = function () { if (this.isMusicOn) { return 'F_ON'; } else { return 'F_OFF'; } }; v2.GetToggleSoundFXClipFrameStateName = function () { if (this.isSoundFxOn) { return 'F_ON'; } else { return 'F_OFF'; } }; v2.PauseGame = function () { var v2; v2 = Game.getInstance(); var v3; v3 = v2.getWorld(); this.setWorldPointer((Game.getInstance()).getWorld()); this.gamePaused = true; this.__world.Pause(true); }; v2.UnPauseGame = function (doNotNotifyWorld) { this.setWorldPointer((Game.getInstance()).getWorld()); if (doNotNotifyWorld == undefined || doNotNotifyWorld == false) { this.gamePaused = false; this.__world.Pause(false); } else { this.gamePaused = false; } }; v2.isGamePaused = function () { return this.gamePaused; }; v1.setGameType = function (gType) { GameConfig.__gameMainType = gType; GameConfig.ResetSetSecWpnBoughtVars(); GameConfig.InitCurrentLevel(GameConfig.__gameMainType); }; v1.getGameType = function () { return GameConfig.__gameMainType; }; v1.getSGameType = function () { return GameConfig.__gameMainType; }; v2.setChosenPlaneIdx = function (chosenPlaneType) { switch (GameConfig.__gameMainType) { case enums.GameTypes.INS_SINGLEPLAYER: this.__singlePlayerCurrPlaneConfig.setPlaneType(chosenPlaneType); break; case enums.GameTypes.SINGLE_LEVEL: this.__singleLevelCurrPlaneConfig.setPlaneType(chosenPlaneType); break; case enums.GameTypes.DEFENCE: this.__defenceModeCurrPlaneConfig.setPlaneType(chosenPlaneType); } }; v2.getChosenPlaneIdx = function () { switch (GameConfig.__gameMainType) { case enums.GameTypes.INS_SINGLEPLAYER: return this.__singlePlayerCurrPlaneConfig.getPlaneType(); break; case enums.GameTypes.SINGLE_LEVEL: return this.__singleLevelCurrPlaneConfig.getPlaneType(); break; case enums.GameTypes.DEFENCE: return this.__defenceModeCurrPlaneConfig.getPlaneType(); } }; v2.getNumOfPlayers = function () { this.UpdateNumOfPlayers(); return this.numOfPlayers; }; v2.setMainMenuPointer = function (mainMenu) { this.__mainMenu = mainMenu; }; v2.setWorldPointer = function (world) { this.__world = world; }; v2.setPlayerPositionInGame = function (pos) { this.playerPositionInGame = pos; }; v2.getPlayerPositionInGame = function () { return this.playerPositionInGame; }; v2.getPlaneControls = function (planeIdx) { return this.playerControlArray[planeIdx]; }; v2.getPlaneConfig = function (planeIdx, gameType) { gameType = (gameType == undefined) ? GameConfig.__gameMainType : gameType; switch (gameType) { case enums.GameTypes.TUTORIAL: return undefined; break; case enums.GameTypes.INS_SINGLEPLAYER: return this.__singlePlayerCurrPlaneConfig; break; case enums.GameTypes.SINGLE_LEVEL: return this.__singleLevelCurrPlaneConfig; break; case enums.GameTypes.DEFENCE: return this.__defenceModeCurrPlaneConfig; break; case enums.GameTypes.MULTIPLAYER: return this.__multiplayerCurrPlaneConfigArr[planeIdx]; } }; v2.getPlayersPlaneConfig = function () { return this.getPlaneConfig(); }; v2.getScoreHolder = function (planeIdx) { switch (GameConfig.__gameMainType) { case enums.GameTypes.TUTORIAL: return this.__tutorialScoreHolder; break; case enums.GameTypes.INS_SINGLEPLAYER: return this.__singlePlayerScoreHolder; break; case enums.GameTypes.SINGLE_LEVEL: return this.__singleLevelScoreHolder; break; case enums.GameTypes.DEFENCE: return this.__defenceScoreHolder; break; case enums.GameTypes.MULTIPLAYER: return this.__multiplayerScoreHolderArr[planeIdx]; } }; v1.InitCurrentLevel = function (gameType) { switch (gameType) { case enums.GameTypes.INS_SINGLEPLAYER: GameConfig.__currentLevelId = config.levels.WorldConfig.SP_LEVEL_01; break; break; case enums.GameTypes.SINGLE_LEVEL: case enums.GameTypes.DEFENCE: GameConfig.__currentDefenceLevelId = config.levels.DefenceWaveLevel.FIRST_WAVE_ID; } }; v1.setCurrentLevelId = function (levelId) { if (GameConfig.__gameMainType == enums.GameTypes.INS_SINGLEPLAYER) { GameConfig.__currentLevelId = levelId; } if (GameConfig.__gameMainType == enums.GameTypes.SINGLE_LEVEL) { GameConfig.__currentSingleLevelId = levelId; } if (GameConfig.__gameMainType == enums.GameTypes.DEFENCE) { GameConfig.__currentDefenceLevelId = levelId; } }; v1.getCurrentLevelId = function () { switch (GameConfig.__gameMainType) { case enums.GameTypes.TUTORIAL: return GameConfig.__tutorialLevelId; break; case enums.GameTypes.INS_SINGLEPLAYER: return GameConfig.__currentLevelId; break; case enums.GameTypes.SINGLE_LEVEL: return GameConfig.__currentSingleLevelId; break; case enums.GameTypes.DEFENCE: return GameConfig.__currentDefenceLevelId; } }; v2.getGeneralControlsType = function () { this.cookieObj = SharedObject.getLocal(this.C_SINGLE_PLAYER_COOKIE_FILE_NAME, GameConfig.C_SHARED_OBJECT_PATH); var v2; v2 = this.__singlePlayerCurrPlaneConfig.loadOnlyKeyType(this.cookieObj); if (v2 == undefined) { v2 = enums.DefaultKeyTypes.getGeneralControlType(this.__generalControlsType); } return v2; }; v2.setGeneralControlsType = function (ctrlKeyType) { var v2; v2 = SharedObject.getLocal(this.C_SINGLE_PLAYER_COOKIE_FILE_NAME, GameConfig.C_SHARED_OBJECT_PATH); this.__singlePlayerCurrPlaneConfig.saveOnlyKeyType(v2, ctrlKeyType); this.__singlePlayerCurrPlaneConfig.saveOnlyKeyType(v2, ctrlKeyType); this.__singleLevelCurrPlaneConfig.saveOnlyKeyType(v2, ctrlKeyType); v2.flush(); v2 = SharedObject.getLocal(this.C_DEFENCE_COOKIE_FILE_NAME, GameConfig.C_SHARED_OBJECT_PATH); this.__defenceModeCurrPlaneConfig.saveOnlyKeyType(v2, ctrlKeyType); v2.flush(); }; v2.isGeneralControlsTypeDefined = function () { this.cookieObj = SharedObject.getLocal(this.C_SINGLE_PLAYER_COOKIE_FILE_NAME, GameConfig.C_SHARED_OBJECT_PATH); var v2; v2 = this.__singlePlayerCurrPlaneConfig.loadOnlyKeyType(this.cookieObj); if (v2 == undefined) { return false; } else { return true; } }; v2.saveGame = function (gameType) { gameType = (gameType == undefined) ? GameConfig.__gameMainType : gameType; switch (gameType) { case enums.GameTypes.INS_SINGLEPLAYER: this.saveSinglePlayer(); break; case enums.GameTypes.DEFENCE: this.saveDefence(); break; case enums.GameTypes.MULTIPLAYER: this.saveMultiplayer(); } }; v2.loadGame = function (gameType) { gameType = (gameType == undefined) ? GameConfig.__gameMainType : gameType; switch (gameType) { case enums.GameTypes.INS_SINGLEPLAYER: this.loadSinglePlayer(); break; case enums.GameTypes.DEFENCE: this.loadDefence(); break; case enums.GameTypes.MULTIPLAYER: this.loadMultiplayer(); } }; v2.saveSinglePlayer = function () { this.cookieObj = SharedObject.getLocal(this.C_SINGLE_PLAYER_COOKIE_FILE_NAME, GameConfig.C_SHARED_OBJECT_PATH); this.cookieObj.data.cookieCreated = true; this.cookieObj.data.__currentLevelId = GameConfig.__currentLevelId; this.__singlePlayerCurrPlaneConfig.savePlaneConfig(this.cookieObj); this.__singlePlayerScoreHolder.saveScore(this.cookieObj); this.cookieObj.flush(); }; v2.saveDefence = function () { this.cookieObj = SharedObject.getLocal(this.C_DEFENCE_COOKIE_FILE_NAME, GameConfig.C_SHARED_OBJECT_PATH); this.cookieObj.data.cookieCreated = true; this.cookieObj.data.__currentDefenceLevelId = GameConfig.__currentDefenceLevelId; this.__defenceModeCurrPlaneConfig.savePlaneConfig(this.cookieObj); this.__defenceScoreHolder.saveScore(this.cookieObj); this.cookieObj.flush(); }; v2.saveMultiplayer = function () { var v3; var v2; var v4; v4 = this.__multiplayerCurrPlaneConfigArr.length; v2 = 0; while (v2 < v4) { this.cookieObj = SharedObject.getLocal(this.C_MULTIPLAYER_COOKIE_FILE_NAME + String(v2), GameConfig.C_SHARED_OBJECT_PATH); this.cookieObj.data.cookieCreated = true; v3 = this.__multiplayerCurrPlaneConfigArr[v2]; v3.savePlaneConfig(this.cookieObj); this.__multiplayerScoreHolderArr[v2].saveScore(this.cookieObj); this.cookieObj.flush(); ++v2; } }; v2.loadSinglePlayer = function () { this.cookieObj = SharedObject.getLocal(this.C_SINGLE_PLAYER_COOKIE_FILE_NAME, GameConfig.C_SHARED_OBJECT_PATH); GameConfig.__currentLevelId = this.cookieObj.data.__currentLevelId; this.__singlePlayerCurrPlaneConfig.loadPlaneConfig(this.cookieObj); this.__singlePlayerScoreHolder.loadScore(this.cookieObj); }; v2.loadDefence = function () { this.cookieObj = SharedObject.getLocal(this.C_DEFENCE_COOKIE_FILE_NAME, GameConfig.C_SHARED_OBJECT_PATH); GameConfig.__currentDefenceLevelId = this.cookieObj.data.__currentDefenceLevelId; this.__defenceModeCurrPlaneConfig.loadPlaneConfig(this.cookieObj); this.__defenceScoreHolder.loadScore(this.cookieObj); }; v2.loadMultiplayer = function () { var v3; var v2; var v4; v4 = this.__multiplayerCurrPlaneConfigArr.length; v2 = 0; while (v2 < v4) { v3 = this.__multiplayerCurrPlaneConfigArr[v2]; v3.setCash(this.C_MULTIPLAYER_CASH_AMOUNT); this.__multiplayerScoreHolderArr[v2].ResetAllStats(); this.cookieObj = SharedObject.getLocal(this.C_MULTIPLAYER_COOKIE_FILE_NAME + String(v2), GameConfig.C_SHARED_OBJECT_PATH); if (!this.isCookieCreated(this.cookieObj)) { return undefined; } v3.loadPlaneConfig(this.cookieObj); this.__multiplayerScoreHolderArr[v2].loadScore(this.cookieObj); ++v2; } }; v2.isGameSaved = function (gameType) { gameType = (gameType == undefined) ? GameConfig.__gameMainType : gameType; if (gameType == undefined) { return false; } var v3; switch (gameType) { case enums.GameTypes.INS_SINGLEPLAYER: v3 = SharedObject.getLocal(this.C_SINGLE_PLAYER_COOKIE_FILE_NAME, GameConfig.C_SHARED_OBJECT_PATH); break; case enums.GameTypes.DEFENCE: v3 = SharedObject.getLocal(this.C_DEFENCE_COOKIE_FILE_NAME, GameConfig.C_SHARED_OBJECT_PATH); break; case enums.GameTypes.MULTIPLAYER: v3 = SharedObject.getLocal(this.C_MULTIPLAYER_COOKIE_FILE_NAME, GameConfig.C_SHARED_OBJECT_PATH); } if (!this.isCookieCreated(v3)) { return false; } else { return true; } }; v2.resetPlaneConfig = function (gameType) { gameType = (gameType == undefined) ? GameConfig.__gameMainType : gameType; switch (gameType) { case enums.GameTypes.INS_SINGLEPLAYER: this.__singlePlayerCurrPlaneConfig.ResetConfig(); this.__singlePlayerScoreHolder.ResetAllStats(); break; case enums.GameTypes.SINGLE_LEVEL: this.__singleLevelCurrPlaneConfig.ResetConfig(); this.__singleLevelCurrPlaneConfig.setCash(this.C_SINGLE_LEVEL_CASH_AMOUNT); this.__singleLevelScoreHolder.ResetAllStats(); break; case enums.GameTypes.DEFENCE: this.__defenceModeCurrPlaneConfig.ResetConfig(); this.__defenceScoreHolder.ResetAllStats(); break; case enums.GameTypes.MULTIPLAYER: var v2; var v3; v3 = this.__multiplayerCurrPlaneConfigArr.length; v2 = 0; while (v2 < v3) { this.__multiplayerCurrPlaneConfigArr[v2].ResetConfig(); this.__multiplayerCurrPlaneConfigArr[v2].setCash(this.C_MULTIPLAYER_CASH_AMOUNT); this.__multiplayerScoreHolderArr[v2].ResetAllStats(); ++v2; } break; case enums.GameTypes.TUTORIAL: this.__tutorialScoreHolder.ResetAllStats(); } }; v1.getGameEndType = function () { var v1; v1 = GameConfig.getCurrentLevelId(); if (v1 == 1 && (GameConfig.__gameMainType == enums.GameTypes.INS_SINGLEPLAYER || GameConfig.__gameMainType == enums.GameTypes.DEFENCE)) { return GameConfig.C_SP_FIRST_LEVEL; } if (v1 < 0) { return v1; } else { return GameConfig.C_SP_IN_PROGRES; } }; v1.ResetSetSecWpnBoughtVars = function () { GameConfig.__isSecWpnBoughtFor1stTime = false; GameConfig.__isHintDlgAboutSecWpnBought = false; }; v1.SetSecWpnBoughtFor1StTime = function () { GameConfig.__isSecWpnBoughtFor1stTime = true; }; v1.isNeededToShowSecWpnDlgBought = function () { if (GameConfig.__isSecWpnBoughtFor1stTime && !GameConfig.__isHintDlgAboutSecWpnBought) { GameConfig.__isHintDlgAboutSecWpnBought = true; return true; } else { return false; } }; v1.InitSingleLevelLevelLocks = function (cookieObj) { GameConfig.__singleLevelModeLevelLockArr = new Array(); var v1; var v2; v2 = config.levels.WorldConfig.LevelInfoArray.length; if (cookieObj.data.__singleLevelModeLevelLockArr == undefined) { v1 = 0; while (v1 < v2) { GameConfig.__singleLevelModeLevelLockArr.push(Boolean(config.levels.WorldConfig.getLevelInfo(v1, config.levels.WorldConfig.C_INFO_LEVEL_LOCKED))); ++v1; } GameConfig.UpdateSingleLevelLevelLocks(cookieObj); } else { GameConfig.__singleLevelModeLevelLockArr = cookieObj.data.__singleLevelModeLevelLockArr.slice(); } }; v1.UpdateSingleLevelLevelLocks = function (cookieObj) { cookieObj.data.__singleLevelModeLevelLockArr = new Array(); cookieObj.data.__singleLevelModeLevelLockArr = GameConfig.__singleLevelModeLevelLockArr.slice(); }; v1.isLevelLocked = function (id) { return GameConfig.__singleLevelModeLevelLockArr[id]; }; v1.UnlockLevel = function (id) { GameConfig.__singleLevelModeLevelLockArr[id] = false; var v1; v1 = SharedObject.getLocal(GameConfig.C_COOKIE_FILE_NAME, GameConfig.C_SHARED_OBJECT_PATH); GameConfig.UpdateSingleLevelLevelLocks(v1); v1.flush(); }; v2.isCookieCreated = function (cookieObj) { if (cookieObj.data.cookieCreated == undefined || cookieObj.data.cookieCreated == null) { return false; } else { return true; } }; v2.isCampaignCompleted = function () { return this.__isCampaignCompleted; }; v2.setCampaignCompleted = function () { var v2; v2 = SharedObject.getLocal(GameConfig.C_COOKIE_FILE_NAME, GameConfig.C_SHARED_OBJECT_PATH); this.__isCampaignCompleted = true; v2.data.isCampaignCompleted = this.__isCampaignCompleted; v2.flush(); }; v2.setIsCampaignCompletedNotifShowed = function () { var v2; v2 = SharedObject.getLocal(GameConfig.C_COOKIE_FILE_NAME, GameConfig.C_SHARED_OBJECT_PATH); this.__isCampaignCompletedNotifShowed = true; v2.data.isCampaignCompletedNotifShowed = this.__isCampaignCompletedNotifShowed; v2.flush(); }; v2.isCampaignCompletedNotifShowed = function () { return this.__isCampaignCompletedNotifShowed; }; v1.EVT_TOGGLE_MUSIC = 'EVT_TOGGLE_MUSIC'; v1.EVT_TOGGLE_SFX = 'EVT_TOGGLE_SFX'; v1.C_SHARED_OBJECT_PATH = '/'; v1.C_COOKIE_FILE_NAME = 'WAG_DogfightAces_Main'; v1.C_DEFAULT_QUALITY = 1; v1.GFXQualityArray = ['LOW', 'MEDIUM', 'HIGH', 'BEST']; v1.__tutorialLevelId = config.levels.WorldConfig.SP_LEVEL_TUTORIAL; v2.__generalControlsType = 0; v2.C_SINGLE_PLAYER_COOKIE_FILE_NAME = 'WAG_DogfightAces_Campaign'; v2.C_DEFENCE_COOKIE_FILE_NAME = 'WAG_DogfightAces_Defence'; v2.C_MULTIPLAYER_COOKIE_FILE_NAME = 'WAG_DogfightAces_Multi'; v2.C_SINGLE_LEVEL_CASH_AMOUNT = 20000; v2.C_MULTIPLAYER_CASH_AMOUNT = 20000; v1.C_SP_IN_PROGRES = 0; v1.C_SP_FIRST_LEVEL = -3; v1.C_SP_END_INIT = 0; v1.C_SP_END_OTHER = -1; v1.C_SP_END_FOKKER = -2; v1.__playerName = 'guest'; v2.__isCampaignCompleted = false; v2.__isCampaignCompletedNotifShowed = false; ASSetPropFlags(_global.GameConfig.prototype, null, 1); } #endinitclip } movieClip 1839 __Packages.UtilHtmDump { #initclip if (!_global.UtilHtmDump) { var v1 = function () {}; _global.UtilHtmDump = v1; var v2 = v1.prototype; v1.Dump = function (valuestr) { UtilHtmDump.dumpHtm = UtilHtmDump.dumpHtm + valuestr + '<br>'; }; v1.getHtm = function () { return UtilHtmDump.dumpHtm; }; v1.ResetDump = function () { UtilHtmDump.dumpHtm = ''; }; v1.dumpHtm = ''; ASSetPropFlags(_global.UtilHtmDump.prototype, null, 1); } #endinitclip } movieClip 218 __Packages.GamesChart { #initclip if (!_global.GamesChart) { var v1 = function () {}; _global.GamesChart = v1; var v2 = v1.prototype; v1.setup = function (gameIDKey) { if (GamesChart._interface == null) { if (gameIDKey == undefined || gameIDKey == null || gameIDKey == '') { trace(GamesChart._errors.noGameIDHash); return undefined; } GamesChart._interface = new GCBrainInterface(); GamesChart._interface.begin(gameIDKey); } else { trace(GamesChart._errors.alreadyDefinedInterface); } }; v1.showTab = function (xPos, yPos) { if (GamesChart._interface == null) { trace(GamesChart._errors.noInterface); return undefined; } GamesChart._interface.sendNotification(GCNotificationTypes.SHOW_TAB, {'xPos': xPos, 'yPos': yPos}); }; v1.hideTab = function () { if (GamesChart._interface == null) { trace(GamesChart._errors.noInterface); return undefined; } GamesChart._interface.sendNotification(GCNotificationTypes.HIDE_TAB); }; v1.openCharts = function () { if (GamesChart._interface == null) { trace(GamesChart._errors.noInterface); return undefined; } GamesChart._interface.sendNotification(GCNotificationTypes.SHOW_CHART_LISTS); }; v1.VERSION = '0.2.0'; v1.onGCEvent = null; v1._errors = {'noInterface': '[GC-API] ERROR! Please call gc.setup() first. See: http://wiki.gameschart.com/index.php/Static_Functions', 'alreadyDefinedInterface': '[GC-API] ERROR! Can only call setup once! See: http://wiki.gameschart.com/index.php/Static_Functions', 'noContainerMC': '[GC-API] ERROR! You must supply a container to hold GamesChart! See: http://wiki.gameschart.com/index.php/Static_Functions#Setup', 'noGameIDHash': '[GC-API] ERROR! You must supply the game ID key associated with this game! http://wiki.gameschart.com/index.php/Static_Functions#Setup'}; ASSetPropFlags(_global.GamesChart.prototype, null, 1); } #endinitclip } movieClip 225 __Packages.GCBrainInterface { #initclip if (!_global.GCBrainInterface) { var v1 = function () { System.security.allowDomain('*'); System.security.allowInsecureDomain('*'); trace('[GC-API] Games Chart v.' + GamesChart.VERSION); this._container = _root.createEmptyMovieClip('GC_API_MC', _root.getNextHighestDepth()); this._container.onEnterFrame = gc.utils.GCDelegate.create(this, this.onEnterFrame); this._lcRand = int(Math.random() * 10000); this.loadBrain(); this.startLC(); }; _global.GCBrainInterface = v1; var v2 = v1.prototype; v2.onEnterFrame = function () { var v4 = this._container.getDepth(); var v3 = _root.getNextHighestDepth() - 1; if (v4 < v3) { this._container.swapDepths(v3 + 1); } }; v2.loadBrain = function () { var v2 = GCBrainInterface.BRAIN_URL; this._brainLoaded = false; this._brainLoader = new MovieClipLoader(); this._brainLoader.addListener({'onLoadInit': gc.utils.GCDelegate.create(this, this.onFinishedLoading)}); this._brainLoader.loadClip(v2 + '?r=' + this._lcRand, this._container.createEmptyMovieClip('GCBrain_mc', this._container.getNextHighestDepth())); trace('[GC-API] Loading Brain.. '); }; v2.onFinishedLoading = function (brainMC) { this._brainLoaded = true; trace('[GC-API] Brain Loaded!'); }; v2.startLC = function () { this._notificationBuffer = []; this._conn = new gc.utils.GCSWFConnection('_GamesChartLC' + this._lcRand, this, GamesChart.VERSION, 'GC-API', true); this._conn.addEventListener(gc.utils.GCSWFConnection.CONNECTED, this, 'onLCConnected'); this._conn.startConnection(); }; v2.onLCConnected = function (e) { trace('[GC-API] API Connected to Brain!'); while (this._notificationBuffer.length > 0) { var v2 = this._notificationBuffer.pop(); this.sendNotification(v2.name, v2.body, v2.type); } }; v2.onGCEvent = function (type, data) { if (GamesChart.onGCEvent != null) { GamesChart.onGCEvent.apply(null, [type, data]); } }; v2.begin = function (gID) { this.sendNotification(GCNotificationTypes.BEGIN_LOAD, {'gameIDHash': gID, 'apiType': GCBrainInterface.apiType, 'apiVersion': GamesChart.VERSION, 'swfURL': this.getRunningOnURL()}, ''); }; v2.sendNotification = function (n, body, type) { if (this._conn.__get__connected()) { this._conn.send('sendNotification', n, body, type); } else { this._notificationBuffer.push({'name': n, 'body': body, 'type': type}); } }; v2.getRunningOnURL = function () { var v2 = String(flash.external.ExternalInterface.call('window.location.href.toString')); if (v2 == 'null') { return _root._url; } else { return v2; } }; v1.BRAIN_URL = 'http://gameschart.com/flash_client/getBrain.php'; v1.apiType = 'AS2-API'; ASSetPropFlags(_global.GCBrainInterface.prototype, null, 1); } #endinitclip } movieClip 219 __Packages.gc.utils.Events.IEventDispatcher { #initclip if (!_global.gc) { _global.gc = new Object(); } if (!_global.gc.utils) { _global.gc.utils = new Object(); } if (!_global.gc.utils.Events) { _global.gc.utils.Events = new Object(); } if (!_global.gc.utils.Events.IEventDispatcher) { _global.gc.utils.Events.IEventDispatcher = function () {}; } #endinitclip } movieClip 220 __Packages.gc.utils.Events.Event { #initclip if (!_global.gc) { _global.gc = new Object(); } if (!_global.gc.utils) { _global.gc.utils = new Object(); } if (!_global.gc.utils.Events) { _global.gc.utils.Events = new Object(); } if (!_global.gc.utils.Events.Event) { var v1 = function (target, type, data) { super(); this.type = type; this.target = target; if (data != undefined) { this.data = data; } }; gc.utils.Events.Event = v1; gc.utils.Events.Event extends Object; var v2 = v1.prototype; v1.__get__ADDED_TO_STAGE = function () { return 'addedToStage'; }; v1.__get__ENTER_FRAME = function () { return 'enterFrame'; }; v1.__get__UNLOAD = function () { return 'unload'; }; v1.addProperty('ADDED_TO_STAGE', v1.__get__ADDED_TO_STAGE, function () {}); v1.addProperty('ENTER_FRAME', v1.__get__ENTER_FRAME, function () {}); v1.addProperty('UNLOAD', v1.__get__UNLOAD, function () {}); ASSetPropFlags(gc.utils.Events.Event.prototype, null, 1); } #endinitclip } movieClip 221 __Packages.gc.utils.Events.EventDispatcher { #initclip if (!_global.gc) { _global.gc = new Object(); } if (!_global.gc.utils) { _global.gc.utils = new Object(); } if (!_global.gc.utils.Events) { _global.gc.utils.Events = new Object(); } if (!_global.gc.utils.Events.EventDispatcher) { var v1 = function (parent) { this.registeredListeners = new Object(); this._parent = parent; }; gc.utils.Events.EventDispatcher = v1; var v2 = v1.prototype; _global.gc.utils.Events.EventDispatcher implements _global.gc.utils.Events.IEventDispatcher; v2.addEventListener = function (eventType, listenerObj, methodName) { if (eventType == undefined || listenerObj == undefined || methodName == undefined) { throw new Error('All parameters must be defined.'); } if (this.registeredListeners[eventType] == undefined) { this.registeredListeners[eventType] = new Array(); } this.registeredListeners[eventType].push({'listenerObj': listenerObj, 'methodName': methodName}); }; v2.dispatchEvent = function (event, bubbles) { if (bubbles != undefined) { } else { bubbles = true; } 0; var v7 = event.type; var v4 = null; var v5 = ''; if (this.hasEventListener(v7)) { var v3 = this.registeredListeners[v7]; var v2 = 0; while (v2 < v3.length) { v4 = v3[v2].listenerObj; v5 = v3[v2].methodName; v4[v5](event); ++v2; } } else { if (bubbles && this._parent instanceof gc.utils.Events.EventDispatcher) { (gc.utils.Events.EventDispatcher(this._parent)).dispatchEvent(event, bubbles); } } }; v2.removeEventListener = function (eventType, listenerObj, methodName) { if (this.hasEventListener(eventType)) { var v3 = this.registeredListeners[eventType]; var v2 = v3.length - 1; while (v2 >= 0) { if (v3[v2].listenerObj == listenerObj && v3[v2].methodName == methodName) { v3.splice(v2, 1); if (v3.length == 0) { this.registeredListeners[eventType] = null; } break; } --v2; } } }; v2.hasEventListener = function (eventType) { var v2 = Array(this.registeredListeners[eventType]); return v2 != null && v2 != undefined; }; ASSetPropFlags(gc.utils.Events.EventDispatcher.prototype, null, 1); } #endinitclip } movieClip 223 __Packages.gc.utils.GCSWFConnection { #initclip if (!_global.gc) { _global.gc = new Object(); } if (!_global.gc.utils) { _global.gc.utils = new Object(); } if (!_global.gc.utils.GCSWFConnection) { var v1 = function (connectionID, client, version, logName, traceTheLog) { super(); this._connected = false; this._logName = logName; this._host = true; this._queuedMessages = []; this._close = false; this._client = client; this._version = version; this._baseID = (connectionID.split(':')).join(''); this._traceLog = traceTheLog; }; gc.utils.GCSWFConnection = v1; gc.utils.GCSWFConnection extends gc.utils.Events.EventDispatcher; var v2 = v1.prototype; v2.startConnection = function () { this._lc = new LocalConnection(); var v2 = this; this._lc.allowDomain = function (s) { return true; }; this._lc.allowInsecureDomain = function (s) { return true; }; this._lc.GC_utils_GCSWFConnection_init = gc.utils.GCDelegate.create(this, this.GC_utils_GCSWFConnection_init); this._lc.GC_utils_GCSWFConnection_receive = gc.utils.GCDelegate.create(this, this.GC_utils_GCSWFConnection_receive); this._host = this._lc.connect(this._baseID + '_HOST'); this._myID = this._baseID + (this._host ? '_HOST' : '_CLIENT'); this._extID = this._baseID + (this._host ? '_CLIENT' : '_HOST'); if (!this._host) { this._lc.connect(this._myID); this._lc.send(this._extID, 'GC_utils_GCSWFConnection_init', this._version); this.report('[' + this._logName + '] [GCSWFConnection] Connected as client..'); } else { this.report('[' + this._logName + '] [GCSWFConnection] Connected as host..'); } }; v2.bridgeConnected = function () { var v2 = 0; while (v2 < this._queuedMessages.length) { var v5 = this._queuedMessages[v2].methodName; var v4 = this._queuedMessages[v2].methodArgs; var v3 = [v5]; if (v4) { v3 = v3.concat(v4); } this.send.apply(null, v3); ++v2; } this._queuedMessages = []; if (this._close) { this.close(); } }; v2.send = function () { var v3 = arguments.slice(0); if (this._connected) { v3.unshift('GC_utils_GCSWFConnection_receive'); v3.unshift(this._extID); this._lc.send.apply(this._lc, v3); } else { this._queuedMessages.push(v3); } }; v2.GC_utils_GCSWFConnection_receive = function () { var v3 = arguments.slice(0); var v4 = String(v3.shift()); this._client[v4].apply(this._client, v3); }; v2.GC_utils_GCSWFConnection_init = function (version) { this.report('[' + this._logName + '] [GCSWFConnection] Reccieved Init'); if (this._host) { this._lc.send(this._extID, 'GC_utils_GCSWFConnection_init', this._version); } this.clientVersion = version; this._connected = true; this.bridgeConnected(); this.report('[' + this._logName + '] Dispatching Connect Event'); this.dispatchEvent(new gc.utils.Events.Event(this, gc.utils.GCSWFConnection.CONNECTED)); }; v2.close = function () { this.report('[' + this._logName + '] [GCSWFConnection] Connection Closing'); if (this._queuedMessages.length != 0) { this._close = true; return undefined; } this._lc.close(); this._connected = false; delete this._client; delete this._lc; }; v2.report = function (s) { if (this._traceLog) { trace(s); } }; v2.__get__id = function () { return this._baseID; }; v2.__get__connected = function () { return this._connected; }; v1.CONNECTED = 'CONNECTED'; v2.addProperty('connected', v2.__get__connected, function () {}); v2.addProperty('id', v2.__get__id, function () {}); ASSetPropFlags(gc.utils.GCSWFConnection.prototype, null, 1); } #endinitclip } movieClip 207 __Packages.GCComponent { #initclip if (!_global.GCComponent) { var v1 = function () { super(); GCBrainInterface.apiType = 'AS2-MXP'; this.__set__gameKey(''); }; _global.GCComponent = v1; _global.GCComponent extends MovieClip; var v2 = v1.prototype; v2.__set__gameKey = function (k) { this._gameKey = k; if (this._gameKey == undefined || this._gameKey == null || this._gameKey == '') { this._preview.txt.text = 'You need to set your gameID for the API to work.'; } else { if (_global.isLivePreview) { this._preview.txt.text = 'Your gameID has been set to \'' + this._gameKey + '\'. This message will be hidden when the game is run.'; } else { GamesChart.setup(this._gameKey); this._preview._visible = false; } } return this.__get__gameKey(); }; v2.__get__gameKey = function () { return this._gameKey; }; v2._gameKey = ''; v2.addProperty('gameKey', v2.__get__gameKey, v2.__set__gameKey); ASSetPropFlags(_global.GCComponent.prototype, null, 1); } #endinitclip } movieClip 222 __Packages.gc.utils.GCDelegate { #initclip if (!_global.gc) { _global.gc = new Object(); } if (!_global.gc.utils) { _global.gc.utils = new Object(); } if (!_global.gc.utils.GCDelegate) { var v1 = function () {}; gc.utils.GCDelegate = v1; var v2 = v1.prototype; v1.create = function (target, handler) { var v2 = function () { var v2 = arguments.callee; var v3 = arguments.concat(v2.initArgs); return v2.handler.apply(v2.target, v3); }; v2.target = target; v2.handler = handler; v2.initArgs = arguments.slice(2); return v2; }; ASSetPropFlags(gc.utils.GCDelegate.prototype, null, 1); } #endinitclip } movieClip 224 __Packages.GCNotificationTypes { #initclip if (!_global.GCNotificationTypes) { var v1 = function () {}; _global.GCNotificationTypes = v1; var v2 = v1.prototype; v1.BEGIN_LOAD = 'BEGIN_LOAD'; v1.STARTUP = 'STARTUP'; v1.LOAD_SKIN_AND_STYLE = 'LOAD_SKIN_AND_STYLE'; v1.SKIN_AND_STYLE_LOADED = 'SKIN_AND_STYLE_LOADED'; v1.SHOW_TAB = 'SHOW_TAB'; v1.HIDE_TAB = 'HIDE_TAB'; v1.SHOW_CHART_LISTS = 'SHOW_CHART_LISTS'; v1.LAUNCH_GAME = 'LAUNCH_GAME'; v1.DISPATCH_DEVELOPER_API_EVENT = 'DISPATCH_DEVELOPER_API_EVENT'; ASSetPropFlags(_global.GCNotificationTypes.prototype, null, 1); } #endinitclip } frame 2 { function sitelock(urls_allowed) { domain_parts = _url.split('://'); real_domain = domain_parts[1].split('/'); domain.text = real_domain[0]; for (x in urls_allowed) { if (urls_allowed[x] == real_domain[0]) { lock = false; } } if (lock) { _root._visible = false; } } stop(); var rightClick = new ContextMenu(); rightClick.hideBuiltInItems(); _root.menu = rightClick; lock = false; urls_allowed = ['www.tremorgames.com']; sitelock(urls_allowed); } frame 3 { } movieClip 292 S_SND_ALL { frame 1 { this.stop(); } } movieClip 296 S_GRASS_BBOX { } movieClip 300 S_SKY_GREY { } movieClip 302 S_SKY_NIGHT { } movieClip 304 S_SKY_SUNRISE { } movieClip 306 S_SKY_SUNSET { } movieClip 333 S_WIND_RIBBON { frame 81 { gotoAndPlay('F_begin'); } } movieClip 336 S_MOUSE_CROSSHAIR { } movieClip 349 S_PLANE_ALBATROS_3_LEFT { frame 1 { stop(); } frame 16 { gotoAndStop('F_begin'); } } movieClip 362 S_PLANE_CAMEL_LEFT { frame 1 { stop(); } frame 16 { gotoAndStop('F_begin'); } } movieClip 363 S_PLANE_CAMEL_LEFT_BBOX { } movieClip 364 S_PLANE_GROUP_FLAG { } movieClip 377 S_PLANE_PFALZ_LEFT { frame 1 { stop(); } frame 16 { gotoAndStop('F_begin'); } } movieClip 390 S_PLANE_SPAD_13_LEFT { frame 1 { stop(); } frame 16 { gotoAndStop('F_begin'); } } movieClip 392 S_PLANE_WRECK { frame 2 { stop(); } } movieClip 394 S_SCORE_BKG { } movieClip 397 S_BULLET { } movieClip 401 S_BULLET_GROUND_RICOCHET { } movieClip 402 S_BULLET_GROUND_RICOS { frame 22 { this._visible = false; stop(); } } movieClip 405 S_BULLET_PLANE_RICOCHET { frame 6 { stop(); } } movieClip 406 S_BULLET_PLANE_RICOS { frame 1 { stop(); } frame 14 { this._visible = false; stop(); } } movieClip 409 S_CROSSHAIR { } movieClip 412 S_PARACHUTE_PILOT { } movieClip 413 S_EMERGENCY_PARACHUTE { frame 1 { stop(); } frame 66 { gotoAndPlay('F_begin'); } } movieClip 421 S_EMP_FLASH { frame 1 { stop(); } frame 12 { stop(); } } movieClip 423 S_EMP_FLASH_BBOX { frame 1 { stop(); } frame 3 { stop(); } } movieClip 426 S_HOMING_MISSILE { } movieClip 429 S_IMPACT_BOMB { } movieClip 430 S_IMPACT_BOMB_EXPLOSION_BBOX { frame 1 { stop(); } frame 3 { stop(); } } movieClip 434 S_WEB_WEIGHT { } movieClip 437 S_MALICIOUS_PARACHUTE { frame 1 { stop(); } frame 16 { stop(); } } movieClip 438 S_MALICIOUS_PARACHUTE_BBOX { } movieClip 441 S_NUKE { } movieClip 442 S_NUKE_EXPLOSION_BBOX { frame 1 { stop(); } frame 3 { stop(); } } movieClip 447 S_NUKE_SCREEN_FLASH { frame 1 { stop(); } frame 122 { stop(); } } movieClip 451 S_SONIC_WAVE_FLASH { frame 1 { stop(); } frame 10 { stop(); } } movieClip 453 S_SONIC_WAVE_FLASH_BBOX { frame 1 { stop(); } frame 3 { stop(); } } movieClip 456 S_TWIN_BULLET { } movieClip 458 S_BONUS_CRATE_BAD { } movieClip 460 S_BONUS_CRATE_GOOD { } movieClip 464 S_BREAKDOWN_ARROW { } movieClip 465 S_BREAKDOWN_ARROW_ANIM { frame 1 { stop(); } frame 2 { play(); } frame 24 { gotoAndPlay('F_begin'); } } movieClip 470 S_DEFLECTOR_BUBBLE { frame 1 { stop(); } frame 23 { stop(); } frame 35 { stop(); } } movieClip 473 S_FRENCH_KEY { frame 1 { stop(); } frame 37 { stop(); } } movieClip 475 S_TARGET_HAIR { } movieClip 477 S_TARGET_SQUARE { } movieClip 478 S_AIRSHIP_BBOX_1 { } movieClip 479 S_AIRSHIP_BBOX_2 { } movieClip 480 S_AIRSHIP_BBOX_3 { } movieClip 481 S_AIRSHIP_BBOX_4 { } movieClip 482 S_AIRSHIP_GROUP_FLAG { } movieClip 484 S_AIRSHIP_PLANE_HOLDER { } movieClip 488 S_BALOON { } movieClip 492 S_BALOON_2 { frame 1 { stop(); } frame 50 { stop(); } } movieClip 495 S_BALOON_BASKET { } movieClip 496 S_BALOON_BBOX_1 { } movieClip 497 S_BALOON_GROUP_FLAG { } movieClip 506 S_BIRD { } movieClip 508 S_BIRD_FORMATION { } movieClip 509 S_BIRD_FORMATION_BBOX { } movieClip 510 S_GROUND_FOG { } movieClip 511 S_RING_BBOX { } movieClip 514 S_RING_BKG { } movieClip 517 S_RING_FGD { } movieClip 521 S_STORM_CLOUD { frame 1 { stop(); } frame 5 { gotoAndStop('F_start'); } } movieClip 522 S_STORM_CLOUD_BBOX { } movieClip 524 S_STORM_CLOUD_FLASH { frame 1 { stop(); } frame 4 { gotoAndStop(1); } } movieClip 525 S_STORM_CLOUD_FLASH_BBOX { frame 1 { stop(); } frame 4 { gotoAndStop(1); } } movieClip 530 S_TARGET { frame 1 { stop(); } frame 2 { stop(); } } movieClip 531 S_TARGET_BBOX { } movieClip 552 S_TORNADO_CHUNK { } movieClip 553 S_TORNADO_MOVING_CHUNK { } movieClip 556 S_TORNADO_DUST_CLOUD { frame 1 { gotoAndPlay(15 * Math.round(Math.random())); } } movieClip 557 S_TORNADO_DUST { frame 40 { gotoAndPlay('F_begin'); } } movieClip 558 S_TORNADO_MOVING_CHUNK_BIG { } movieClip 559 S_TORNADO { frame 76 { gotoAndPlay('F_begin'); } } movieClip 560 S_TORNADO_BBOX { } movieClip 561 S_TORNADO_DUST_MOVE_SIDE { } movieClip 562 S_TORNADO_DUST_MOVE_SKEW { } movieClip 563 S_TORNADO_DUST_MOVE_UP { } // unknown tag 88 length 153 movieClip 569 S_FIRE_SECONDARY_B_KEY { } movieClip 572 S_SPACE_KEY { } movieClip 577 { } movieClip 583 { } movieClip 587 S_KEY_BLINK { } movieClip 592 S_ARROWS_CONTROL_TYPE { frame 1 { plane.grpFlag._visible = false; } } movieClip 593 S_INFO_CONTROLS_ARROWS { frame 1 { s1.gotoAndPlay(1); s2.gotoAndPlay(1); s3.gotoAndPlay(1); stop(); } } movieClip 598 S_MOUSE_CLICK { } movieClip 600 S_MOUSE_CONTROL_TYPE { frame 1 { plane.grpFlag._visible = false; } } movieClip 601 S_INFO_CONTROLS_MOUSE { frame 1 { s1.gotoAndPlay(1); s2.gotoAndPlay(1); s3.gotoAndPlay(1); stop(); } } movieClip 603 S_INFO_FLY_HERE_LEFT { frame 1 { stop(); } } movieClip 605 S_INFO_FLY_HERE_RIGHT { frame 1 { stop(); } } // unknown tag 88 length 148 movieClip 609 S_INFO_TABLE { frame 1 { stop(); } frame 2 { stop(); } } movieClip 614 S_PLANE_POINTER_ARROW { } movieClip 615 S_INFO_TUT_TASK_RINGS { frame 1 { p1.airscrew.stop(); stop(); } } movieClip 620 S_SPACE_KEY_BLINK { } movieClip 621 S_INFO_TUT_TASK_TARGETS_ARROWS { frame 1 { p1.airscrew.stop(); p2.airscrew.stop(); p3.stop(); stop(); } } movieClip 622 S_INFO_TUT_TASK_TARGETS_MOUSE { frame 1 { p1.airscrew.stop(); p2.airscrew.stop(); p3.stop(); stop(); } } movieClip 625 S_AFTERBURNER_TRAIL_ELEM { frame 1 { stop(); } frame 2 { var x; x = 3 + Math.round(5 * Math.random()); gotoAndPlay(x); } frame 24 { _visible = false; onEnterFrame = undefined; } frame 25 { stop(); } } movieClip 631 S_EMP_SHOCK { frame 3 { gotoAndPlay(1 + Math.round(20 * Math.random())); } frame 21 { gotoAndPlay('F_loop'); } } movieClip 635 S_EXPLOSION_ELEMENT_01_FAST { frame 1 { } frame 19 { _visible = false; onEnterFrame = undefined; } frame 20 { stop(); } } movieClip 638 S_EXPLOSION_ELEMENT_01_SLOW { frame 1 { } frame 45 { _visible = false; onEnterFrame = undefined; } frame 46 { stop(); } } movieClip 641 S_EXPLOSION_ELEMENT_02_FAST { frame 1 { } frame 30 { _visible = false; onEnterFrame = undefined; } frame 31 { stop(); } } movieClip 643 S_EXPLOSION_ELEMENT_02_SLOW { frame 1 { } frame 74 { _visible = false; onEnterFrame = undefined; } frame 75 { stop(); } } movieClip 648 S_MALIC_PARACHUTED { frame 1 { stop(); } frame 14 { gotoAndPlay('F_loop'); } } movieClip 650 S_NIGHT_REFLECTOR { } movieClip 652 S_PLANE_ROLL_FORCE_CLOCK { } movieClip 655 S_PLANE_SHADOW { } movieClip 664 S_SCREW_CUTTER { frame 1 { stop(); } frame 10 { gotoAndPlay('F_begin'); } } movieClip 666 S_SMOKE_ELEMENT_FAST { frame 1 { } frame 14 { _visible = false; onEnterFrame = undefined; } frame 15 { stop(); } } movieClip 668 S_SMOKE_ELEMENT_SLOW { frame 1 { } frame 29 { _visible = false; onEnterFrame = undefined; } frame 30 { stop(); } } movieClip 669 S_BONUS_CRATE_BBOX { } movieClip 670 S_BONUS_PARACHUTE_BBOX { } movieClip 671 S_DUMMY { } movieClip 673 S_ENGINE_CLOUD { frame 25 { stop(); } } movieClip 679 S_EXPLOSION_CENTER { frame 114 { stop(); } } movieClip 684 S_EXPLOSION_ELEMENT { frame 1 { stop(); } frame 114 { gotoAndStop('F_first'); } } movieClip 687 S_KEYS_AI { } movieClip 694 S_KEYS_BLANK { } movieClip 704 { } movieClip 705 S_KEYS_J_I_L { } movieClip 706 S_KEYS_LEFT_UP_RIGHT { } movieClip 711 S_KEYS_NUMPAD_4_8_6 { } movieClip 715 S_KEYS_OFF { } movieClip 718 S_AUTO_REPAIR_PACK { } movieClip 721 S_ITEM_ACOUNSTIC_RIFLE { } movieClip 724 S_ITEM_ADVANCED_WEAPON_RACK { } movieClip 727 S_ITEM_BONUS_XRAY { } movieClip 730 S_ITEM_BURST_GUN { } movieClip 732 S_ITEM_DEVICE_SEC_WEAPON { } movieClip 735 S_ITEM_EMERGENCY_PARACHUTE { } movieClip 738 S_ITEM_EMP_DISRUPTOR { } movieClip 741 S_ITEM_EXTRA_CARGO_STORAGE { } movieClip 744 S_ITEM_GAUSS_ACCELERATOR { } movieClip 747 S_ITEM_GUIDANCE_SYSTEM { } movieClip 750 S_ITEM_HOMING_MISSILES { } movieClip 753 S_ITEM_IMPACT_BOMBS { } movieClip 756 S_ITEM_MACHINE_GUN { } movieClip 759 S_ITEM_MAGNETIC_DEFLECTOR { } movieClip 762 S_ITEM_MALIC_PARACHUTE { } movieClip 765 S_ITEM_NUKE { } movieClip 768 S_ITEM_PROXIMITY_DETECTOR { } movieClip 771 S_ITEM_TAIL_GUN { } movieClip 774 S_ITEM_TARGETTING_SYSTEM { } movieClip 777 S_ITEM_TWIN_MACHINE_GUN { } movieClip 782 S_WPN_COOLDOWN_SEMAPHORE { frame 1 { stop(); } frame 2 { stop(); } frame 3 { stop(); } frame 4 { stop(); } } movieClip 786 S_WPN_MOUNT_SEMAPHORE { frame 1 { stop(); } frame 2 { stop(); } } movieClip 788 S_MEDAL_01 { } movieClip 790 S_MEDAL_01_SILHOUETTE { } movieClip 792 S_MEDAL_02 { } movieClip 794 S_MEDAL_02_SILHOUETTE { } movieClip 796 S_MEDAL_03 { } movieClip 798 S_MEDAL_03_SILHOUETTE { } movieClip 800 S_MEDAL_04 { } movieClip 802 S_MEDAL_04_SILHOUETTE { } movieClip 804 S_MEDAL_05 { } movieClip 806 S_MEDAL_05_SILHOUETTE { } movieClip 808 S_MEDAL_06 { } movieClip 810 S_MEDAL_06_SILHOUETTE { } movieClip 812 S_MEDAL_07 { } movieClip 814 S_MEDAL_07_SILHOUETTE { } movieClip 816 S_MEDAL_08 { } movieClip 818 S_MEDAL_08_SILHOUETTE { } movieClip 820 S_MEDAL_09 { } movieClip 822 S_MEDAL_09_SILHOUETTE { } movieClip 824 S_MEDAL_10 { } movieClip 826 S_MEDAL_10_SILHOUETTE { } movieClip 827 { } movieClip 828 { } movieClip 830 S_MISSION_BKG { } movieClip 838 S_AIRSHIP { frame 1 { } frame 4 { gotoAndPlay('F_begin'); } } movieClip 839 S_MISSION_AIRSHIP { } movieClip 840 S_MISSION_BALOON { frame 1 { this.onLoad = function () { s1.onText = ''; }; } } movieClip 841 S_MISSION_BONUS { } movieClip 843 S_MISSION_LIGHTBALL { } movieClip 844 S_MISSION_OBJECTIVE { } movieClip 846 S_MISSION_PLANE_TARGET { } movieClip 847 S_MISSION_RINGS { } movieClip 848 S_MISSION_TARGETS { } movieClip 850 S_MISSION_WEATHER { } movieClip 852 S_WEATHER_MASK { } movieClip 853 S_PILOT_1 { } movieClip 854 S_PILOT_PICTURE_MASK { } movieClip 857 S_PILOT_BRUMOWSKI { } movieClip 860 S_PILOT_FONCK { } movieClip 863 S_PILOT_MACLAREN { } movieClip 866 S_PILOT_RICKENBACKER { } movieClip 869 S_PILOT_RICHTHOFFEN { } movieClip 872 S_PILOT_SCARONI { } movieClip 875 S_PILOT_UDET { } movieClip 879 S_PLANE_ALBATROS_3_LEFT_STATIC { frame 1 { airscrew.stop(); } } movieClip 880 S_PLANE_ALBATROS { } movieClip 883 S_STAR_EMPTY { } movieClip 884 S_PLANE_ATTR_SHOW { } movieClip 885 S_PLANE_CAMEL { } movieClip 887 S_PLANE_FOKKER_LEFT_STATIC { frame 1 { airscrew.stop(); } } movieClip 888 S_PLANE_FOKKER { } movieClip 890 S_PLANE_HENRIOT_LEFT_STATIC { frame 1 { airscrew.stop(); } } movieClip 891 S_PLANE_HANRIOT { } movieClip 894 S_PLANE_LOCKED { } movieClip 896 S_PLANE_PFALZ_LEFT_STATIC { frame 1 { airscrew.stop(); } } movieClip 897 S_PLANE_PFALZ { } movieClip 899 S_PLANE_SPAD_7_LEFT_STATIC { frame 1 { airscrew.stop(); } } movieClip 900 S_PLANE_SPAD_7 { } movieClip 902 S_PLANE_SPAD_13_LEFT_STATIC { frame 1 { airscrew.stop(); } } movieClip 903 S_PLANE_SPAD_13 { } movieClip 905 S_BROAD_RANK_LINE { } movieClip 907 S_NARROW_RANK_LINE { } movieClip 909 S_RANK_BKG { } movieClip 910 S_RANK_00 { } movieClip 911 S_RANK_01 { } movieClip 912 S_RANK_02 { } movieClip 913 S_RANK_03 { } movieClip 914 S_RANK_04 { } movieClip 915 S_RANK_05 { } movieClip 917 S_VERY_BROAD_RANK_LINE { } movieClip 918 S_RANK_06 { } movieClip 919 S_RANK_07 { } movieClip 920 S_RANK_08 { } movieClip 921 S_RANK_09 { } movieClip 922 S_RANK_10 { } movieClip 927 { } movieClip 930 S_DOGFIGHT_ACES_TITLE { } movieClip 932 S_MENUBUTTON_BKG { frame 1 { var minVelocity = 1.3; var velocityDisperse = 4; var travelFrames = 24; var currentFrame = 1; var velocity = minVelocity + velocityDisperse * Math.random(); var distance = velocity * travelFrames; var currentFrame = 1; var alphaStep = 90 / travelFrames; var __currentLabel = 'F_INIT'; enabled = false; _x = _x - distance; _alpha = 0; } frame 2 { __currentLabel = 'F_FADEIN'; enabled = false; if (currentFrame <= travelFrames) { _x = _x + velocity; _alpha = _alpha + alphaStep; ++currentFrame; } else { gotoAndPlay('F_static'); } } frame 3 { gotoAndPlay('F_fadein'); } frame 4 { __currentLabel = 'F_STATIC'; currentFrame = 1; enabled = true; stop(); } frame 5 { __currentLabel = 'F_FADEOUT'; enabled = false; if (currentFrame <= travelFrames) { _x = _x + velocity; _alpha = _alpha - alphaStep; ++currentFrame; } else { gotoAndPlay('F_end'); } } frame 6 { gotoAndPlay('F_fadeout'); } frame 7 { __currentLabel = 'F_END'; _x = _x - distance; _alpha = 0; enabled = false; stop(); } } movieClip 936 S_MUSIC_TOGGLE { frame 1 { stop(); } frame 2 { stop(); } } movieClip 939 S_SHOP_EMPTY_SLOT { } movieClip 941 S_SHOP_SLOT_SELECTION { } movieClip 944 S_SOUNDFX_TOGGLE { frame 1 { stop(); } frame 2 { stop(); } } movieClip 946 S_STAR_FULL { } // unknown tag 88 length 67 movieClip 950 S_WAG_LOGO { } movieClip 953 S_CTRL_KEY { } movieClip 958 { frame 114 { stop(); } } movieClip 959 S_MASK_100_100 { } movieClip 960 S_MASK_200_100 { } // unknown tag 88 length 212 movieClip 965 { } movieClip 968 { } movieClip 969 S_SCREEN_EDGE { } movieClip 970 S_TUT_KEYS_DRUNKEN_PILOT { } movieClip 971 S_TUT_KEYS_FIRE { } movieClip 972 S_TUT_KEYS_FIRE_SECONDARY { } movieClip 973 S_TUT_KEYS_FIRE_SECONDARY_B_KEY { } movieClip 974 S_TUT_KEYS_FIRE_SPACE { } movieClip 975 S_TUT_R_KEYS_TAKE_OFF { } movieClip 976 S_TUT_MASK { } movieClip 977 S_TUT_R_PLANE_FIRE { } movieClip 981 S_TUT_R_PLANE_RESTART { frame 1 { barr.gotoAndPlay('F_BEGIN'); } frame 1 { p1.airscrew.stop(); } frame 70 { p1.airscrew.gotoAndPlay('F_BEGIN'); } } movieClip 982 S_TUT_R_PLANE_SPEEDUP { } movieClip 984 S_TUT_R_PLANE_STALL { frame 1 { p1.airscrew.gotoAndPlay('F_BEGIN'); } frame 36 { p1.airscrew.stop(); } } movieClip 985 S_TUT_SPACE_TAKE_OFF { } movieClip 986 S_SPONSOR_LOGO { } movieClip 989 S_WAG_LOGO_MASK { } movieClip 992 { } movieClip 994 { } movieClip 997 { } movieClip 998 { frame 36 { } frame 155 { this._parent.nextFrame(); } } movieClip 1000 { } movieClip 1002 { } movieClip 1005 { } movieClip 1006 { } movieClip 1008 { } movieClip 1009 { } movieClip 1011 { } movieClip 1012 { } movieClip 1014 { } movieClip 1015 { } movieClip 1033 { } movieClip 1034 { } movieClip 1035 { } movieClip 1036 { } movieClip 1037 { } movieClip 1038 { } movieClip 1039 { frame 20 { stop(); } } movieClip 1040 { } movieClip 1103 { } movieClip 1104 { } movieClip 1165 { } movieClip 1226 { } movieClip 1287 { } movieClip 1288 { frame 12 { stop(); } } movieClip 1289 { } movieClip 1290 { } movieClip 1291 { } movieClip 1292 { } movieClip 1293 { } movieClip 1295 { } movieClip 1296 { } movieClip 1297 { } movieClip 1299 { } movieClip 1301 { } movieClip 1304 { } movieClip 1306 { } movieClip 1309 { } movieClip 1310 { frame 76 { stop(); } } movieClip 1313 { } movieClip 1316 { } movieClip 1319 { } movieClip 1322 { } movieClip 1325 { } movieClip 1328 { } movieClip 1332 { } movieClip 1334 { frame 8 { stop(); } } movieClip 1337 { } movieClip 1340 { } movieClip 1343 { } movieClip 1346 { } movieClip 1349 { } movieClip 1352 { frame 7 { stop(); } } movieClip 1353 { frame 1 { this.waitFrameCount = 130; this.setFrameAfterFinish = 3; buttonOver.onPress = function () { getURL(com.tremorgames.TremorGames.GetTrackingURL('Game Logo Splash Screen'), '_blank'); }; } frame 58 { stop(); var waitTime = 25; if (this.waitFrameCount != undefined) { waitTime = this.waitFrameCount; } this.onEnterFrame = function () { --waitTime; if (waitTime <= 0) { this.onEnterFrame = undefined; this._parent.nextFrame(); } }; } } movieClip 1354 S_SPLASH { frame 2 { stop(); } frame 3 { stop(); } frame 4 { stop(); } } movieClip 1355 S_BACKGROUND { } movieClip 1356 S_DOLOMITES { } movieClip 1358 S_DOLOMITES_GRASS { } movieClip 1359 S_GRASS { } movieClip 1360 S_HANGAR { } movieClip 1364 S_TUT_GOOD_BONUS_GUN_BERSERK { } movieClip 1365 S_INFO_BONUS_GUN_BERSERK { frame 1 { stop(); } } movieClip 1369 S_TUT_GOOD_BONUS_SCREWCUTTER { frame 1 { p1.gotoAndPlay('F_BEGIN'); } frame 66 { aaa.gotoAndPlay('F_BEGIN'); } frame 66 { p1.gotoAndPlay('F_SCREWCUTTER'); } } movieClip 1370 S_INFO_BONUS_SCREWCUTTER { frame 1 { stop(); } } movieClip 1376 S_INFO_TEAM_GROUPING { frame 1 { a1.gotoAndStop('F_BEGIN'); a2.gotoAndStop('F_BEGIN'); stop(); } } movieClip 1378 S_TUT_BAD_BONUS_DRUNKEN_PILOT { } movieClip 1382 S_TUT_BAD_BONUS_ENGINE_FAILURE { } movieClip 1384 S_TUT_GOOD_BONUS_GUN_JAM { } movieClip 1385 S_TUT_BONUS_PARACHUTE { } movieClip 1387 S_KEYS_MOUSE { } movieClip 1389 S_SHOP_MINUS_BTN { } movieClip 1391 S_SHOP_PLUS_BTN { } movieClip 1392 S_WIND_RIBBON_SEM { } movieClip 1400 S_INFO_WINDSOCK { frame 1 { stop(); sock.gotoAndStop(15); semgreen.gotoAndStop('F_GREEN'); semorange.gotoAndStop('F_ORANGE'); semred.gotoAndStop('F_RED'); } } movieClip 1402 S_MISSION_WEATHER_NIGHT { } movieClip 1404 S_MISSION_GREY_BKG { } movieClip 1405 S_MISSION_WEATHER_STORMY { } movieClip 1406 S_MISSION_WEATHER_SUNNY { } movieClip 1408 S_BLANK_RECT_2 { } movieClip 1410 S_MOCHI_COIN_BTN { } movieClip 1418 S_TUTORIAL_HELP { } movieClip 1422 S_TARGET_EDGE { } movieClip 1424 S_SHOP_ACTION_BTN { } movieClip 1425 S_VOID_STORY_PIC { } // unknown tag 88 length 105 movieClip 1428 S_STORY_TXT { } movieClip 1431 S_STORY_PIC_11 { } movieClip 1434 S_STORY_PIC_10 { } movieClip 1437 S_STORY_PIC_09 { } movieClip 1440 S_STORY_PIC_08 { } movieClip 1443 S_STORY_PIC_07 { } movieClip 1446 S_STORY_PIC_06 { } movieClip 1449 S_STORY_PIC_05 { } movieClip 1452 S_STORY_PIC_04 { } movieClip 1455 S_STORY_PIC_03 { } movieClip 1458 S_STORY_PIC_02 { } movieClip 1461 S_STORY_PIC_01 { } movieClip 1462 S_STORY_PIC { } movieClip 1465 S_HINT_BUBBLE_MOCHI { } movieClip 1468 S_HINT_BUBBLE_CONTROLS { } movieClip 1469 { } movieClip 1471 { } movieClip 1472 { } movieClip 1474 { } movieClip 1476 { } movieClip 1477 { } // unknown tag 88 length 209 movieClip 1480 { frame 1 { tremorLogo.onPress = function () { getURL(com.tremorgames.TremorGames.GetTrackingURL('Outro Tremor Logo'), '_blank'); }; } } movieClip 1483 { } movieClip 1486 { } movieClip 1487 S_FOKKER_OUTRO { frame 1 { stop(); } frame 2 { function DegToRad(degree) { return Math.PI * degree / 180; } function Move() { planeOldX = plane._x; anglex += 3 * Math.random(); plane._x = C_OX + C_XMAX * Math.sin(DegToRad(anglex)) * plane._xscale / 100; angley += 2 * Math.random(); plane._y = C_OY + C_YMAX * Math.cos(DegToRad(angley)) * plane._xscale / 100; if (frm % C_AVG_DIF_FRM == 0) { difavg = difac / C_AVG_DIF_FRM; difac = 0; } difac += plane._x - planeOldX; plane._rotation -= difac / 10; if (plane._xscale > 1) { plane._xscale -= 0.025; plane._yscale -= 0.025; } if (plane._xscale < 70 && airship._xscale < C_AIRSHIP_MAX_SCALE) { airship._xscale += 0.025; airship._yscale = airship._xscale; } if (land._xscale < 400) { land._xscale += 0.08; if (land._y < 720) { land._y += 0.08; } } if (isTitlesScrolling) { if (txt._y + txt._height > 0) { txt._y -= C_TEXT_SCROLL_SPEED; } else { isTitlesScrolling = false; isTheEndFadingIn = true; } } if (isGameOverFadingIn) { gameovertxt._alpha += C_TEXT_FADE_STEP; if (gameovertxt._alpha >= 100) { gameovertxt._alpha = 100; isGameOverFadingIn = false; } } if (isGameOverFadingOut) { gameovertxt._alpha -= C_TEXT_FADE_STEP; if (gameovertxt._alpha <= 0) { gameovertxt._alpha = 0; isGameOverFadingOut = false; } } if (isTheEndFadingIn) { theendtxt._alpha += C_TEXT_FADE_STEP; if (theendtxt._alpha >= 100) { theendtxt._alpha = 100; isTheEndFadingIn = false; } } ++frm; } function gameOverFadeIn() { isGameOverFadingIn = true; clearInterval(gameOverInterval); gameOverInterval = setInterval(gameOverStay, C_GAME_OVER_STAY_TIME); } function gameOverStay() { isGameOverFadingOut = true; clearInterval(gameOverInterval); } function beginTextScroll() { isTitlesScrolling = true; clearInterval(beginScrollInterval); } tremorLogo.onPress = function () { getURL(com.tremorgames.TremorGames.GetTrackingURL('Outro Tremor Logo'), '_blank'); }; var anglex = 0; var angley = 0; var C_OX; var C_OY; C_OX = 250; C_OY = 200; var C_XMAX = 40; var C_YMAX = 30; var planeOldX; var difavg = 0; var difac = 0; var frm = 0; var C_AVG_DIF_FRM = 5; var C_GAME_OVER_WAIT_TO_FADEIN = 2000; var C_GAME_OVER_STAY_TIME = 12000 - C_GAME_OVER_WAIT_TO_FADEIN; var isGameOverFadingIn = false; var isGameOverFadingOut = false; var C_TITLES_BEGIN_SCROLL_TIME = 13000; var isTitlesScrolling = false; var C_TEXT_FADE_STEP = 1; var gameOverInterval; gameOverInterval = setInterval(gameOverFadeIn, C_GAME_OVER_WAIT_TO_FADEIN); var beginScrollInterval; beginScrollInterval = setInterval(beginTextScroll, C_TITLES_BEGIN_SCROLL_TIME); gameovertxt._alpha = 0; theendtxt._alpha = 0; plane.onEnterFrame = Move; var isTheEndFadingIn = false; var C_TEXT_SCROLL_SPEED = 0.9; airship._xscale = 0; airship._yscale = 0; var C_AIRSHIP_MAX_SCALE = 70; } frame 2 { Stage.scaleMode = 'noScale'; var max = 5; var curidx = 0; var mc; mc = new Array(); var f; f = new Array(); i = 0; while (i < max) { mc.push(fwbkg.createEmptyMovieClip('mc' + fwbkg.getNextHighestDepth(), fwbkg.getNextHighestDepth())); f.push(new entities.effects.FireWork(mc[i], new flash.geom.Point(0.7 * Stage.width, Stage.height), new flash.geom.Point(Math.random() * Stage.width, 0.5 * Stage.height * Math.random()), 4278255360.0, 100, false)); ++i; } this.onEnterFrame = function () { var v1; v1 = 0; while (v1 < max) { f[v1].Update(); ++v1; } if (Math.random() < 0.05) { ++curidx; curidx %= max; f[curidx].Fire(0.5 * Stage.width + 0.5 * Stage.width * Math.random(), (Stage.height / 2) * Math.random()); } }; } frame 3 { stop(); } } movieClip 1489 { } movieClip 1490 { } movieClip 1492 { frame 1 { tremorLogo.onPress = function () { getURL(com.tremorgames.TremorGames.GetTrackingURL('Outro Tremor Logo'), '_blank'); }; } } movieClip 1493 S_OUTRO { frame 1 { stop(); } frame 2 { function DegToRad(degree) { return Math.PI * degree / 180; } function Move() { planeOldX = plane._x; anglex += 3 * Math.random(); plane._x = C_OX + C_XMAX * Math.sin(DegToRad(anglex)) * plane._xscale / 100; angley += 2 * Math.random(); plane._y = C_OY + C_YMAX * Math.cos(DegToRad(angley)) * plane._xscale / 100; if (frm % C_AVG_DIF_FRM == 0) { difavg = difac / C_AVG_DIF_FRM; difac = 0; } difac += plane._x - planeOldX; plane._rotation -= difac / 10; if (plane._xscale > 1) { plane._xscale -= 0.025; plane._yscale -= 0.025; } if (land._xscale < 400) { land._xscale += 0.08; if (land._y < 720) { land._y += 0.08; } } if (isTitlesScrolling) { if (txt._y + txt._height > 0) { txt._y -= C_TEXT_SCROLL_SPEED; } else { isTitlesScrolling = false; isTheEndFadingIn = true; } } if (isGameOverFadingIn) { gameovertxt._alpha += C_TEXT_FADE_STEP; if (gameovertxt._alpha >= 100) { gameovertxt._alpha = 100; isGameOverFadingIn = false; } } if (isGameOverFadingOut) { gameovertxt._alpha -= C_TEXT_FADE_STEP; if (gameovertxt._alpha <= 0) { gameovertxt._alpha = 0; isGameOverFadingOut = false; } } if (isTheEndFadingIn) { theendtxt._alpha += C_TEXT_FADE_STEP; if (theendtxt._alpha >= 100) { theendtxt._alpha = 100; isTheEndFadingIn = false; } } ++frm; } function gameOverFadeIn() { isGameOverFadingIn = true; clearInterval(gameOverInterval); gameOverInterval = setInterval(gameOverStay, C_GAME_OVER_STAY_TIME); } function gameOverStay() { isGameOverFadingOut = true; clearInterval(gameOverInterval); } function beginTextScroll() { isTitlesScrolling = true; clearInterval(beginScrollInterval); } tremorLogo.onPress = function () { getURL(com.tremorgames.TremorGames.GetTrackingURL('Outro Tremor Logo'), '_blank'); }; stop(); var anglex = 0; var angley = 0; var C_OX; var C_OY; C_OX = 250; C_OY = 200; var C_XMAX = 40; var C_YMAX = 30; var planeOldX; var difavg = 0; var difac = 0; var frm = 0; var C_AVG_DIF_FRM = 5; var C_GAME_OVER_WAIT_TO_FADEIN = 2000; var C_GAME_OVER_STAY_TIME = 12000 - C_GAME_OVER_WAIT_TO_FADEIN; var isGameOverFadingIn = false; var isGameOverFadingOut = false; var C_TITLES_BEGIN_SCROLL_TIME = 13000; var isTitlesScrolling = false; var C_TEXT_FADE_STEP = 1; var gameOverInterval; gameOverInterval = setInterval(gameOverFadeIn, C_GAME_OVER_WAIT_TO_FADEIN); var beginScrollInterval; beginScrollInterval = setInterval(beginTextScroll, C_TITLES_BEGIN_SCROLL_TIME); gameovertxt._alpha = 0; theendtxt._alpha = 0; plane.onEnterFrame = Move; var isTheEndFadingIn = false; var C_TEXT_SCROLL_SPEED = 0.9; } frame 2 { Stage.scaleMode = 'noScale'; var max = 5; var curidx = 0; var mc; mc = new Array(); var f; f = new Array(); i = 0; while (i < max) { mc.push(fwbkg.createEmptyMovieClip('mc' + fwbkg.getNextHighestDepth(), fwbkg.getNextHighestDepth())); f.push(new entities.effects.FireWork(mc[i], new flash.geom.Point(0.7 * Stage.width, Stage.height), new flash.geom.Point(Math.random() * Stage.width, 0.5 * Stage.height * Math.random()), 4278255360.0, 100, false)); ++i; } this.onEnterFrame = function () { var v1; v1 = 0; while (v1 < max) { f[v1].Update(); ++v1; } if (Math.random() < 0.05) { ++curidx; curidx %= max; f[curidx].Fire(0.5 * Stage.width + 0.5 * Stage.width * Math.random(), (Stage.height / 2) * Math.random()); } }; } frame 3 { stop(); } } movieClip 1494 S_KEYS_MOUSE_MULTI { } movieClip 1495 S_KEYS_A_W_D { } movieClip 1497 S_HDLG_BKG { } movieClip 1500 S_HGLD_STALL { } movieClip 1503 S_HGLD_TUTORIAL_PLANE { } movieClip 1506 S_HGLD_TUTORIAL_LIVES { } movieClip 1511 S_MOUSE_CONTROL_TYPE_STATIC { frame 1 { plane.grpFlag._visible = false; plane.stop(); } } movieClip 1513 S_HGLD_MOUSE_CONTROLS { } movieClip 1519 S_ARC_ARROW { } movieClip 1520 S_ARROWS_CONTROL_TYPE_M_STATIC { frame 1 { plane.grpFlag._visible = false; plane.stop(); } } movieClip 1522 S_HGLD_ARROW_CONTROLS_M { } movieClip 1525 S_HGLD_RECOVERY { } movieClip 1543 S_COOLDOWN_DESC { } movieClip 1544 S_HGLD_COOLDOWN { } movieClip 1553 S_HGLD_DAMAGE_AREAS { } movieClip 1559 S_HGLD_DAMAGE_INDICATORS { frame 1 { d1.gotoAndPlay('F_BLINK'); d2.gotoAndPlay('F_BLINK'); d3.gotoAndPlay('F_BLINK'); } } movieClip 1562 S_HGLD_BONUS_AFTERBURNER { } movieClip 1565 S_HGLD_BONUS_PARACHUTE { } movieClip 1567 S_HGLD_BONUS_GUN_BERSERK { } movieClip 1569 S_HGLD_BONUS_SCREWCUTTER { } movieClip 1572 S_HGLD_DIVE { } movieClip 1583 S_HGLD_WINDSOCK { frame 1 { stop(); sock.gotoAndStop(15); } } movieClip 1586 S_TUT_GOOD_BONUS_EXTRA_LIFE { } movieClip 1587 S_HGLD_BONUS_EXTRA_LIFE { } movieClip 1592 S_ARROWS_CONTROL_TYPE_F_STATIC { frame 1 { plane.grpFlag._visible = false; plane.stop(); } } movieClip 1593 S_HGLD_ARROW_CONTROLS_F { } movieClip 1595 S_ARROW_CONTROL_TYPE_MENU { } movieClip 1597 S_MOUSE_CONTROL_TYPE_MENU { } movieClip 1603 S_HGLD_SEC_WEAPON_ICON { } movieClip 1606 S_HGLD_SECONDARY_WEAPON_ARROWS { } movieClip 1609 S_HGLD_SECONDARY_WEAPON_MOUSE { } movieClip 1615 S_HGLD_TEAM_GROUPING { frame 1 { a1.gotoAndStop('F_BEGIN'); a2.gotoAndStop('F_BEGIN'); } } movieClip 1617 S_GUN_BERSERK_BULLET { } movieClip 1618 S_GUN_BERSERK_INDICATOR { frame 1 { stop(); } frame 25 { gotoAndPlay('F_begin'); } } movieClip 1621 S_HGLD_BONUS_BAD_WARNING { } movieClip 1624 S_HGLD_BONUS_CONTENT_DETECTION { } movieClip 1626 S_HGLD_BONUS_DRUNKEN_PILOT { } movieClip 1628 S_HGLD_BONUS_ENGINE_FAILURE { } movieClip 1630 S_HGLD_BONUS_GUN_JAM { } movieClip 1633 S_PLANE_POINTER_ARROW_ANIM { } movieClip 1635 S_GUN_JAM_BULLET { } movieClip 1636 S_GUN_JAM_INDICATOR { frame 1 { stop(); } frame 25 { gotoAndPlay('F_begin'); } } movieClip 1638 S_DRUNKEN_PILOT_GLASS { } movieClip 1639 S_DRUNKEN_PILOT_INDICATOR { frame 1 { stop(); } frame 25 { gotoAndPlay('F_begin'); } } movieClip 1642 S_SCORE_SUBM_DLG { } movieClip 1643 S_SCORE_SUBMISSION_NOTIFICATION { frame 62 { stop(); } } movieClip 1649 S_DLG_GUEST_SUBMIT_SCORE { } movieClip 1652 S_LOCK { } movieClip 1653 S_UNLOCK_DEFENCE_BTN { } movieClip 1655 S_SHOP_LOCKED_SLOT { } movieClip 1657 S_DEBUG_TF { } movieClip 1660 S_WEBAPI_DLG { } movieClip 1661 S_WEBAPI_NOTIFIFATION { frame 1 { txtclip._visible = false; } frame 2 { txtclip._visible = true; } frame 91 { stop(); txtclip._visible = false; } } movieClip 1664 S_LOAD_GAME_STATIC { } movieClip 1665 S_LOAD_GAME { } movieClip 1668 S_RESTART_LEVEL_BTN { } movieClip 1669 S_ALL { } frame 4 { _global.GameConf = new GameConfig(); _global.WorldConf = new config.levels.WorldConfig(_global.GameConf); _global.game = new Game(); } frame 5 { stop(); } frame 6 { stop(); } frame 7 { stop(); } frame 8 { stop(); } frame 9 { stop(); } frame 10 { stop(); } frame 11 { stop(); } frame 12 { stop(); } frame 13 { stop(); }




http://swfchan.com/42/208248/info.shtml
Created: 9/10 -2018 04:21:59 Last modified: 9/10 -2018 04:21:59 Server time: 03/05 -2024 00:19:11