Commit e4e3157b authored by zjz1994's avatar zjz1994

炮台石头移除特效

parent 94f27fa6
......@@ -413,6 +413,8 @@ export default class MainScene extends Scene {
var svgas = ["amazing", "great", "wonderful", "bonusTime"];
//如果有节日的加
if (this.festivalTarget) svgas.push("redBombLight");
//到时候用炮台石头的替换todo
svgas.push("canno");
for (let i = 0; i < svgas.length; i++) {
if (movieClips[svgas[i]]) continue;
......@@ -421,10 +423,14 @@ export default class MainScene extends Scene {
svgaParser.load(resPath + 'resource/assets/svgas/' + svgas[i] + ".svga", (videoItem) => {
var mv = new window["SVGA"].EgretMovieClip(videoItem);
mv.lockStep = true;
if (svgas[i] != "bonusTime") {
if(svgas[i]=="canno"){
}
else if (svgas[i] != "bonusTime") {
mv.x = (750 - 520) / 2;
mv.y = 500;
}
mv.stop();
let fun;
mv.addEventListener(egret.Event.COMPLETE, fun = function (e) {
......@@ -3715,6 +3721,18 @@ export default class MainScene extends Scene {
removeCannoBlock(index:number){
this.removeOperation(index);
//炮台石头的动效
var blockmv = movieClips["canno"];
if(blockmv){
console.log("播放炮台石头的动效");
var blpos = Tool.getPositionByIndex(index);
var bwpos = this.elementContainer.localToGlobal(blpos[0],blpos[1]);
var blockwid = 116;
var blockhei = 116;
blockmv.x = bwpos.x-blockwid/2;
blockmv.y = bwpos.y-blockhei/2;
this.addChild(blockmv);
blockmv.gotoAndPlay(1,1);
}
}
/**
* 果冻的移除,包括动效
......
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