public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        LPParticleSystem sys = (LPParticleSystem)target;

        if (GUILayout.Button("Save"))
        {
            sys.Save();
        }
    }
Beispiel #2
0
    /// <summary>Create this particle group in the simulation</summary>
    public void Initialise(LPParticleSystem s)
    {
        sys = s;
        IntPtr shape = GetShape();

        ThingPtr = LPAPIParticleGroups.CreateParticleGroup(sys.GetPtr(), getPartNum(), getGroupNum(), 0f, Strenght, AngularVelocity
                                                           , LinearVelocity.x, LinearVelocity.y
                                                           , shape
                                                           , (int)(_Color.r * 255f), (int)(_Color.g * 255f), (int)(_Color.b * 255f), (int)(_Color.a * 255f)

                                                           , Stride, LifeTime, UserData);
        LPAPIUtility.ReleaseShape(shape);

        if (SubPtrs != null && ParticlesMaterial != null && (ParticlesMaterial.elastic || ParticlesMaterial.spring))
        {
            foreach (IntPtr groupptr in SubPtrs)
            {
                LPAPIParticleGroups.JoinParticleGroups(sys.GetPtr(), ThingPtr, groupptr);
            }
        }
    }
 void Start()
 {
     sys = FindObjectOfType<LPManager>().ParticleSystems[ParticleSystemImIn];
     Shape = GetComponent<LPFixture>().GetShape();
 }
 // Use this for initialization
 void Start()
 {
     partsys = FindObjectOfType<LPParticleSystem>();
     bod = GetComponent<LPBody>();
 }
 public void Initialise(LPParticleSystem partsys)
 {
     GetComponent<ParticleEmitter>().maxSize = GetComponent<ParticleEmitter>().minSize = partsys.ParticleRadius*ParticleDrawScale;
 }
Beispiel #6
0
 void Start()
 {
     sys   = FindObjectOfType <LPManager>().ParticleSystems[ParticleSystemImIn];
     Shape = GetComponent <LPFixture>().GetShape();
 }
 // Use this for initialization
 void Start()
 {
     partsys = FindObjectOfType <LPParticleSystem>();
     bod     = GetComponent <LPBody>();
 }
 // Use this for initialization
 void Start()
 {
     sys = GameObject.FindObjectOfType <LPParticleSystem>();
     StartCoroutine("SplitGroup");
 }
 public void Initialise(LPParticleSystem partsys)
 {
     GetComponent <ParticleEmitter>().maxSize = GetComponent <ParticleEmitter>().minSize = partsys.ParticleRadius * ParticleDrawScale;
 }
Beispiel #10
0
 void Start()
 {
     group = GetComponent <LPParticleGroup>();
     sys   = FindObjectOfType <LPManager>().ParticleSystems[group.ParticleSystemImIn];
     StartCoroutine("Melt");
 }
    /// <summary>Create this particle group in the simulation</summary>	
    public void Initialise(LPParticleSystem s)
    {
        sys = s;
        IntPtr shape = GetShape();
        ThingPtr = LPAPIParticleGroups.CreateParticleGroup(sys.GetPtr(),getPartNum(),getGroupNum(),0f,Strenght,AngularVelocity
                                                           ,LinearVelocity.x,LinearVelocity.y
                                                           ,shape
                                                           ,(int)(_Color.r*255f),(int)(_Color.g*255f),(int)(_Color.b*255f),(int)(_Color.a*255f)

                                                                                                          ,Stride,LifeTime,UserData);
        LPAPIUtility.ReleaseShape(shape);

        if (SubPtrs !=null && ParticlesMaterial !=null && (ParticlesMaterial.elastic || ParticlesMaterial.spring))
        {
            foreach (IntPtr groupptr in SubPtrs)
            {
                LPAPIParticleGroups.JoinParticleGroups(sys.GetPtr(),ThingPtr,groupptr);
            }
        }
    }
Beispiel #12
0
 void Start()
 {
     group = GetComponent<LPParticleGroup>();
     sys = FindObjectOfType<LPManager>().ParticleSystems[group.ParticleSystemImIn];
     StartCoroutine("Melt");
 }