1//游æçé¢ 2//æ¾ç¤ºå¯¹åºçé¡µé¢ 3 4var Interface_UI_Page = MyInterface("InitMenu", "InitButton", "GetWindow", "Dispose"); 5 6var UI_Page = MyClass({ Interface: Interface_UI_Page }, { 7 Init: function (ui) { 8 this._operate_ui = ui; 9 }, 10 Private: { 11 _operate_ui: null, 12 //çªä½å®¹å¨ï¼å便¨¡å¼ï¼ 13 _window: {}, 14 //æé® 15 _button_start: null, 16 _button_boss: null, 17 _button_setting: null, 18 _button_end: null, 19 20 21 //游æè®¾ç½®çªä½ã 22 //å¤ç¨åä¸ä¸ªçªä½ã 23 _InitSetting: function () { 24 var dlg = null, 25 self = this; 26 27 // //æå游æ 28 // this._operate_ui.Pause(); 29 30 if (this._window.setting) { 31 //æå 32 this._operate_ui.Pause(); 33 //éå®ä½å°è§çªä¸é´ 34 this._window.setting.ResizeTo(300, 200); 35 //æ¾ç¤º 36 this._window.setting.Show(); 37 return; 38 } 39 else { 40 dlg = new YYC.Window({ 41 title: "游æè®¾ç½®", 42 isShow: false, 43 isClear: false, 44 opacity: 0.4, 45 url: "View/GameSetting.html", 46 onLoad: MyGameEngine.Event.Bind(this._operate_ui, this._operate_ui.Pause), 47 onClose: MyGameEngine.Event.Bind(this._operate_ui, this._operate_ui.Continue), 48 id: "iframe_gameSetting" 49 }); 50 // dlg.SetTitle("ç¨æ·ä¿¡æ¯è®¾ç½®"); 51 // dlg.LoadUrl("Scripts/SelectMap.html"); //å è½½é¡µé¢æååï¼ä¼è§¦å页é¢çjs 52 dlg.ResizeTo(300, 200); 53 // dlg.AddToolBar({ menu: menu }); 54 55 this._window.setting = dlg; 56 } 57 }, 58 //éå¾çªä½ 59 //æ¯æ¬¡è°ç¨é½å建ä¸ä¸ªæ°ççªä½ï¼å 为è¦å·æ°çªä½ï¼å¦å·æ°èªå®ä¹å°å¾çï¼ã 60 _InitSelectMap: function () { 61 var dlg = null; 62 63 // //æªå¼å§æ¸¸ææ¶ï¼å¯ä»¥éå¾ 64 // if (LianLianKan.gameStatus === LianLianKan.Status.Stop || LianLianKan.gameStatus === LianLianKan.Status.None) { 65 // //æå游æ 66 // this._operate_ui.Pause(); 67 68 // if (this._window.selectMap) { 69 // // this._window.selectMap.Show(); 70 // // return; 71 72 //// this._window.selectMap.Dispose(); 73 // } 74 // else { 75 dlg = new YYC.Window({ 76 title: "éæ©å°å¾", 77 isShow: false, 78 isClear: true, 79 opacity: 0.4, 80 url: "View/SelectMap.html", 81 onLoad: MyGameEngine.Event.Bind(this._operate_ui, this._operate_ui.Pause), 82 // onUnLoad: MyGameEngine.Event.Bind(this, function () { 83 // this._window.selectMap.Dispose(); 84 // }), 85 onClose: MyGameEngine.Event.Bind(this._operate_ui, this._operate_ui.Continue), 86 87 id: "iframe_selectMap" 88 }); 89 // dlg.SetTitle("ç¨æ·ä¿¡æ¯è®¾ç½®"); 90 // dlg.LoadUrl("Scripts/SelectMap.html"); //å è½½é¡µé¢æååï¼ä¼è§¦å页é¢çjs 91 dlg.ResizeTo(650, 400); 92 // dlg.AddToolBar({ menu: menu }); 93 94 this._window.selectMap = dlg; 95 // } 96 // } 97 }, 98 //èªå®ä¹å°å¾çªä½ã 99 //æ¯æ¬¡è°ç¨é½å建ä¸ä¸ªæ°ççªä½ï¼å 为è¦å·æ°çªä½ï¼å¦å·æ°èªå®ä¹å°å¾çï¼ã 100 _InitMapEditor: function () { 101 var dlg = null; 102 103 // //æå游æ 104 // this._operate_ui.Pause(); 105 106 // if (this._window.mapEditor) { 107 // // this._window.mapEditor.Show(); 108 // // return; 109 110 // this._window.mapEditor.Dispose(); //鿝ä¹åççªä½ï¼å建æ°ççªä½ 111 // } 112 113 dlg = new YYC.Window({
114 title: "èªå®ä¹å°å¾", 115 isShow: false, 116 isClear: true, 117 opacity: 0.4, 118 url: "View/MapEditor.html", 119 onLoad: MyGameEngine.Event.Bind(this._operate_ui, this._operate_ui.Pause), 120 onClose: MyGameEngine.Event.Bind(this._operate_ui, this._operate_ui.Continue), 121 id: "iframe_mapEditor" 122 }); 123 dlg.ResizeTo(800, 500); 124 125 this._window.mapEditor = dlg; 126 }, 127 //ææBossçªä½ã 128 //æ¯æ¬¡è°ç¨é½å建ä¸ä¸ªæ°ççªä½ï¼å 为è¦å·æ°çªä½ï¼å¦å·æ°å·²ææçBossæ åµçï¼ã 129 _InitBoss: function () { 130 var dlg = null; 131 132 //æªå¼å§æ¸¸ææ¶æè åäººæ¸¸ææ¶ï¼å¯ä»¥ææboss 133 if (LianLianKan.pattern === LianLianKan.Pattern.Single || LianLianKan.gameStatus === LianLianKan.Status.Stop || LianLianKan.gameStatus === LianLianKan.Status.None) { 134 // //æå游æ 135 // this._operate_ui.Pause(); 136 137 // if (this._window.boss) { 138 // this._window.boss.Dispose(); //鿝ä¹åççªä½ï¼å建æ°ççªä½ 139 // } 140 dlg = new YYC.Window({ 141 title: "ææBoss", 142 isShow: false, 143 isClear: true, 144 opacity: 0.4, 145 url: "View/Boss.html", 146 onLoad: MyGameEngine.Event.Bind(this._operate_ui, this._operate_ui.Pause), 147 onClose: MyGameEngine.Event.Bind(this._operate_ui, this._operate_ui.Continue), 148 id: "iframe_boss" 149 }); 150 dlg.ResizeTo(800, 610); 151 152 this._window.boss = dlg; 153 } 154 else { 155 // alert("游æè¿è¡æé´ä¸è½ææBoss"); 156 if (confirm("游æè¿è¡æé´ä¸è½ææBossãæ¯å¦ç»ææ¸¸æï¼")) { 157 this._operate_ui.EndGame(); 158 } 159 else { 160 } 161 } 162 } 163 }, 164 Public: { 165 //èå 166 menu: null, 167 168 //åå§åèå 169 InitMenu: function () { 170 // var this._operate_ui = LianLianKan.Operate_UI; 171 // this._operate_ui.Pause(); 172 this.menu = new YYC.MENU.Menu({ id: "menuContainer", items: [ 173 { 174 text: 'ç³»ç»', 175 menu: { 176 items: [ 177 { 178 //æåLianLianKan.Operate_UI 179 text: 'å¼å§å人游æ', handler: MyGameEngine.Event.BindEvent(this._operate_ui, this._operate_ui.Start_Single, LianLianKan.Operate_Single) 180 }, { 181 text: 'æå', handler: MyGameEngine.Event.BindEvent(this._operate_ui, this._operate_ui.Pause, LianLianKan.Operate_Single) 182 }, { 183 text: 'ä¿å', handler: MyGameEngine.Event.BindEvent(this._operate_ui, this._operate_ui.SaveInfo, LianLianKan.Operate_Single, LianLianKan.Operate_Boss) 184 }, { 185 text: 'éåºæ¸¸æ', handler: MyGameEngine.Event.BindEvent(this._operate_ui, this._operate_ui.Exit) 186 }, { 187 text: '设置', handler: MyGameEngine.Event.Bind(this, this._InitSetting) //æ¤å¤è¦ç»å®å°this 188 }, { 189 text: 'éç½®ç©å®¶ä¿¡æ¯', handler: MyGameEngine.Event.BindEvent(this._operate_ui, this._operate_ui.ResetPlayInfo) 190 } 191 ] 192 } 193 }, { 194 text: 'å°å¾', 195 menu: { 196 items: [ 197 { 198 text: 'éæ©å°å¾', handler: MyGameEngine.Event.Bind(this, this._InitSelectMap) //æ¤å¤è¦ç»å®å°this 199 }, { 200 text: 'èªå®ä¹å°å¾', handler: MyGameEngine.Event.Bind(this, this._InitMapEditor) //æ¤å¤è¦ç»å®å°this 201 } 202 ] 203 } 204 }, { 205 text: 'Boss', 206 menu: { 207 items: [ 208 { 209 text: 'ææBoss', handler: MyGameEngine.Event.Bind(this, this._InitBoss) //æ¤å¤è¦ç»å®å°this 210 }, { 211 text: 'éç½®Boss', handler: MyGameEngine.Event.BindEvent(this._operate_ui, this._operate_ui.ResetBoss) 212 } 213 ] 214 } 215 } 216 ] 217 }); 218 219 this.menu.RenderTo("lianliankan_menu"); 220 221 222 223 // menu.SetHandle([1, 2], function () { 224 // alert("new!"); 225 // }); 226 }, 227 //åå§åæé® 228 InitButton: function () { 229 var self = this; 230 231 //模å¼ä¸ºNoneæå人模å¼ä¸ï¼ç¹å»å¼å§å人游æ 232 this._button_start = new YYC.Button({ text: "å¼å§", 233 onClick: function (e) { 234 // 235 if (LianLianKan.pattern === LianLianKan.Pattern.Single || LianLianKan.pattern === LianLianKan.Pattern.None) { 236 self._operate_ui.Start_Single(); 237 } 238 else if (LianLianKan.pattern === LianLianKan.Pattern.Boss) { 239 self._operate_ui.Start_Boss(); 240 } 241 } 242 }); 243 244 this._button_start.RenderTo("index_button1"); 245 246 this._button_boss = new YYC.Button({ text: "ææBoss", 247 onClick: function (e) { 248 self._InitBoss(); 249 } 250 }); 251 252 this._button_boss.RenderTo("index_button2"); 253 254 this._button_setting = new YYC.Button({ text: "设置", 255 onClick: function (e) { 256 self._InitSetting(); 257 } 258 }); 259 260 this._button_setting.RenderTo("index_button3"); 261 262 this._button_end = new YYC.Button({ text: "ç»ææ¸¸æ", 263 onClick: function (e) {
264 if (confirm("ç¡®å®è¦ç»ææ¸¸æåï¼")) { 265 self._operate_ui.EndGame(); 266 } 267 } 268 }); 269 270 this._button_end.RenderTo("index_button4"); 271 }, 272 GetWindow: function () { 273 return this._window; 274 }, 275 Dispose: function () { 276 } 277 } 278});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.