Commit 77331f5c authored by wildfirecode's avatar wildfirecode

Merge branch '225' into dev

parents e297bc12 50d6ea08
......@@ -70,10 +70,11 @@ export default class MapScene extends Scene {
var codeMsgs = {//具体code还没给
"2002002016": "不可以给自己助力哦~",//
"2002002036": "已经给好友助力过了哦~",
"2002002037": "已经给好友助力过了哦~",
// "2002002037": "已经给好友助力过了哦~",
"2002002025": "今日助力次数已达上限啦!",
//新加的
//新加的,还没给,其他的都用助力失败
"2002002013": "口令无效,请复制正确的口令!",
"2002002015": "口令不存在",
}
showToast(res && codeMsgs[res.code] ? codeMsgs[res.code] : "助力失败");
}
......@@ -455,7 +456,7 @@ export default class MapScene extends Scene {
// this['guide'].visible = false;
// return;
// }
if(this['actsShowBtn'].visible)
if (this['actsShowBtn'].visible)
this['guide'].visible = true;
// });
......
......@@ -121,6 +121,8 @@ class ShareCodePanel extends ComponentBase {
start() {
super.start();
this.height = this.stage.stageHeight;
//字体修改
this.msg.fontFamily = "FZY3JW"
//
// if (!document.getElementById("kouling")){
// var a='<div id="kouling" style="display:none" data-clipboard-text=""></div>';
......
import { Ani } from "../class/Ani";
import { ImageAni } from "../class/ImageAni";
import { ElementType, FiveBaseElementTypes } from "../enum/ElementType";
import { Pool } from "../Pool";
//原点已是中心
export class EleDisAni extends Ani {
......@@ -26,4 +28,60 @@ export class EleDisAni extends Ani {
this.recover();
})
}
}
\ No newline at end of file
}
var recoverName: string = "EleDisAniNew";
/**
* 新增5种普通消除动效
* 不继承Ani了,自己回收
*/
class EleDisAniNew extends egret.DisplayObjectContainer {
/**
* 粗犷一点吧
*/
showImage0: ImageAni;
showImage1: ImageAni;
showImage2: ImageAni;
showImage3: ImageAni;
showImage4: ImageAni;
constructor() {
super()
for (var i = 0; i < 5; i++) {
var arr = []
for (var j = 1; j <= 19; j++) arr.push("eleDisNew" + i + "_" + j + "_png");//改图片
this["showImage" + i] = new ImageAni(arr);
this["showImage" + i].visible = false;
this.addChild(this["showImage" + i])
}
}
play(type: ElementType) {
//如果不是5种基础元素,就用第0种
if (FiveBaseElementTypes.indexOf(type) < 0) type = ElementType.RABBIT;
var target: ImageAni = this["showImage" + type];
target.visible = true;
target.currentFrame = 0;
target.source = target.sourceAll[0];
target.play(() => {
target.visible = false;
if (this.parent) this.parent.removeChild(this);
Pool.recover(recoverName, this);
})
}
}
/**
* 新加的方法,直接调用播放消除动效
* @param type 5种基础类型
* @param p 位置信息
*/
export function playEleDisAniNew(type: ElementType, p: number[]) {
let ani: EleDisAniNew = Pool.takeOut(recoverName);
if (!ani) ani = new EleDisAniNew();
ani.x = p[0];
ani.y = p[1];
ani.play(type);
return ani;
}
\ 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