12345678910111213141516171819202122232425262728293031 |
- import { Component } from "cc";
- import { Framework } from "../Framework";
- export class InteractiveUtil {
- /**
- * 添加事件
- * @param data 需要的参数数据
- * @param name 参数名
- * @param back 方法回调
- */
- // postData(mod, act,data,paramArr:Array<string>,back:Function) {
- // if(data){
- // back()
- // }else{
- // console.log(mod+`中${act}返回数据找不到的`);
- // }
- // }
- postData(data, name, back: Function) {
- if (data) {
- back()
- } else {
- console.log(name + '返回数据找不到');
- Framework.tips.setTips('error')
- }
- }
- }
- export let IntaUtil = new InteractiveUtil;
|