Skip to content

Commit 2374afd

Browse files
committed
mod
1 parent 3a26fd7 commit 2374afd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+5465
-26378
lines changed

egretProperties.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@
5959
{
6060
"name": "greensock",
6161
"path": "3rd/greensock"
62+
},
63+
{
64+
"name": "nnt",
65+
"path": "nnt"
6266
}
6367
]
6468
}

n2build

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -322,22 +322,6 @@ def combinefiles(files, dest):
322322
cnt.append(readfile(file))
323323
open(dest, 'w').write('\n'.join(cnt))
324324

325-
def genengine():
326-
# 生成egret的信息
327-
res = egret_cmd('info')
328-
res = re.compile(u"当前Egret版本:([0-9])+\.([0-9])+\.([0-9])").findall(res)[0]
329-
source = string.Template("""// generated by n2build, do not modify!
330-
module egret {
331-
export var VERSION = ${ver};
332-
export function MAKE_VERSION(maj, min, patch) {
333-
return maj * 10000 + min * 100 + patch;
334-
}
335-
}
336-
""").substitute({
337-
'ver': int(res[0]) * 10000 + int(res[1]) * 100 + int(res[2])
338-
});
339-
open('src/nn/Engine.ts', 'w').write(source)
340-
341325
def prebuildsrc():
342326
# 处理 tsd 文件
343327
if not os.path.exists('src/app/~tsc'):
@@ -478,7 +462,6 @@ def builddebug(rebuild):
478462
# 判断使用何种编译
479463
if rebuild:
480464
egret_cmd('clean')
481-
genengine()
482465
print egret_cmd('build -e')
483466
else:
484467
print egret_cmd('build')
@@ -585,8 +568,6 @@ def buildrelease():
585568
sys.exit(0)
586569
else:
587570
downloadeuib()
588-
# 生成引擎信息
589-
genengine()
590571
# 预处理代码
591572
egret_makerequire()
592573
prebuildsrc()

src/app/Main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ extends nn.HudProgress
2626
}
2727

2828
class Main
29-
extends nn.Application
29+
extends nn.CoreApplication
3030
{
3131
constructor() {
3232
super();

src/app/MainScene.ts

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -184,106 +184,106 @@ extends nn.Sprite
184184

185185
_cb0() {
186186
let v = new TTableNormal();
187-
nn.Application.shared.viewStack.push(v);
187+
nn.CApplication.shared.viewStack.push(v);
188188
}
189189

190190
_cb1() {
191191
let v = new TTableHov();
192-
nn.Application.shared.viewStack.push(v);
192+
nn.CApplication.shared.viewStack.push(v);
193193
}
194194

195195
_cb2() {
196196
let v = new TGraphics();
197-
nn.Application.shared.viewStack.push(v);
197+
nn.CApplication.shared.viewStack.push(v);
198198
}
199199

200200
_cb3() {
201201
let v = new TAnimation();
202-
nn.Application.shared.viewStack.push(v);
202+
nn.CApplication.shared.viewStack.push(v);
203203
}
204204

205205
_cb4() {
206206
let v = new TDesktop();
207-
nn.Application.shared.viewStack.push(v);
207+
nn.CApplication.shared.viewStack.push(v);
208208
}
209209

210210
_cb5() {
211211
let v = new TApi();
212-
nn.Application.shared.viewStack.push(v);
212+
nn.CApplication.shared.viewStack.push(v);
213213
}
214214

215215
_cb6() {
216216
let v = new TBones();
217-
nn.Application.shared.viewStack.push(v);
217+
nn.CApplication.shared.viewStack.push(v);
218218
}
219219

220220
_cb7() {
221221
let v = new TParticle();
222-
nn.Application.shared.viewStack.push(v);
222+
nn.CApplication.shared.viewStack.push(v);
223223
}
224224

225225
_cb8() {
226226
//let v = new TDynamic();
227-
//nn.Application.shared.viewStack.push(v);
227+
//nn.CApplication.shared.viewStack.push(v);
228228
}
229229

230230
_cb9() {
231231
let v = new TWidgets();
232-
nn.Application.shared.viewStack.push(v);
232+
nn.CApplication.shared.viewStack.push(v);
233233
}
234234

235235
_cb10() {
236236
let v = new TImageFilter();
237-
nn.Application.shared.viewStack.push(v);
237+
nn.CApplication.shared.viewStack.push(v);
238238
}
239239

240240
_cb11() {
241241
let v = new TUnitTest();
242-
nn.Application.shared.viewStack.push(v);
242+
nn.CApplication.shared.viewStack.push(v);
243243
}
244244

245245
_cb12() {
246246
let v = new TSound();
247-
nn.Application.shared.viewStack.push(v);
247+
nn.CApplication.shared.viewStack.push(v);
248248
}
249249

250250
_cb13() {
251251
let v = new TServices();
252-
nn.Application.shared.viewStack.push(v);
252+
nn.CApplication.shared.viewStack.push(v);
253253
}
254254

255255
_cb14() {
256256
let v = new TLayout();
257-
nn.Application.shared.viewStack.push(v);
257+
nn.CApplication.shared.viewStack.push(v);
258258
}
259259

260260
_cb15() {
261261
let v = new TTiledMap();
262-
nn.Application.shared.viewStack.push(v);
262+
nn.CApplication.shared.viewStack.push(v);
263263
}
264264

265265
_cb16() {
266266
let v = new TCollection();
267-
nn.Application.shared.viewStack.push(v);
267+
nn.CApplication.shared.viewStack.push(v);
268268
}
269269

270270
_cb17() {
271271
let v = new TTransform();
272-
nn.Application.shared.viewStack.push(v);
272+
nn.CApplication.shared.viewStack.push(v);
273273
}
274274

275275
_cb18() {
276276
let v = new TBenchmark();
277-
nn.Application.shared.viewStack.push(v);
277+
nn.CApplication.shared.viewStack.push(v);
278278
}
279279

280280
_cb19() {
281281
let v = new TLapack();
282-
nn.Application.shared.viewStack.push(v);
282+
nn.CApplication.shared.viewStack.push(v);
283283
}
284284

285285
_cb20() {
286286
let v = new TCodec();
287-
nn.Application.shared.viewStack.push(v);
287+
nn.CApplication.shared.viewStack.push(v);
288288
}
289289
}

src/app/TAnimation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ extends nn.Sprite
1010
this.label.backgroundColor = nn.Color.Random();
1111
this.addChild(this.label);
1212

13-
nn.Application.shared.gameLayer.signals.connect(nn.SignalClicked, this._actGlobalClicked, this);
13+
nn.CApplication.shared.gameLayer.signals.connect(nn.SignalClicked, this._actGlobalClicked, this);
1414
}
1515

1616
updateLayout() {

src/app/TApi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ module app.model {
2727
var p = {};
2828
p['url'] = this.host + this.action;
2929
p['method'] = this.method == nn.HttpMethod.POST ? 'post' : 'get';
30-
p['uid'] = nn.Application.shared.uniqueId;
30+
p['uid'] = nn.CApplication.shared.uniqueId;
3131
p['fields'] = nn.URL.MapToField(super.fields());
3232
r['data'] = JSON.stringify(p);
3333
return r;
@@ -53,7 +53,7 @@ module app.model {
5353
*/
5454
p['method'] = 'get';
5555
p['fields'] = '&' + nn.URL.MapToField(this.fields());
56-
p['uid'] = nn.Application.shared.uniqueId;
56+
p['uid'] = nn.CApplication.shared.uniqueId;
5757

5858
ret += '&pack=base64&data=';
5959
ret += nn.URL.pack(JSON.stringify(p));

src/app/TServices.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ extends nn.Sprite
4848
this._btnPost.signals.connect(nn.SignalClicked, ()=>{
4949
if (nn.ServicesManager.shared.service.support(nn.svc.Feature.SHARE)) {
5050
var cnt = new nn.svc.ShareContent();
51-
cnt.url = nn.Application.shared.url.toString();
51+
cnt.url = nn.CApplication.shared.url.toString();
5252
cnt.title = "测试分享";
53-
cnt.image = nn.Application.shared.icon;
53+
cnt.image = nn.CApplication.shared.icon;
5454
nn.ServicesManager.fetch(cnt, ()=>{
5555
nn.dump(cnt, 1);
5656
}, this);

src/app/TUnitest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ extends nn.Sprite
1818

1919
updateData() {
2020
super.updateData();
21-
this.lblAppId.text = nn.Application.shared.uniqueId;
21+
this.lblAppId.text = nn.CApplication.shared.uniqueId;
2222
}
2323
}

src/app/TWidgets.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,10 @@ extends TTabPage
234234
this._btnFull.text = "FULLSCREEN";
235235
this._btnFull.backgroundImage = "btn_png";
236236
this._btnFull.signals.connect(nn.SignalClicked, ()=>{
237-
if (nn.Application.shared.isFullscreen)
238-
nn.Application.shared.exitFullscreen();
237+
if (nn.CApplication.shared.isFullscreen)
238+
nn.CApplication.shared.exitFullscreen();
239239
else
240-
nn.Application.shared.enterFullscreen();
240+
nn.CApplication.shared.enterFullscreen();
241241
}, this);
242242
this.addChild(this._btnFull);
243243

0 commit comments

Comments
 (0)