ShowToast(msg) {
let tips = [];
let label;
if (tips.length <= 0) {
label = new Laya.Label("");
label.fontSize = 35;
label.color = "#ff0000";
label.bold = true;
Laya.stage.addChild(label);
label.visible = false;
tips.push(label);
}
label = tips.shift();
label.text = msg;
label.x = (Laya.stage.width - label.width) / 2;
label.y = (Laya.stage.height - label.height) / 2;
let y = label.y - 200;
label.visible = true;
label.alpha = 1;
label.zOrder = 5;
Laya.Tween.to(label, { y: y, alpha: 0 }, 1 * 1000, Laya.Ease.linearNone, Laya.Handler.create(this, () => {
label.visible = false;
tips.push(label);
}));
}