Commit c7134f01 authored by wildfirecode's avatar wildfirecode

1

parent ccb88c3c
......@@ -70,6 +70,12 @@ export default class MainBase extends eui.UILayer {
DataManager.ins.gameCfgData = window['CFG'];
DataManager.ins.gameCfgData.gameInfo.gameId = window["gameId"];
setTimeout(() => {
console.log('stageHeight', this.stage.stageHeight);
console.log('height', this.stage.height);
}, 2000);
layers.init(this);
Loading.init(layers.topLayer);
PanelCtrl.instance.init(layers.popupLayer);
......
......@@ -10,8 +10,11 @@
</e:skinName>
</e:Button>
<e:Scroller id="scroller" width="528" x="112" height="641" y="351">
<e:Group width="100%">
<e:Group id="group" width="100%">
<e:Label id="labContent" width="100%" text="" lineSpacing="10" size="30" multiline="true" textColor="0x333333"/>
<e:layout>
<e:VerticalLayout/>
</e:layout>
</e:Group>
</e:Scroller>
</e:Skin>
\ No newline at end of file
......@@ -30,3 +30,20 @@ class Main extends MainBase {
}
window['Main'] = Main;
setTimeout(() => {
egret.runEgret({
renderMode: "webgl", audioType: 0, calculateCanvasScaleFactor: function (context: any) {
var backingStore = context.backingStorePixelRatio ||
context.webkitBackingStorePixelRatio ||
context.mozBackingStorePixelRatio ||
context.msBackingStorePixelRatio ||
context.oBackingStorePixelRatio ||
context.backingStorePixelRatio || 1;
return (window.devicePixelRatio || 1) / backingStore;
}
});
}, 1000);
\ No newline at end of file
......@@ -13,9 +13,28 @@ export default class RulePanel extends Panel {
this.addRule();
}
group:eui.Group;
private addRule() {
// this.labContent.textFlow = alien.Utils.parseHtmlText(content);
this.labContent.textFlow = (new egret.HtmlTextParser).parser(DataManager.ins.getRuleData.ruleText);
let text: string = DataManager.ins.getRuleData.ruleText;
text = text.replace('/<div>/g', '');
text = text.replace('/</div>/g', '');
text = text.replace('/<br>/g', '<br> ');
const textlist = text.split('<br>');
console.log(text);
// this.labContent.textFlow = (new egret.HtmlTextParser).parser(DataManager.ins.getRuleData.ruleText);
for (let i = 0; i < textlist.length; i++) {
const l = new eui.Label();
l.textColor=this.labContent.textColor;
l.size=this.labContent.size;
l.width=this.labContent.width;
l.minHeight=20;
l.textFlow = (new egret.HtmlTextParser).parser(textlist[i]+'');
this.group.addChild(l)
}
}
protected get skinKey() { return 'Rule' }
......
......@@ -277,10 +277,10 @@ export default class StartScene extends Scene {
return [
LayerTypes.bg,
LayerTypes.river,
LayerTypes.ui,
LayerTypes.guide,
LayerTypes.kids,
LayerTypes.net,
LayerTypes.ui,
LayerTypes.box,
LayerTypes.monkey,
LayerTypes.top,
......
......@@ -15,10 +15,10 @@ export default class Tips extends eui.Label {
onAddToStage() {
this.y = 1142;
if (this.stage.stageHeight > 1300)
this.y = 1206;
if (this.stage.stageHeight < 1206)
this.y = this.stage.stageHeight - this.textHeight - 40;
// if (this.stage.stageHeight > 1300)
// this.y = 1206;
// if (this.stage.stageHeight < 1206)
// this.y = this.stage.stageHeight - this.textHeight - 40;
}
updateText() {
......
"1.玩家通过控制按压屏幕时长来控制猫咪跨出去的步伐的大小,步伐越大分数越高 \n2. 避开道路上的线条和陷阱,踩中则游戏结束 \n3.每局游戏都有一次积分复活的机会,当用户积分不足的情况下则不会出现提醒"
\ No newline at end of file
"1<br><br>2"
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment