Skip to content

Commit 11992a1

Browse files
PatriceJianghuangwei1024
authored andcommitted
[js interval tests] use labelBMFont instead of labelTTF, improve preformance (cocos2d#19215)
1 parent 6156ab3 commit 11992a1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/js-tests/src/IntervalTest/IntervalTest.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ var IntervalLayer = cc.LayerGradient.extend({
5757
sun.setLife(0.6);
5858
this.addChild(sun);
5959

60-
// timers
61-
this.label0 = new cc.LabelTTF("0", "Arial", 24);
62-
this.label1 = new cc.LabelTTF("0", "Arial", 24);
63-
this.label2 = new cc.LabelTTF("0", "Arial", 24);
64-
this.label3 = new cc.LabelTTF("0", "Arial", 24);
65-
this.label4 = new cc.LabelTTF("0", "Arial", 24);
60+
// timers, font "fonts/bitmapFontTest4.fnt"
61+
this.label0 = cc.Label.createWithBMFont("fonts/bitmapFontTest4.fnt", 24);
62+
this.label1 = cc.Label.createWithBMFont("fonts/bitmapFontTest4.fnt", 24);
63+
this.label2 = cc.Label.createWithBMFont("fonts/bitmapFontTest4.fnt", 24);
64+
this.label3 = cc.Label.createWithBMFont("fonts/bitmapFontTest4.fnt", 24);
65+
this.label4 = cc.Label.createWithBMFont("fonts/bitmapFontTest4.fnt", 24);
6666

6767
this.scheduleUpdate();
6868
this.schedule(this.step1);

0 commit comments

Comments
 (0)