Commit e1f2a46f authored by zjz1994's avatar zjz1994

新增旋转光

parent 616485b1
......@@ -28,11 +28,42 @@ export default class Panel extends ComponentBase {
this.closeBtns.forEach(
btn => { if (btn) btn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchTap_closeBtn, this) }
)
if(this['combglight']){
this['combglight'].visible = false;
this.once(egret.Event.ADDED,()=>{
// setTimeout(() => {
this['combglight'].visible = true;
egret.Tween.get(this['combglight'], { loop: true }).to({ rotation: 360 }, 12000);
// }, 200)
},this);
}
if(this['combglight1']){
this['combglight1'].visible = false;
this.once(egret.Event.ADDED,()=>{
// setTimeout(() => {
this['combglight1'].visible = true;
egret.Tween.get(this['combglight1'], { loop: true }).to({ rotation: -360 }, 12000);
// },200)
},this)
}
}
removeEvents() {
this.closeBtns.forEach(
btn => { if (btn) btn.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchTap_closeBtn, this) }
)
if(this['combglight']){
egret.Tween.removeTweens(this['combglight']);
}
if(this['combglight1']){
egret.Tween.removeTweens(this['combglight1']);
}
}
protected get closeBtns(): eui.Button[] { return [this['closeBtn']] }
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="AddSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<w:Config id="16db3bd8eb8"/>
<e:Image id="combglight" source="combglight_png" y="476.19" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image id="combglight1" source="combglight_png" y="476.19" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image source="adbg_png" y="-52.51" horizontalCenter="0"/>
<e:Image id="adBtn" y="437.49" width="504" height="536" source="{data.img}" horizontalCenter="0"/>
<e:Button id="closeBtn" label="" y="308.88" horizontalCenter="275.5">
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="BackSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<w:Config id="16e0235c541"/>
<e:Image id="combglight" source="combglight_png" y="417.32" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image id="combglight1" source="combglight_png" y="417.32" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image source="backbg_png" scale9Grid="93,550,564,42" y="-107" horizontalCenter="0"/>
<e:Image id="bg" source="commom_prop_bg_png" y="456.76" horizontalCenter="0"/>
<e:Image id="img" source="{data.url}" y="452.76" width="494" height="226" horizontalCenter="0"/>
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="BagSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image id="combglight" source="combglight_png" y="371.64" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image id="combglight1" source="combglight_png" y="371.64" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image source="bagbg_png" horizontalCenter="0" verticalCenter="-71.5"/>
<e:Group id="group1" y="377" horizontalCenter="0" visible="false">
<e:Image source="bag我的道具_png" y="0" x="0"/>
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="Buy1Skin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<w:Config id="16c95475a4e"/>
<e:Image id="combglight" source="combglight_png" y="407.32" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image id="combglight1" source="combglight_png" y="407.32" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image y="-62" source="购买锤子_png" horizontalCenter="0"/>
<e:Button id="closeBtn" label="" x="608" y="289">
<e:skinName>
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="Buy2Skin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image id="combglight" source="combglight_png" y="407.32" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image id="combglight1" source="combglight_png" y="407.32" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image y="-62" horizontalCenter="0" source="购买炸弹_png"/>
<e:Button id="closeBtn" label="" x="597.39" y="278.7">
<e:skinName>
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="Buy3Skin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<w:Config id="16c984f7919"/>
<e:Image id="combglight" source="combglight_png" y="404.98" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image id="combglight1" source="combglight_png" y="404.98" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image y="-62" horizontalCenter="0" source="购买步数增加_png"/>
<e:Button id="closeBtn" label="" x="592" y="289">
<e:skinName>
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="FriendSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image id="combglight" source="combglight_png" y="319.32" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image id="combglight1" source="combglight_png" y="319.32" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image source="friendbg_png" y="48.29" horizontalCenter="2" locked="true"/>
<e:Label id="star" text="X0" x="588.96" y="366.08" size="24" fontFamily="FZY3JW"/>
<e:Button id="closeBtn" label="" x="634.94" y="239.98">
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="InviteSkin" width="750" height="1624" xmlns:e="http://ns.egret.com/eui"
xmlns:w="http://ns.egret.com/wing">
<e:Image id="combglight" source="combglight_png" y="614.32" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image id="combglight1" source="combglight_png" y="614.32" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image y="87.33" horizontalCenter="0" source="hbCutTime_bg_png"/>
<e:BitmapLabel id="cutTimeLabel" y="801.33" text="00时00分00秒" letterSpacing="8" horizontalCenter="10" font="hbCutTimeFont_fnt"/>
<e:Image id="tipImage" y="748" source="hbCutTime_cutLine_disable_png" horizontalCenter="0"/>
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="InviteSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui"
xmlns:w="http://ns.egret.com/wing">
<e:Image id="combglight" source="combglight_png" y="385.32" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image id="combglight1" source="combglight_png" y="385.32" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image y="-145.5" source="hbPrize_bg_png" horizontalCenter="1"/>
<e:Image id="img" width="508" height="225" source="{data.url}" y="518.96" horizontalCenter="0"/>
<e:Image id="prop" scaleX="1" scaleY="1" horizontalCenter="-70.5" source="taskPrize_money_png" verticalCenter="15.5"/>
......
......@@ -2,6 +2,8 @@
<e:Skin class="InviteSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui"
xmlns:w="http://ns.egret.com/wing" xmlns:ns1="*">
<e:Component y="910" skinName="ADSmallSkin" anchorOffsetX="0" anchorOffsetY="0" horizontalCenter="0" visible="false"/>
<e:Image id="combglight" source="combglight_png" y="418.32" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image id="combglight1" source="combglight_png" y="418.32" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image y="-108.73" source="invitePrize_bg_png" horizontalCenter="0"/>
<e:Image id="prizeImg" y="455.77" source="" horizontalCenter="0" width="510" height="228"/>
<e:Button id="closeBtn" label="" x="612" y="311.77">
......
......@@ -2,6 +2,8 @@
<e:Skin class="InviteSkin" width="750" height="1624" xmlns:e="http://ns.egret.com/eui"
xmlns:w="http://ns.egret.com/wing">
<w:Config id="16dd8f58b77" visible="false"/>
<e:Image id="combglight" source="combglight_png" y="585.25" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image id="combglight1" source="combglight_png" y="585.25" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image id="light2" source="invitebg2_png" x="376" y="317" anchorOffsetX="356" anchorOffsetY="296" visible="false"/>
<e:Image id="light1" source="invitebg2_png" x="376" y="317" anchorOffsetX="356" anchorOffsetY="296" visible="false"/>
<e:Image y="36.5" horizontalCenter="0" source="invite_bg_png"/>
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="NoPrizeSkin" width="750" height="1624" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image id="combglight" source="combglight_png" y="533.73" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="-3"/>
<e:Image id="combglight1" source="combglight_png" y="533.73" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="-3"/>
<e:Image id="light" source="common_prizelight_png" x="374.19" y="512.23" anchorOffsetX="375.76" anchorOffsetY="327.27"/>
<e:Image y="17" source="擦肩而过弹窗 _png" horizontalCenter="0"/>
<e:Button id="closeBtn" label="" x="596.48" y="436.72">
......
......@@ -2,6 +2,8 @@
<e:Skin class="Prize2Skin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<w:Config id="169005181d0"/>
<e:Component y="809.52" skinName="ADSmallSkin" x="84" visible="false"/>
<e:Image id="combglight" source="combglight_png" y="451.32" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image id="combglight1" source="combglight_png" y="451.32" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image id="light" source="common_prizelight_png" x="376.19" y="598.89" anchorOffsetX="375.76" anchorOffsetY="327.27"/>
<e:Image source="prizePanelbg_png" y="-73.38" horizontalCenter="2"/>
<e:Button id="closeBtn" label="" x="588" y="367.88">
......
......@@ -3,6 +3,8 @@
<w:Config id="169005181d0"/>
<e:Component y="1086.79" skinName="ADSmallSkin" x="68" visible="false"/>
<e:Image id="light" source="common_prizelight_png" x="374.19" y="253.76" anchorOffsetX="375.76" anchorOffsetY="327.27" visible="false"/>
<e:Image id="combglight" source="combglight_png" y="513.32" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image id="combglight1" source="combglight_png" y="513.32" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image source="prizePanelbg_png" y="0" scale9Grid="87,543,522,23" x="0"/>
<e:Label id="lvTxt" text="关卡1" y="451.72" fontFamily="FZY3JW" size="42" textColor="0xffffff" strokeColor="0xff8339" stroke="3" horizontalCenter="0.5"/>
<e:Image id="picb" x="286" y="542.5" source="点亮 副本 2gray_png" scaleX="-1"/>
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="InviteSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui"
xmlns:w="http://ns.egret.com/wing" xmlns:ns1="*">
<e:Image id="combglight" source="combglight_png" y="400.4" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image id="combglight1" source="combglight_png" y="400.4" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image y="-123.17" horizontalCenter="0" source="scratchPrize_bg_png"/>
<e:Image id="prizeImg" y="426.77" source="" horizontalCenter="0" width="510" height="228"/>
<e:Button id="closeBtn" label="" x="610" y="309.33">
......
......@@ -2,6 +2,8 @@
<e:Skin class="InviteSkin" width="750" height="1624" xmlns:e="http://ns.egret.com/eui"
xmlns:w="http://ns.egret.com/wing">
<w:Config id="16dd8f58b77" visible="false"/>
<e:Image id="combglight" source="combglight_png" y="545.88" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image id="combglight1" source="combglight_png" y="545.88" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image source="scratch_bg_png" y="21.83" x="-1"/>
<e:Image id="light2" x="375" y="496" anchorOffsetX="356" anchorOffsetY="296" source="scratchbg2_png" visible="false"/>
<e:Image id="light1" x="375" y="496" anchorOffsetX="356" anchorOffsetY="296" source="scratchbg2_png" visible="false"/>
......
<?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 id="combglight" source="combglight_png" y="405.32" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image id="combglight1" source="combglight_png" y="405.32" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image y="-63.48" horizontalCenter="0" source="shop_bg2_png"/>
<e:Button id="closeBtn" label="" x="607" y="300.68">
<e:skinName>
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="SignSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image id="combglight" source="combglight_png" y="339.32" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image id="combglight1" source="combglight_png" y="339.32" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image source="signbg_png" y="66.75" horizontalCenter="0"/>
<e:Button id="closeBtn" label="" x="632" y="257.77">
<e:skinName>
......@@ -25,7 +27,7 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Group id="prizegroup" width="750" height="1206" x="0" y="0">
<e:Group id="prizegroup" width="750" height="1206" x="0" y="0" visible="false">
<e:Rect id="mask1" fillAlpha="0.8" x="0" y="0" scaleX="1" scaleY="1" width="750" height="1206"/>
<e:Group id="lightbot" width="750" height="1206" x="0" y="0"/>
<e:Group id="giftbox" width="750" height="1206"/>
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="StartPanelSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<w:Config id="16cd285c715"/>
<e:Image id="combglight" source="combglight_png" y="302.32" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image id="combglight1" source="combglight_png" y="302.32" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image y="-161.94" source="startpanel通关条件_png" x="0"/>
<e:Label id="levelTxt" text="关卡1" y="229" fontFamily="FZY3JW" size="42" textColor="0xffffff" strokeColor="0xff8339"
stroke="3" anchorOffsetX="0" width="236" textAlign="center" verticalAlign="middle" anchorOffsetY="0" horizontalCenter="0" height="52"/>
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="SignPrizeSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<w:Config id="16d5c2563cb"/>
<e:Image id="combglight" source="combglight_png" y="362.32" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image id="combglight1" source="combglight_png" y="362.32" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Component y="830" skinName="ADSmallSkin" anchorOffsetX="0" anchorOffsetY="0" horizontalCenter="0" visible="false"/>
<e:Image source="TaskCenterPrize_bg_png" y="-150.5" horizontalCenter="0"/>
<e:Button id="closeBtn" label="" x="607" y="240">
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="TurntablePrize2" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<w:Config id="16e02c1ad57"/>
<e:Image id="combglight" source="combglight_png" y="362.32" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image id="combglight1" source="combglight_png" y="362.32" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image id="light2" source="invitebg2_png" x="376" y="297" anchorOffsetX="356" anchorOffsetY="296" visible="false"/>
<e:Image id="light1" source="invitebg2_png" x="386" y="307" anchorOffsetX="356" anchorOffsetY="296" visible="false"/>
<e:Group id="container" y="-98.45" x="-3"/>
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="TurntablePrize" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<w:Config id="16e02c1ad57"/>
<e:Image id="combglight" source="combglight_png" y="369.32" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image id="combglight1" source="combglight_png" y="369.32" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Component y="788" skinName="ADSmallSkin" horizontalCenter="0" visible="false"/>
<e:Image id="light2" source="invitebg2_png" x="376" y="297" anchorOffsetX="356" anchorOffsetY="296" visible="false"/>
<e:Image id="light1" source="invitebg2_png" x="386" y="307" anchorOffsetX="356" anchorOffsetY="296" visible="false"/>
......
......@@ -143,8 +143,6 @@ export default class BloodPanel extends Panel {
initEvents() {
super.initEvents();
egret.Tween.get(this['combglight'], { loop: true }).to({ rotation: 360 }, 12000);
egret.Tween.get(this['combglight1'], { loop: true }).to({ rotation: -360 }, 12000);
this['inviteBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapInvite, this);
this['inviteBtn2'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapInvite, this);
......
......@@ -68,9 +68,6 @@ export default class Turntable extends Panel {
initEvents() {
super.initEvents();
egret.Tween.get(this['combglight'], { loop: true }).to({ rotation: 360 }, 6000);
egret.Tween.get(this['combglight1'], { loop: true }).to({ rotation: -360 }, 6000);
if(this.data.onceAgain) { // 再抽一次
return;
}
......
......@@ -74,4 +74,5 @@ export enum ElementConfigType {
CANNO_DIR_RIGHT = 21,
/** 大炮石头 */
CANNO_BLOCK = 22,
xingxing = 23,
}
\ 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