private IEnumerator Melt() { yield return(new WaitForSeconds(waittime)); if (mat != null) { LPAPIParticleGroups.SetParticleFlagsInGroup(sys.GetPtr(), group.GetPtr(), mat.GetInt()); } else { LPAPIParticleGroups.SetParticleFlagsInGroup(sys.GetPtr(), group.GetPtr(), 0); } Debug.Log("flags set"); }
protected override void DoSpawn() { Vector3 diff = getdiff(); if (!SpawnOnlyOneParticle) { pg.LinearVelocity = new Vector2(diff.x, diff.y); pg.Initialise(lpman.ParticleSystems[pg.ParticleSystemImIn]); if (JoinGroups) { if (first) { first = false; } else { LPAPIParticleGroups.JoinParticleGroups(lpman.ParticleSystems[pg.ParticleSystemImIn].GetPtr() , lastgroup, pg.GetPtr()); } lastgroup = pg.GetPtr(); } } else { int mat = 0; if (pg.ParticlesMaterial != null) { mat = pg.ParticlesMaterial.GetInt(); } LPAPIParticles.CreateParticleInSystem(lpman.ParticleSystems[pg.ParticleSystemImIn].GetPtr() , mat, transform.position.x, transform.position.y, diff.x, diff.y , (int)(pg._Color.r * 255f), (int)(pg._Color.g * 255f), (int)(pg._Color.b * 255f), (int)(pg._Color.a * 255f) , pg.LifeTime); } }