void Start() { pg = GetComponent<LPParticleGroup>(); nowcol = pg._Color; destcol = new Color(Random.Range(0f,1f),Random.Range(0f,1f),Random.Range(0f,1f),Random.Range(0.2f,1f)); StartCoroutine("changecol"); }
void Start() { pg = GetComponent <LPParticleGroup>(); nowcol = pg._Color; destcol = new Color(Random.Range(0f, 1f), Random.Range(0f, 1f), Random.Range(0f, 1f), Random.Range(0.2f, 1f)); StartCoroutine("changecol"); }
protected override void Start2() { if(pg == null)pg = GetComponent<LPParticleGroup>(); #if UNITY_EDITOR if(GameObject.FindObjectOfType<LPParticleSystem>() == null) { Debug.LogError("There is no ParticleSystem. You must have one in your scene particles in Liquid Physics 2D to work"); return; } #endif }
protected override void Start2() { if (pg == null) { pg = GetComponent <LPParticleGroup>(); } #if UNITY_EDITOR if (GameObject.FindObjectOfType <LPParticleSystem>() == null) { Debug.LogError("There is no ParticleSystem. You must have one in your scene particles in Liquid Physics 2D to work"); return; } #endif }
private void SetPositionToGroupCenteroid() { // Set the position to the particle group center LPParticleGroup group = GetComponent <LPParticleGroup>(); Vector2 center = group.GetCenter(); if (!(float.IsNaN(center.x)) && !(float.IsNaN(center.y))) { transform.position = new Vector3(center.x, center.y, startZ); } else { transform.position = new Vector3(-1000, -1000, -1000); } }
public LPParticleGroup[] GetGroupDataFromPlugin() { int groupCount = LPAPIParticleSystems.GetParticleGroupCount(PartSysPtr); Groups = new LPParticleGroup[groupCount]; if (groupCount > 0) { IntPtr groupsPointer = LPAPIParticleSystems.GetParticleGroupPointers(PartSysPtr); IntPtr[] groupThingPtrs = new IntPtr[groupCount]; Marshal.Copy(groupsPointer, groupThingPtrs, 0, groupCount); for (int i = 0; i < groupCount; i++) { Groups[i] = new LPParticleGroup(); Groups[i].SetThingPtr(groupThingPtrs[i]); //Debug.Log("Group " + i + " has " + Groups[i].GetParticleCount()); } } return(Groups); }
void Start() { group = GetComponent <LPParticleGroup>(); sys = FindObjectOfType <LPManager>().ParticleSystems[group.ParticleSystemImIn]; StartCoroutine("Melt"); }
void Start() { group = GetComponent<LPParticleGroup>(); sys = FindObjectOfType<LPManager>().ParticleSystems[group.ParticleSystemImIn]; StartCoroutine("Melt"); }