using QFramework;
using UnityEngine;
public class ParticleMsg : MonoSingleton
{
public int indexPre = 0;
public GameObject[] effectGo; // 粒子特效预设体数组
Vector3 point; // 保存粒子生成的初始坐标
///
///
///
/// 粒子生成坐标
/// 生成的粒子下标
/// 生成的粒子生命周期
public void BubbleSpawn(Vector2 spawnPos, int index, float lifeTimer)
{
point = new Vector3(spawnPos.x, spawnPos.y, 1f);//获得鼠标点击点
point = GameObject.Find("UICamera").GetComponent().ScreenToWorldPoint(point);//从屏幕空间转换到世界空间
GameObject go = Instantiate(effectGo[index], transform, true);
go.transform.localPosition = point;
Destroy(go, lifeTimer);
}
// 传一个UI Recttransform 生成屏幕粒子
pu