Commit 84cac247 authored by zjz1994's avatar zjz1994

加光旋转

parent d1a3df08
......@@ -5,11 +5,11 @@ export default class Panel extends ComponentBase {
public onShowAnim(){
console.log('panel height',this.height,'stage height',this.stage.stageHeight,'pane skin',this.skinKey);
let targetY:number;
if(this.skinKey=='Turntable'){
targetY = 0;
}else{
// if(this.skinKey=='Turntable'){
// targetY = 0;
// }else{
targetY = this.stage.stageHeight/2-this.height/2;
}
// }
egret.Tween.get(this).set({ y: -200 }).to({ y: targetY }, 500, egret.Ease.quartOut);
}
......
......@@ -239,6 +239,10 @@
{
"keys": "help_blood_1_btn_png,help_blood_1_text_png,help_blood_fail_btn_png,help_blood_fail_text_png,help_blood_fail_text2_png,help_blood_fail_text3_png,help_blood_fail_text4_png,help_blood_success_text_png,help_blood_success_text2_png,help_card_bg_png,help_card_prize_png,help_closebtn1_png,help_invite2_btn_png,help_invite2_btn2_png,help_invite2_text_png,help_invite2_text2_png,help_invite2_text3_png,help_invite2_text4_png,help_invite_bg_png,help_invite_btn1_png,help_invite_fail_btn_png,help_invite_fail_text1_png,help_invite_fail_text2_png,help_invite_fail_text3_png,help_invite_fail_text4_png,help_invite_success_btn_png,help_invite_success_txt_png,help_invite_text_png,help_light_png",
"name": "helpGroup"
},
{
"name": "preload",
"keys": "combglight_png"
}
],
"resources": [
......@@ -5362,6 +5366,11 @@
"url": "assets/help/help_light.png",
"type": "image",
"name": "help_light_png"
},
{
"name": "combglight_png",
"type": "image",
"url": "assets/common/combglight.png"
}
]
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="BloodSkin" 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="341.32" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image id="combglight1" source="combglight_png" y="341.32" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image id="bg2" fillMode="clip" y="-75.58" source="blooduanm_png" horizontalCenter="0" scale9Grid="140,498,445,80"/>
<e:Group id="topinfo" width="750" height="50" y="355.57" horizontalCenter="0">
<e:Image source="bloodhert_png" x="293.98" scaleX="0.4" scaleY="0.4" verticalCenter="2.5"/>
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="LoadingSceneSkin" width="750" height="1624" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Group id="container" y="-83.45" x="-3"/>
<e:Image id="combglight" source="combglight_png" y="612" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image id="combglight1" source="combglight_png" y="612" anchorOffsetX="375" anchorOffsetY="418" horizontalCenter="0"/>
<e:Image source="turntabletit_png" horizontalCenter="0" verticalCenter="-661"/>
<e:Image scaleX="1" scaleY="1" y="35.35" horizontalCenter="41.5" source=""/>
<e:Image id="di" source="turntable_paneldi_png" scaleX="1" scaleY="1" y="194" width="761" horizontalCenter="-5.5" height="883"/>
......
......@@ -140,6 +140,9 @@ 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);
this['buyBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapBuy, this);
......
......@@ -58,11 +58,19 @@ export default class Turntable extends Panel {
this['btnLabel'].text = "";
this.initUI();
}
public onShowAnim(){
let targetY:number;
targetY = 0;
egret.Tween.get(this).set({ y: -200 }).to({ y: targetY }, 500, egret.Ease.quartOut);
}
rulebtn;
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;
}
......
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