Commit c23039ce authored by wildfirecode's avatar wildfirecode

11

parent a739773e
......@@ -162,7 +162,9 @@
"16c953f5068": {
"backgroundType": "user",
"useBgImage": false,
"useBgColor": true
"useBgColor": true,
"backgroundColor": "#c1c1c1",
"backgroundAlpha": 100
},
"16c95475a4e": {
"backgroundType": "user",
......
......@@ -142,9 +142,9 @@
console.log(result)
}
window['price1'] = 123;
window['price2'] = 2;
window['price3'] = 3;
window['price4'] = 4;
window['price2'] = 20;
window['price3'] = 30;
window['price4'] = 40;
window['price5'] = 555;
window['INIT_BALL_NUMS'] = 1;
window['numsP'] = 0.1;
......
......@@ -3,7 +3,9 @@ import ComponentBase from "./ComponentBase";
export default class Panel extends ComponentBase {
public onShowAnim(){
egret.Tween.get(this).set({ y: -200 }).to({ y: 0 }, 500, egret.Ease.quartOut);
console.log('panel height',this.height,'stage height',this.stage.stageHeight);
const targetY = this.stage.stageHeight/2-this.height/2;
egret.Tween.get(this).set({ y: -200 }).to({ y: targetY }, 500, egret.Ease.quartOut);
}
public onHideAnim(){
......
......@@ -77,7 +77,6 @@ export default class PanelCtrl {
this._current = panel;
panel.start(data);
this.add(panel);
// egret.Tween.get(panel).set({ y: -200 }).to({ y: 0 }, 500, egret.Ease.quartOut);
panel.onShowAnim();
}
......@@ -115,7 +114,7 @@ export default class PanelCtrl {
return;
}
const tw = egret.Tween.get(panel);
tw.to({y: panel.stage.stageHeight}, 300, egret.Ease.quartIn)
tw.to({y: 1624}, 300, egret.Ease.quartIn)
.call(() => {
this._parent.removeChild(panel);
this.removeMask();
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="ShopSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<w:Config id="16c953f5068" horizontalCenter="0"/>
<e:Image y="117" horizontalCenter="0" source="shop_bg2_png"/>
<e:Button id="closeBtn" label="" x="607" y="325">
<e:Image y="-63.48" horizontalCenter="0" source="shop_bg2_png"/>
<e:Button id="closeBtn" label="" x="607" y="300.68">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="closeCommonBtn_png" source.down="closeCommonBtn_png" source.disabled="closeCommonBtn_png"/>
......@@ -10,9 +10,8 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Group y="504" horizontalCenter="0">
<e:Group y="479.68" horizontalCenter="0.5">
<e:Image source="shop_item1_bg_png" y="0" horizontalCenter="0"/>
<e:Label id="price1Txt" text="20" y="70" x="178" size="27" textColor="0xc33700" fontFamily="FZY3JW"/>
<e:Button id="buyBtn2" label="" x="334" y="27">
<e:skinName>
<e:Skin states="up,down,disabled">
......@@ -21,10 +20,10 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Label id="price1Txt" text="20" y="51.56" x="440.04" size="27" fontFamily="FZY3JW" textColor="0xffffff"/>
</e:Group>
<e:Group y="645" horizontalCenter="0">
<e:Group y="620.68" horizontalCenter="0.5">
<e:Image y="0" source="shop_item2_bg_png" horizontalCenter="0"/>
<e:Label id="price2Txt" text="20" y="70" textColor="0xC33700" x="178" size="27" fontFamily="FZY3JW"/>
<e:Button id="buyBtn1" label="" x="334" y="27">
<e:skinName>
<e:Skin states="up,down,disabled">
......@@ -33,10 +32,10 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Label id="price2Txt" text="20" y="51.56" x="440.04" size="27" fontFamily="FZY3JW" textColor="0xffffff"/>
</e:Group>
<e:Group x="110" y="785">
<e:Group x="110" y="760.68">
<e:Image y="0" source="shop_item3_bg_png" x="0"/>
<e:Label id="price3Txt" text="20" y="70" textColor="0xC33700" x="178" size="27" fontFamily="FZY3JW"/>
<e:Button id="buyBtn3" label="" x="334" y="27">
<e:skinName>
<e:Skin states="up,down,disabled">
......@@ -45,6 +44,7 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Label id="price3Txt" text="20" y="51.56" x="440.04" size="27" fontFamily="FZY3JW" textColor="0xffffff"/>
</e:Group>
<e:Group y="925" horizontalCenter="0" visible="false">
<e:Image y="0" source="shop_quan_bg_png" horizontalCenter="0"/>
......@@ -58,7 +58,7 @@
</e:skinName>
</e:Button>
</e:Group>
<e:Label text="已拥有元宝:" x="133" y="439" size="24" fontFamily="FZY3JW" textColor="0x885037"/>
<e:Label id="moneyTxt" text="0000" y="439" textColor="0x885037" size="24" fontFamily="FZY4JW" left="282"/>
<e:Image id="recharge" source="去充值_png" x="506" y="439"/>
<e:Label text="已拥有元宝:" x="133" y="432.92" size="24" fontFamily="FZY3JW" textColor="0xc17343"/>
<e:Label id="moneyTxt" text="0000" y="432.92" size="24" fontFamily="FZY4JW" left="282" textColor="0xc17343"/>
<e:Image id="recharge" source="去充值_png" x="506" y="432.92"/>
</e:Skin>
\ No newline at end of file
......@@ -4,6 +4,21 @@ import { NetManager } from "../../libs/tw/manager/NetManager";
import { getlogItem } from "../Main";
import getHomeData from "../getHomeData";
const setGlow = (img: egret.DisplayObject, color: number,alpha:number) => {
// const color = 0x33CCFF; /// 光晕的颜色,十六进制,不包含透明度
// const alpha = 0.8; /// 光晕的颜色透明度,是对 color 参数的透明度设定。有效值为 0.0 到 1.0。例如,0.8 设置透明度值为 80%。
const blurX = 3; /// 水平模糊量。有效值为 0 到 255.0(浮点)
const blurY = 3; /// 垂直模糊量。有效值为 0 到 255.0(浮点)
const strength = 10; /// 压印的强度,值越大,压印的颜色越深,而且发光与背景之间的对比度也越强。有效值为 0 到 255。暂未实现
const quality: number = egret.BitmapFilterQuality.HIGH; /// 应用滤镜的次数,建议用 BitmapFilterQuality 类的常量来体现
const inner = false; /// 指定发光是否为内侧发光,暂未实现
const knockout = false; /// 指定对象是否具有挖空效果,暂未实现
const glowFilter: egret.GlowFilter = new egret.GlowFilter(color, alpha, blurX, blurY,
strength, quality, inner, knockout);
img.filters = [glowFilter];
}
export default class ShopPanel extends Panel {
start(data) {
......@@ -21,6 +36,10 @@ export default class ShopPanel extends Panel {
this['price3Txt'].text = window['price4'];
this['price4Txt'].text = window['price5'];
setGlow(this['price1Txt'],0xea5317,1);
setGlow(this['price2Txt'],0xea5317,1);
setGlow(this['price3Txt'],0xea5317,1);
this['moneyTxt'].text = getHomeData().wealth;
}
......
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