|
@@ -36,8 +36,9 @@ export default class TipSystem extends cc.Component {
|
|
|
/**
|
|
/**
|
|
|
* 弹出tips
|
|
* 弹出tips
|
|
|
* @param str
|
|
* @param str
|
|
|
|
|
+ * @param type 弹窗类型 0正常中间弹 1弹到最顶上
|
|
|
*/
|
|
*/
|
|
|
- public async pop(str: string) {
|
|
|
|
|
|
|
+ public async pop(str: string,type:number=0) {
|
|
|
let node = await mk.pool.getPrefab("game/prefab/tips");
|
|
let node = await mk.pool.getPrefab("game/prefab/tips");
|
|
|
let node_bg = node.getChildByName("bg");
|
|
let node_bg = node.getChildByName("bg");
|
|
|
let node_lbl = node.getChildByName("lbl");
|
|
let node_lbl = node.getChildByName("lbl");
|
|
@@ -53,6 +54,11 @@ export default class TipSystem extends cc.Component {
|
|
|
node.parent = this.node;
|
|
node.parent = this.node;
|
|
|
node.x = this.src_x;
|
|
node.x = this.src_x;
|
|
|
node.y = this.src_y;
|
|
node.y = this.src_y;
|
|
|
|
|
+ if(type == 1){
|
|
|
|
|
+ this.tween_time = 2;
|
|
|
|
|
+ node.y = 400;
|
|
|
|
|
+ this.tar_y = 800;
|
|
|
|
|
+ }
|
|
|
cc.tween(node)
|
|
cc.tween(node)
|
|
|
.to(this.tween_time, { x: this.tar_x, y: this.tar_y })
|
|
.to(this.tween_time, { x: this.tar_x, y: this.tar_y })
|
|
|
.call(() => {
|
|
.call(() => {
|