Commit c7134f01 authored by wildfirecode's avatar wildfirecode

1

parent ccb88c3c
...@@ -70,6 +70,12 @@ export default class MainBase extends eui.UILayer { ...@@ -70,6 +70,12 @@ export default class MainBase extends eui.UILayer {
DataManager.ins.gameCfgData = window['CFG']; DataManager.ins.gameCfgData = window['CFG'];
DataManager.ins.gameCfgData.gameInfo.gameId = window["gameId"]; DataManager.ins.gameCfgData.gameInfo.gameId = window["gameId"];
setTimeout(() => {
console.log('stageHeight', this.stage.stageHeight);
console.log('height', this.stage.height);
}, 2000);
layers.init(this); layers.init(this);
Loading.init(layers.topLayer); Loading.init(layers.topLayer);
PanelCtrl.instance.init(layers.popupLayer); PanelCtrl.instance.init(layers.popupLayer);
...@@ -126,6 +132,6 @@ export default class MainBase extends eui.UILayer { ...@@ -126,6 +132,6 @@ export default class MainBase extends eui.UILayer {
* Create scene interface * Create scene interface
*/ */
protected createGameScene() { protected createGameScene() {
} }
} }
\ No newline at end of file
...@@ -10,8 +10,11 @@ ...@@ -10,8 +10,11 @@
</e:skinName> </e:skinName>
</e:Button> </e:Button>
<e:Scroller id="scroller" width="528" x="112" height="641" y="351"> <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:Label id="labContent" width="100%" text="" lineSpacing="10" size="30" multiline="true" textColor="0x333333"/>
<e:layout>
<e:VerticalLayout/>
</e:layout>
</e:Group> </e:Group>
</e:Scroller> </e:Scroller>
</e:Skin> </e:Skin>
\ No newline at end of file
...@@ -15,7 +15,7 @@ class Main extends MainBase { ...@@ -15,7 +15,7 @@ class Main extends MainBase {
PanelCtrl.instance.registerPanelClass(ModuleTypes.RULE_PANEL, RulePanel); PanelCtrl.instance.registerPanelClass(ModuleTypes.RULE_PANEL, RulePanel);
PanelCtrl.instance.registerPanelClass(ModuleTypes.OPTIONS_PANEL, OptionsPanel); PanelCtrl.instance.registerPanelClass(ModuleTypes.OPTIONS_PANEL, OptionsPanel);
PanelCtrl.instance.registerPanelClass(ModuleTypes.PRIZE_PANEL, PrizePanel); PanelCtrl.instance.registerPanelClass(ModuleTypes.PRIZE_PANEL, PrizePanel);
SceneCtrl.instance.registerSceneClass(ModuleTypes.START_SCENE, StartScene); SceneCtrl.instance.registerSceneClass(ModuleTypes.START_SCENE, StartScene);
} }
...@@ -29,4 +29,21 @@ class Main extends MainBase { ...@@ -29,4 +29,21 @@ class Main extends MainBase {
} }
} }
window['Main'] = Main; window['Main'] = Main;
\ No newline at end of file
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 { ...@@ -13,9 +13,28 @@ export default class RulePanel extends Panel {
this.addRule(); this.addRule();
} }
group:eui.Group;
private addRule() { private addRule() {
// this.labContent.textFlow = alien.Utils.parseHtmlText(content); let text: string = DataManager.ins.getRuleData.ruleText;
this.labContent.textFlow = (new egret.HtmlTextParser).parser(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' } protected get skinKey() { return 'Rule' }
......
...@@ -277,10 +277,10 @@ export default class StartScene extends Scene { ...@@ -277,10 +277,10 @@ export default class StartScene extends Scene {
return [ return [
LayerTypes.bg, LayerTypes.bg,
LayerTypes.river, LayerTypes.river,
LayerTypes.ui,
LayerTypes.guide, LayerTypes.guide,
LayerTypes.kids, LayerTypes.kids,
LayerTypes.net, LayerTypes.net,
LayerTypes.ui,
LayerTypes.box, LayerTypes.box,
LayerTypes.monkey, LayerTypes.monkey,
LayerTypes.top, LayerTypes.top,
......
...@@ -15,10 +15,10 @@ export default class Tips extends eui.Label { ...@@ -15,10 +15,10 @@ export default class Tips extends eui.Label {
onAddToStage() { onAddToStage() {
this.y = 1142; this.y = 1142;
if (this.stage.stageHeight > 1300) // if (this.stage.stageHeight > 1300)
this.y = 1206; // this.y = 1206;
if (this.stage.stageHeight < 1206) // if (this.stage.stageHeight < 1206)
this.y = this.stage.stageHeight - this.textHeight - 40; // this.y = this.stage.stageHeight - this.textHeight - 40;
} }
updateText() { updateText() {
......
"1.玩家通过控制按压屏幕时长来控制猫咪跨出去的步伐的大小,步伐越大分数越高 \n2. 避开道路上的线条和陷阱,踩中则游戏结束 \n3.每局游戏都有一次积分复活的机会,当用户积分不足的情况下则不会出现提醒" "1<br><br>2"
\ No newline at end of file \ 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