Commit 0dd184ed authored by wildfirecode's avatar wildfirecode

1

parent 7cf5f38b
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="ShowOffSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image source="showoff_jpg"/>
<e:Label id="lvTxt" text="888" x="250" y="284" anchorOffsetX="0" width="179" anchorOffsetY="0" bold="true" textColor="0xec1f09" textAlign="center" verticalAlign="middle" size="106"/>
<e:Label id="tipsTxt" text="超过了60%的好友" y="403" anchorOffsetX="0" anchorOffsetY="0" textColor="0xEC1F09" textAlign="center" verticalAlign="middle" size="29" horizontalCenter="0"/>
<e:Group id="pic" x="0" y="0">
<e:Image source="showoff_jpg" x="0" y="0"/>
<e:Label id="lvTxt" text="888" x="250" y="284" anchorOffsetX="0" width="179" anchorOffsetY="0" bold="true" textColor="0xec1f09" textAlign="center" verticalAlign="middle" size="106"/>
<e:Label id="tipsTxt" text="超过了60%的好友" y="403" anchorOffsetX="0" anchorOffsetY="0" textColor="0xEC1F09" textAlign="center" verticalAlign="middle" size="29" x="259"/>
</e:Group>
</e:Skin>
\ No newline at end of file
......@@ -4,8 +4,10 @@ import { NetManager } from "../libs/tw/manager/NetManager";
import { DataManager } from "../libs/tw/manager/DataManager";
import { iswx } from "./iswx";
import { callShareApi } from "./shareCtrl";
import wait from "../libs/new_tc/wait";
class ShowOff extends ComponentBase {
pic;
start() {
const data = getHomeData();
this['lvTxt'].text = data.levels.length;
......@@ -27,7 +29,10 @@ export default async (stage, parent?: egret.DisplayObjectContainer, ) => {
showoff.loadSkin();
showoff.start();
if (parent) parent.addChild(showoff);
const base64 = getPrintScreenData(showoff, 0, 0, pic.textureWidth, stage.stageHeight);
showoff.cacheAsBitmap=true;
// stage.once(egret.Event.ENTER_FRAME, () => {
const base64 = getPrintScreenData(showoff['pic'], 0, 0, pic.textureWidth, stage.stageHeight);
NetManager.ins.imgUrl((success) => {
const data = DataManager.ins.getData('imgURL');
// r(data.data);
......@@ -35,6 +40,7 @@ export default async (stage, parent?: egret.DisplayObjectContainer, ) => {
callShareApi(data.data, 1);
}
}, base64);
// })
// }, this);
}
......@@ -26,9 +26,9 @@ export default class MapScene extends Scene {
async start(data?) {
super.start();
// setTimeout(() => {
// getShowOffPic(this.stage,this)
// }, 3000);
setTimeout(() => {
getShowOffPic(this.stage,this)
}, 2000);
this._data = data;
//滚动的背景变黑
this['rectbg'].height = this.stage.stageHeight;
......
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