Commit 2afccfc2 authored by 邱旭's avatar 邱旭

1

parent b2e95b2d
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
</state>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
{
"version": 5,
"files": [
"./turntable/turntable_rulebtn.png",
"./turntable/turnable_icon2.png",
"./turntable/turnable_icon3.png",
"./turntable/turnable_icon1.png",
"./turntable/turntable_bg.png",
"./turntable/turntable_startbtn.png",
"./turntable/turntable_panel.png"
],
"projectName": "turntable",
"options": {
"layoutMath": "3",
"sizeMode": "free",
"useExtension": 0,
"layoutGap": 1,
"extend": 0
}
}
\ No newline at end of file
......@@ -76,6 +76,7 @@ import TaskCenterNoPrize from "../../src/panels/TaskCenter/TaskCenterNoPrize";
import { GDispatcher } from "../tc/util/GDispatcher";
import ShopTipPanel from "../../src/panels/ShopTipPanel";
import RechargePanel from "../../src/panels/RechargePanel";
import BombTips2Panel from "../../src/panels/BombTips2Panel";
export default class MainBase extends eui.UILayer {
constructor() {
......@@ -155,6 +156,7 @@ export default class MainBase extends eui.UILayer {
['friend', { cls: FriendPanel }],
['ad', { cls: ADPanel }],
['BombTipsPanel', { cls: BombTipsPanel }],
['BombTips2Panel', { cls: BombTips2Panel }],
['RedBombAlert', { cls: RedBombAlertPanel }],
['RedBombRule', { cls: RedBombRule }],
['task', { cls: TaskCenter }],
......@@ -248,6 +250,7 @@ export default class MainBase extends eui.UILayer {
}
else {
RES.getResAsync('mapredbagicom_png');
RES.getResAsync('mapredbagicom2_png');
RES.getResAsync('maplight2_png');
RES.getResAsync('main_mapbottom_png');
RES.getResAsync('lightani_png');
......@@ -326,7 +329,7 @@ export default class MainBase extends eui.UILayer {
}
var arr = [
"rectLatWhite",
"fesRedBigLight", "fesRedBombSta1", "fesRedCap", "fesRedDown", "fesRedSmallLight", "fesRedUp", "xingxingbi",
"fesRedBigLight", "fesRedBombSta1", "fesRedBombSta2", "fesRedCap", "fesRedDown", "fesRedSmallLight", "fesRedUp", "xingxingbi",
"tinyRedLeft", "tinyRedMid", "tinyRedRight",
"festivalTargetBg",
"hairballDisBg",
......@@ -489,7 +492,7 @@ export default class MainBase extends eui.UILayer {
this.hcHome(),
this.hc_userInfo(),
// this.getBackReward(),
// this.hcRedBoobBaseInfo(),
this.hcRedBoobBaseInfo(),
]);
MapScene.adData = DataManager.ins.getData('hc_advert');
......
......@@ -463,7 +463,7 @@ export class NetManager extends ABNetManager {
* @param gameData json带分数和通关元素
* @param submitToken token,来自getNgameStartStatus,,DataManager.ins.getData("getNgameStartStatus").data.submitToken
*/
hc_submit(callback: Function, orderId: number, score: number, gameData: string, submitToken: string): void {
hc_submit(callback: Function, orderId: number, score: number, gameData: string, submitToken: string, relatedTaskType): void {
const sign = this.createSgin(orderId, score, gameData, submitToken);
var data = {
activityId: DataManager.ins.customCfgData.actId,
......@@ -473,7 +473,10 @@ export class NetManager extends ABNetManager {
dynamicData: JSON.stringify([]),
detect: window['detect'],
deviceSessionId: window['_device_session_id'],
score: score,
score: score
};
if(relatedTaskType) {
data['relatedTaskType'] = relatedTaskType;
}
var sgin = this.encrypt(JSON.stringify(data));
const net: INetData = {
......
egret/resource/assets/map/icon.png

9.52 KB | W: | H:

egret/resource/assets/map/icon.png

8.34 KB | W: | H:

egret/resource/assets/map/icon.png
egret/resource/assets/map/icon.png
egret/resource/assets/map/icon.png
egret/resource/assets/map/icon.png
  • 2-up
  • Swipe
  • Onion skin
egret/resource/assets/map/icongray.png

6.53 KB | W: | H:

egret/resource/assets/map/icongray.png

6.24 KB | W: | H:

egret/resource/assets/map/icongray.png
egret/resource/assets/map/icongray.png
egret/resource/assets/map/icongray.png
egret/resource/assets/map/icongray.png
  • 2-up
  • Swipe
  • Onion skin
egret/resource/assets/map/map1.jpg

173 KB | W: | H:

egret/resource/assets/map/map1.jpg

454 KB | W: | H:

egret/resource/assets/map/map1.jpg
egret/resource/assets/map/map1.jpg
egret/resource/assets/map/map1.jpg
egret/resource/assets/map/map1.jpg
  • 2-up
  • Swipe
  • Onion skin
egret/resource/assets/map/map2.jpg

202 KB | W: | H:

egret/resource/assets/map/map2.jpg

520 KB | W: | H:

egret/resource/assets/map/map2.jpg
egret/resource/assets/map/map2.jpg
egret/resource/assets/map/map2.jpg
egret/resource/assets/map/map2.jpg
  • 2-up
  • Swipe
  • Onion skin
egret/resource/assets/map/map3.jpg

186 KB | W: | H:

egret/resource/assets/map/map3.jpg

446 KB | W: | H:

egret/resource/assets/map/map3.jpg
egret/resource/assets/map/map3.jpg
egret/resource/assets/map/map3.jpg
egret/resource/assets/map/map3.jpg
  • 2-up
  • Swipe
  • Onion skin
egret/resource/assets/share3.jpg

432 KB | W: | H:

egret/resource/assets/share3.jpg

400 KB | W: | H:

egret/resource/assets/share3.jpg
egret/resource/assets/share3.jpg
egret/resource/assets/share3.jpg
egret/resource/assets/share3.jpg
  • 2-up
  • Swipe
  • Onion skin
This diff is collapsed.
......@@ -58,6 +58,7 @@
"resource/skins/RedBagAlertSkin.exml",
"resource/skins/RedBombAlertSkin.exml",
"resource/skins/RedBombRuleSkin.exml",
"resource/skins/RedBombTips2Skin.exml",
"resource/skins/RedBombTipsSkin.exml",
"resource/skins/ReliveSkin.exml",
"resource/skins/RuleSkin.exml",
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="MapBottomSkin" width="750" height="1530" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Skin class="MapBottomSkin" width="750" height="1363" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image source="map3_jpg" x="0" y="0"/>
<e:Group x="389" y="44" id="icon0">
<e:Group x="276.88" y="44" id="icon0">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt0" width="76" x="12" y="18.69" text="60" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group id="icon1" x="541.97" y="148.44">
<e:Group id="icon1" x="145.7" y="148.44">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt1" width="76" x="12" y="18.69" text="61" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="524" y="331" id="icon2">
<e:Group x="130" y="288" id="icon2">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt2" width="76" x="12" y="18.69" text="62" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="329.94" y="403" id="icon3">
<e:Group x="206.94" y="403" id="icon3">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt3" width="76" x="12" y="18.69" text="63" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="83" y="513" id="icon4">
<e:Group x="314" y="479" id="icon4">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt4" width="76" x="12" y="18.69" text="64" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="304" y="660" id="icon5">
<e:Group x="471" y="589" id="icon5">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt5" width="76" x="12" y="18.69" text="65" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="297.01" y="829.69" id="icon6">
<e:Group x="561.01" y="718.69" id="icon6">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt6" width="76" x="12" y="18.69" text="66" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="149.01" y="949.69" id="icon7">
<e:Group x="453.01" y="892.69" id="icon7">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt7" width="76" x="12" y="18.69" text="67" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="317.01" y="1052.69" id="icon8">
<e:Group x="309.01" y="1052.69" id="icon8">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt8" width="76" x="12" y="18.69" text="68" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="507.01" y="1148.69" id="icon9">
<e:Group x="95.01" y="1145.69" id="icon9">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt9" width="76" x="12" y="18.69" text="69" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="377.01" y="1209.69" id="icon10">
<e:Group x="202.01" y="1255.69" id="icon10">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt10" width="76" x="12" y="18.69" text="70" font="nums_fnt" textAlign="center"/>
</e:Group>
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="MapRepeatPartSkin" width="750" height="1477" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Skin class="MapRepeatPartSkin" width="750" height="1634" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image source="map2_jpg"/>
<e:Group x="351" y="26" id="icon0">
<e:Group x="359" y="136.01" id="icon0">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt0" width="76" x="12" y="18.69" text="1" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="196" y="158" id="icon1">
<e:Group x="235" y="282" id="icon1">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt1" width="76" x="12" y="18.69" text="2" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="143" y="302" id="icon2">
<e:Group x="307" y="423" id="icon2">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt2" width="76" x="12" y="18.69" text="3" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="235" y="435" id="icon3">
<e:Group x="458" y="523" id="icon3">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt3" width="76" x="12" y="18.69" text="4" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="348" y="547" id="icon4">
<e:Group x="573" y="624" id="icon4">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt4" width="76" x="12" y="18.69" text="5" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="499" y="674" id="icon5">
<e:Group x="515" y="740" id="icon5">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt5" width="76" x="12" y="18.69" text="6" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="390" y="821" id="icon6">
<e:Group x="427" y="832" id="icon6">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt6" width="76" x="12" y="18.69" text="7" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="218" y="897" id="icon7">
<e:Group x="287" y="889" id="icon7">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt7" width="76" x="12" y="18.69" text="8" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="28" y="969" id="icon8">
<e:Group x="227" y="1035" id="icon8">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt8" width="76" x="12" y="18.69" text="9" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="237" y="1072" id="icon9">
<e:Group x="319" y="1140" id="icon9">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel id="txt9" width="76" x="12" y="18.69" text="10" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="377" y="1137" id="icon10">
<e:Group x="426" y="1249.12" id="icon10">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="11" font="nums_fnt" textAlign="center" id="txt10"/>
</e:Group>
<e:Group x="508" y="1254" id="icon11">
<e:Group x="346" y="1379.76" id="icon11">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="12" font="nums_fnt" textAlign="center" id="txt11"/>
</e:Group>
<e:Group x="359" y="1367" id="icon12">
<e:Image source="icon_png" x="0" y="0"/>
<e:Group x="324" y="1527.61" id="icon12">
<e:Image source="icon_png" x="-1" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="13" font="nums_fnt" textAlign="center" id="txt12"/>
</e:Group>
<e:Image id="animal1" source="狮子_png" x="201.68" y="651.02" anchorOffsetX="0" width="152.81" anchorOffsetY="0" height="132.72"/>
<e:Image id="animal1" source="狮子_png" x="201.68" y="651.02" anchorOffsetX="0" width="152.81" anchorOffsetY="0" height="132.72" visible="false"/>
<e:Image id="animal2" source="animal1_png" x="232" y="567.5" visible="false"/>
</e:Skin>
\ No newline at end of file
......@@ -149,8 +149,8 @@
</e:Group>
<e:Group id="activitys" x="13.4" y="620.55" touchEnabled="false">
<e:Group id="actIconsGroup" x="12.12" y="0">
<e:Image id="actIconsBg1" source="map2+bg_png" x="-27.15" y="0" visible="false"/>
<e:Image id="actIconsBg2" x="-29.27" y="10" source="map2+bg2_png"/>
<e:Image id="actIconsBg1" source="map2+bg_png" x="-27.15" y="0"/>
<e:Image id="actIconsBg2" x="-29.27" y="10" source="map2+bg2_png" visible="false"/>
<e:Group id="hbRainGroup" x="4.27" y="157.5" width="120" height="120">
<e:Button id="hbRainBtn" label="" y="-1" x="0">
<e:skinName>
......@@ -161,7 +161,7 @@
</e:skinName>
</e:Button>
</e:Group>
<e:Image id="act2Btn" source="map2红包大作战_png" x="157.76" y="159" visible="false"/>
<e:Image id="act2Btn" source="map2红包大作战_png" x="157.76" y="159"/>
</e:Group>
<e:Image id="actsShowBtn" source="map2+_png" x="-7.64" y="5.45"/>
<e:Image id="actTips" source="maphot_png" x="91.52" y="15.72"/>
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="MapTop" width="750" height="1240" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Skin class="MapTop" width="750" height="1305" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image source="map1_jpg" x="0" y="0"/>
<e:Group x="315" y="492" id="icon0">
<e:Group x="448" y="496.04" id="icon0">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="1" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group id="icon1" x="196" y="550.35">
<e:Group id="icon1" x="490" y="625">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="2" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="142" y="744" id="icon2">
<e:Group x="573.33" y="745.37" id="icon2">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="3" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="360" y="803" id="icon3">
<e:Group x="442" y="845.5" id="icon3">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="4" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="513" y="841" id="icon4">
<e:Group x="238.01" y="939.19" id="icon4">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="5" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="440" y="975" id="icon5">
<e:Group x="180" y="1092" id="icon5">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="6" font="nums_fnt" textAlign="center"/>
</e:Group>
<e:Group x="297.01" y="1089.69" id="icon6">
<e:Group x="382.01" y="1194.69" id="icon6">
<e:Image source="icon_png" x="0" y="0"/>
<e:BitmapLabel width="76" x="12" y="18.69" text="7" font="nums_fnt" textAlign="center"/>
</e:Group>
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="RedBombTipsSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image id="rulebtn" source="redbagtips活动规则_png" y="814" horizontalCenter="0.5"/>
<e:Button id="btn" label="" y="692" horizontalCenter="0">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="redbagtips按钮_png" source.down="redbagtips按钮_png" source.disabled="redbagtips按钮_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
</e:Skin>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -642,7 +642,7 @@ export default class MapScene extends Scene {
}
onTap_act2btn() {
PanelCtrl.instance.show("BombTipsPanel");
PanelCtrl.instance.show("BombTips2Panel");
GDispatcher.dispatchEvent('closeActBtn');
}
......
......@@ -26,7 +26,7 @@ export default class RedBagAni {
}
export const createRedBagIcon = (parent)=>{
const icon = RES.getRes('mapredbagicom_png');
const icon = RES.getRes('mapredbagicom2_png');
const bmp = new egret.Bitmap(icon);
bmp.anchorOffsetX=32;
bmp.anchorOffsetY=33;
......
import Panel from "../../libs/new_wx/components/Panel";
import PanelCtrl from "../../libs/new_wx/ctrls/panelCtrl";
import SceneCtrl from "../../libs/new_wx/ctrls/sceneCtrl";
import { createEffect1MovieClip } from "../effect/createEffect1";
import RedBombRule from "./RedBombRule";
import { loadSvga } from "../loadSvga";
import getResPath from "../../libs/new_tc/getResPath";
export default class BombTips2Panel extends Panel {
mv;
async start(data) {
super.start();
this.showlog();
loadSvga(getResPath() + 'resource/assets/svgas/redBombTip.svga').then(
(mv: egret.DisplayObject) => {
mv.y = -190;
this.addChildAt(mv, 1);
this.mv = mv;
mv.addEventListener(egret.Event.COMPLETE, () => {
// @ts-ignore
mv.gotoAndPlay(35, true);
}, this);
}
);
this.touchChildren = this.touchEnabled = false;
await RES.getResAsync('effect1_json');
await RES.getResAsync('effect2_json');
this.touchChildren = this.touchEnabled = true;
}
showlog() {
}
initEvents() {
super.initEvents();
this['btn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapInvite, this);
this['rulebtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapInvite2, this);
}
onTapInvite2() {
const rule = new RedBombRule();
rule.loadSkin();
rule.start();
this.addChild(rule);
}
onTapInvite() {
this['btn'].touchEnabled = false;
const dur = 100;
egret.Tween.get(this.mv).to({alpha: 0}, dur);
const mask = PanelCtrl.instance._mask;
egret.Tween.get(mask).to({alpha: 0}, dur);
egret.Tween.get(this['redbag']).to({scaleX: 0.7, scaleY: 0.7}, 100)
.to({scaleX: 1.5, scaleY: 1.5, alpha: 0}, 300);
setTimeout(() => {
const mc = createEffect1MovieClip();
this.addChild(mc);
}, 200);
setTimeout(() => {
SceneCtrl.instance.currentScene['showRedBagAni']();
}, 400);
setTimeout(() => {
this.hidePanel();
}, 1000);
}
protected get closeBtns(): eui.Button[] {
return [this['closeBtn']]
}
get skinKey() {
return 'RedBombTips2'
}
}
\ No newline at end of file
......@@ -54,7 +54,7 @@ export default class RedBombAlertPanel extends Panel {
this.once(egret.TouchEvent.TOUCH_TAP,()=>{this.hidePanel()},this);
}, this);
setTimeout(()=>{
mv.setImage("img_2349",DataManager.ins.getData('hc_redBombAward').data.option.img)
mv.setImage("img_1951",DataManager.ins.getData('hc_redBombAward').data.option.img)
},100)
});
......
......@@ -4,19 +4,31 @@ import { RecoverName } from "../enum/RecoverName";
export class FesRedBombShowAni extends egret.DisplayObjectContainer {
// 红包
// constructor() {
// super()
// var textureDown: egret.Texture = RES.getRes("fesRedBombSta1_png");
// var down = new egret.Bitmap(textureDown);
// down.x = -textureDown.textureWidth / 2;
// down.y = -textureDown.textureHeight / 2;
// this.addChild(down);
// var textureUp: egret.Texture = RES.getRes("xingxingbi_png");
// var up = new egret.Bitmap(textureUp);
// up.x = -textureUp.textureWidth / 2; //-89
// up.y = -100;
// this.addChild(up);
// }
// 铃铛
constructor() {
super()
var textureDown: egret.Texture = RES.getRes("fesRedBombSta1_png")
var textureDown: egret.Texture = RES.getRes("fesRedBombSta2_png");
var down = new egret.Bitmap(textureDown);
down.x = -textureDown.textureWidth / 2;
down.y = -textureDown.textureHeight / 2;
this.addChild(down);
var textureUp: egret.Texture = RES.getRes("xingxingbi_png");
var up = new egret.Bitmap(textureUp);
up.x = -textureUp.textureWidth / 2; //-89
up.y = -100;
this.addChild(up);
}
play(position: number[], callback: Function) {
this.scaleX = this.scaleY = 0.29;
......
import { ImageAni } from "../class/ImageAni";
import { Pool } from "../Pool";
import { RecoverName } from "../enum/RecoverName";
import { Element } from "../class/Element";
import { Tool } from "../Tool";
import { ElementType } from "../enum/ElementType";
export const stepPosition: number[] = [125, 115];
/**
* 需要回调的
* 手动修改this.shoot.rotation=
*/
export class FesRedShootAni2 extends egret.DisplayObjectContainer {
light: LightingAni;
imageAni: ImageAni;
imageAniCon: egret.DisplayObjectContainer
constructor() {
super()
this.light = new LightingAni();
this.addChild(this.light);
var arr = []
for (var i = 1; i <= 10; i++) {
arr.push("fesEleSmallDis" + i + "_png");
}
this.imageAniCon = new egret.DisplayObjectContainer();
this.imageAni = new ImageAni(arr);
this.imageAniCon.addChild(this.imageAni);
this.addChild(this.imageAniCon);
this.imageAni.visible = false
}
reset() {
this.light.visible = true;
this.imageAni.visible = false;
this.light.scaleX = 0.2;
}
play(startP: number[], ele: Element, callback: Function) {
this.reset()
//算角度
var r = Tool.getForwardRotation(startP, [ele.x, ele.y])
this.light.rotation = r * 180 / Math.PI;
this.light.x = startP[0];
this.light.y = startP[1];
this.imageAniCon.x = ele.x;
this.imageAniCon.y = ele.y;
//247
var dis = Math.sqrt(
(startP[0] - ele.x) * (startP[0] - ele.x) +
(startP[1] - ele.y) * (startP[1] - ele.y)
)
var scaleX = dis / 247;
egret.Tween.get(this.light)
.to({ scaleX: scaleX, }, 400)
.call(() => {
ele.reset(ElementType.FESTIVALELE_SMALL);
ele.scaleX = ele.scaleY = 0.1
egret.Tween.get(ele)
.to({ scaleX: 1, scaleY: 1 }, 500, egret.Ease.backOut)
//回调
callback();
this.imageAni.visible = true;
this.imageAni.play(() => {
if (this.$parent) {
this.$parent.removeChild(this)
};
Pool.recover(RecoverName.FESREDSHOOT_ANI2, this)
})
setTimeout(() => {
this.light.visible = false;
}, 200)
})
}
}
class LightingAni extends egret.Bitmap {
sourceAll: string[];
currentFrame: number;
totalFrames: number;
isPlay: boolean;
startTime: number
/**
* 所有时间,帧数按每秒30
*/
allTime: number
/**
* 播放完的回调
*/
constructor() {
super();
var arr = [];
for (var i = 1; i <= 13; i++) {
arr.push("lineLight" + i + "_png")
}
this.anchorOffsetX = 23;
this.anchorOffsetY = 27;
this.sourceAll = arr;
this.texture = RES.getRes(this.sourceAll[0])
this.currentFrame = 0;
this.totalFrames = arr.length;
this.addEventListener(egret.Event.ENTER_FRAME, this.onEnterFrame, this)
this.startTime = Date.now()
this.allTime = this.sourceAll.length / 30 * 1000;
}
onEnterFrame() {
if (!this.stage) return
var dataNow = Date.now();
var deltaTime = dataNow - this.startTime;
var scale = deltaTime / this.allTime;
if (scale >= 1) {
this.startTime = Date.now()
this.currentFrame = 0;
} else {
this.currentFrame = (scale * this.sourceAll.length) >> 0;
}
this.texture = RES.getRes(this.sourceAll[this.currentFrame])
}
}
This diff is collapsed.
......@@ -286,11 +286,6 @@ class Status3 extends egret.DisplayObjectContainer {
.to({ x: 86 - offset, y: 60 - offset }, 100)
.wait(500);
})
}
play(callback: Function) {
......
import { loadSvga } from "../../loadSvga";
import getResPath from "../../../libs/new_tc/getResPath";
import MovieClip from "../../movieclip/MovieClip";
/**
* 节日元素
*
*/
export class FestivalEle2 extends egret.DisplayObjectContainer {
/**
* 是否要分裂了
*/
isActive: boolean;
/**
* 状态变化 2 1 0 再往后,可分裂
*/
private _statusNum: number;
get statusNum() {
return this._statusNum
}
set statusNum(value: number) {
if(value >= 0) {
//播放原来的动画
let child = this.$children[this._statusNum];
child["play"](() => {
//切换
this.toggleStatus(value);
})
this._statusNum = value;
} else {
//不用动画
this._statusNum = 0;
this.isActive = true;
}
}
constructor(n: number = 2) {
super();
var status3 = new Status3();
this.addChild(status3);
var status2 = new Status2();
this.addChild(status2);
var status1 = new Status1();
this.addChild(status1);
this.toggleStatus(n);
this.isActive = false;
this._statusNum = n;
}
reset(n: number = 2) {
this.toggleStatus(n);
this.isActive = false;
this._statusNum = n;
}
toggleStatus(index: number) {
for(var i = 0; i < this.$children.length; i++) {
var child = this.$children[i];
if(i == index) {
child.visible = true;
//重置状态
child["reset"]();
} else {
child.visible = false;
}
}
}
}
//第一种状态
class Status1 extends egret.DisplayObjectContainer {
mv;
constructor() {
super();
loadSvga(getResPath() + 'resource/assets/svgas/铃铛01.svga').then(
(mv: egret.DisplayObject) => {
mv.x = -60;
mv.y = -60;
this.mv = mv;
this.addChild(mv);
}
);
}
reset() {
this.mv && function() {
this.mv.visible = true;
this.mv.gotoAndPlay(1, true);
}.bind(this)();
}
play(callback: Function) {
this.mv.stop();
this.mv.visible = false;
loadSvga(getResPath() + 'resource/assets/svgas/铃铛01变02.svga').then(
(mv: MovieClip) => {
mv.x = -60;
mv.y = -60;
this.addChild(mv);
mv.addEventListener(egret.Event.COMPLETE, () => {
this.removeChild(mv);
callback();
}, this);
}
);
}
}
//第二种状态
class Status2 extends egret.DisplayObjectContainer {
mv;
constructor() {
super();
loadSvga(getResPath() + 'resource/assets/svgas/铃铛02.svga').then(
(mv: egret.DisplayObject) => {
mv.x = -60;
mv.y = -60;
this.mv = mv;
this.addChild(mv);
}
);
}
reset() {
this.mv && function() {
this.mv.visible = true;
this.mv.gotoAndPlay(1, true);
}.bind(this)();
}
play(callback: Function) {
this.mv.stop();
this.mv.visible = false;
callback();
}
}
class Status3 extends egret.DisplayObjectContainer {
mv;
constructor() {
super();
loadSvga(getResPath() + 'resource/assets/svgas/铃铛03.svga').then(
(mv: egret.DisplayObject) => {
mv.x = -60;
mv.y = -60;
this.mv = mv;
this.addChild(mv);
}
);
}
reset() {
this.mv && function() {
this.mv.visible = true;
this.mv.gotoAndPlay(1, true);
}.bind(this)();
}
play(callback: Function) {
this.mv.stop();
this.mv.visible = false;
callback();
}
}
\ No newline at end of file
......@@ -28,8 +28,7 @@ export enum ElementType {
//特殊元素 ,节日元素
FESTIVALELE_BIG, //节日元素大中间一个13
FESTIVALELE_SMALL //节日元素飞溅的小元素14
FESTIVALELE_SMALL, //节日元素飞溅的小元素14
}
/**
......
......@@ -23,9 +23,10 @@ export enum RecoverName {
HAIRBALLBROWNDIVIDE_ANI = "HairballBrownDivideAni",
HAIRBALLJUMP_ANI = "HairballJumpAni", //三种毛球是一样的动画
FESREDBOMBSHOW_ANI = "FesRedBombShowAni",
FESREDBOMBSHOW2_ANI = 'FesRedBombShow2Ani',
FESREDSHOOT_ANI="FesRedShootAni",
FESREDSHOOT_ANI = "FesRedShootAni",
FESREDSHOOT_ANI2 = "FesRedShootAni",
//元素身上,特效常驻动效
......
......@@ -17,6 +17,7 @@ import { HairballBrownDivideAni } from "../anis/HairballBrownDivideAni";
import { NetManager } from "../../../libs/tw/manager/NetManager";
import { getRotByTwoVectors } from "../anis/MagicRotateAni";
import { FesRedShootAni } from "../anisCall/FesRedShootAni";
import { FesRedShootAni2 } from "../anisCall/FesRedShootAni2";
//孵鸡的数量
const chickenNum: number = 4;
......@@ -160,8 +161,10 @@ export class AiControl {
let endIndex = six[a];
let lat = thisObj.lattices[endIndex];
let ele = lat.element;
let fesRedShootAni: FesRedShootAni = Pool.takeOut(RecoverName.FESREDSHOOT_ANI)
if (!fesRedShootAni) fesRedShootAni = new FesRedShootAni();
// let fesRedShootAni: FesRedShootAni = Pool.takeOut(RecoverName.FESREDSHOOT_ANI);
// if (!fesRedShootAni) fesRedShootAni = new FesRedShootAni();
let fesRedShootAni: FesRedShootAni2 = Pool.takeOut(RecoverName.FESREDSHOOT_ANI2);
if (!fesRedShootAni) fesRedShootAni = new FesRedShootAni2();
setTimeout(() => {
thisObj.addChild(fesRedShootAni);
fesRedShootAni.play(p, ele, () => {
......
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