Commit 07c5bd8b authored by wangzhujun's avatar wangzhujun

1232

parent 468d3ea0
......@@ -2,7 +2,7 @@
<e:Skin class="PKSkin" width="750" height="1624" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image width="750" height="1624" x="0" y="0" source="pkBG_jpg"/>
<e:Image id="myline" width="212" height="941" scale9Grid="26,139,160,144" bottom="0" horizontalCenter="-157" anchorOffsetY="0" source="pkmyline2_png"/>
<e:Image id="otherline" width="212" height="941" scale9Grid="26,103,159,429" bottom="0" horizontalCenter="157" source="pkotherline2_png"/>
<e:Image id="otherline" width="212" height="900" scale9Grid="26,103,159,429" bottom="0" horizontalCenter="157" source="pkotherline2_png" anchorOffsetY="0"/>
<e:Label id="myteam" text="我方队伍" x="112" y="613" size="29" textAlign="center" verticalAlign="middle" textColor="0xfcffff" width="212"/>
<e:Label id="myteamnum" text="总步数:9999" x="112" y="648" size="30" verticalAlign="middle" textColor="0xfe0f5a" width="212" textAlign="center"/>
<e:Label id="otherteam" text="PK方队伍" x="426" y="738" size="29" textAlign="center" verticalAlign="middle" textColor="0xFCFFFF" width="212"/>
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="PlaceSkin" width="750" height="1624" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Group width="714" height="1181" horizontalCenter="15" verticalCenter="19.5" anchorOffsetY="0">
<e:Group width="714" height="1123" horizontalCenter="15" verticalCenter="-9.5" anchorOffsetY="0">
<e:Image id="mapBG" width="683" height="801" x="0" y="111" source="maphz_png" scaleX="1" scaleY="1"/>
<e:Image width="308" height="166" x="406" y="81" source="mappass_png" scaleX="1" scaleY="1"/>
<e:Button id="closeBtn" label="Button" skinName="ui.IconButtonSkin" icon="closeBtn_png" scaleX="1" scaleY="1" width="48" height="48" anchorOffsetX="24" anchorOffsetY="24" x="658" y="24"/>
<e:Button id="knowBtn" label="Button" skinName="ui.IconButtonSkin" icon="mapBtn_png" scaleX="1" scaleY="1" width="449" height="122" anchorOffsetX="224.5" anchorOffsetY="61" x="340.5" y="1015"/>
<e:Label id="sharelab" text="首次分享可获得10能量" size="28" textAlign="center" width="750" scaleX="1" scaleY="1" y="1126" x="-33"/>
<e:Label id="sharelab" text="首次分享可获得10能量" size="28" textAlign="center" width="750" scaleX="1" scaleY="1" y="1092" x="-33"/>
</e:Group>
......
......@@ -49,6 +49,7 @@ import TransScene from './yazuwei/TransScene';
import FinishPanel from './yazuwei/FinishPanel';
import { loadSvgaRes } from './loadSvga';
import { getResPath } from './utils';
import { GCache } from '../libs/tc/util/GCache';
class Main extends MainBase {
protected registerModules() {
......@@ -253,6 +254,9 @@ class Main extends MainBase {
}
Waiting.instance.hide();
let data = DataManager.ins.getData("homeBaseInfo").data;
if(data.currentLevel == 8){
GCache.writeCache("finishtzw",true);
}
SceneCtrl.instance.change(ModuleTypes.START_SCENE, data);
}, window['projectId'])
......
......@@ -4,6 +4,7 @@ import Panel from "../views/Panel";
import PanelCtrl from "../ctrls/panelCtrl";
import { GCache } from "../../libs/tc/util/GCache";
import { DataManager } from "../../libs/tw/manager/DataManager";
import StartScene from "../startScene/StartScene";
export default class GuidePanel extends Panel{
......@@ -52,9 +53,9 @@ export default class GuidePanel extends Panel{
this.hand.touchEnabled = true;
let now = new Date();
if(now.getTime()>window['PKstarttime']){
this.onTap(this.unlockBtn,this.initGuide2);
this.onTap(this,this.initGuide2);
}else{
this.onTap(this.unlockBtn,this.initGuide3);
this.onTap(this,this.initGuide3);
}
}
......@@ -66,7 +67,7 @@ export default class GuidePanel extends Panel{
this.dianran.visible = false;
this.onTap(this.pkBtn,this.initGuide3);
this.onTap(this,this.initGuide3);
}
......@@ -76,7 +77,7 @@ export default class GuidePanel extends Panel{
this.guide3.visible = true;
this.xuanshi.visible = false;
this.dianran.visible = false;
this.onTap(this.firedBtn,this.initXuanshi);
this.onTap(this,this.initXuanshi);
}
initXuanshi(){
......@@ -90,8 +91,8 @@ export default class GuidePanel extends Panel{
// this.onTap(this.closeBtn,()=>{this.hidePanel()});
// this.onTap(this.fireBtn,()=>{this.hidePanel()});
// }else{
this.onTap(this.closeBtn,this.backStartScene);
this.onTap(this.fireBtn,this.backStartScene);
this.onTap(this,this.backStartScene);
this.onTap(this,this.backStartScene);
// }
}
......@@ -102,7 +103,7 @@ export default class GuidePanel extends Panel{
this.xuanshi.visible = false;
this.dianran.visible = true;
this.numlab.text = "第"+data.startdata+"位线上火炬手"
this.onTap(this.dianran,this.goPlace);
this.onTap(this,this.goPlace);
}
backStartScene(){
let data = {data:DataManager.ins.getData("homeBaseInfo").data,type : 1};
......
......@@ -63,17 +63,23 @@ export default class PKScene extends Scene{
let point:egret.Point = this.team1.localToGlobal(this.team1.x,this.team1.y)
if(data.myTeamSteps<50000){
this.myline.height = GameConst.stage.stageHeight/2-307+data.myTeamSteps*0.0096
this.myline.height = GameConst.stage.stageHeight/2-300+data.myTeamSteps*0.0075
}else{
this.myline.height = GameConst.stage.stageHeight/2-307+480+(data.myTeamSteps-50000)*0.009
this.myline.height = GameConst.stage.stageHeight/2-300+375+(data.myTeamSteps-50000)*0.0065
}
if(data.enemyTeamSteps<50000){
this.otherline.height = GameConst.stage.stageHeight/2-307+data.enemyTeamSteps*0.0096
this.otherline.height = GameConst.stage.stageHeight/2-300+data.enemyTeamSteps*0.0075
}else{
this.otherline.height = GameConst.stage.stageHeight/2-307+480+(data.enemyTeamSteps-50000)*0.009
this.otherline.height = GameConst.stage.stageHeight/2-300+375+(data.enemyTeamSteps-50000)*0.0065
}
if(data.myTeamSteps>70000){
this.myline.height = GameConst.stage.stageHeight/2-300+505
}
if(data.enemyTeamSteps>70000){
this.otherline.height = GameConst.stage.stageHeight/2-300+505
}
this.myline.anchorOffsetY = this.myline.height
this.otherline.anchorOffsetY = this.otherline.height
......
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