コード例 #1
0
 public Condition()
 {
     expanded  = true;
     parameter = ePARAMETER.None;
     trigger   = eTRIGGER.Constant;
     tunings   = new Condition.Tuning[XParticleLevel.QUALITY_COUNT];
     for (var i = 0; i < XParticleLevel.QUALITY_COUNT; ++i)
     {
         tunings[i] = new Condition.Tuning();
     }
 }
コード例 #2
0
    private void SetParameter(ePARAMETER parameter, float val)
    {
        if (_particleSystem == null)
        {
            Debug.LogError("there is NO particle system!");
            return;
        }

        ParticleSystem.MainModule     mainModule  = _particleSystem.main;
        ParticleSystem.EmissionModule emissModule = _particleSystem.emission;
        switch (parameter)
        {
        case (ePARAMETER.EmissionRate):
            emissModule.rate = new ParticleSystem.MinMaxCurve(val);
            break;

        case (ePARAMETER.MaxParticles):
            mainModule.maxParticles = (int)val;
            break;

        case (ePARAMETER.StartingLifeSpan):
            mainModule.startLifetime = val;
            break;

        case (ePARAMETER.StartingSize):
            mainModule.startSize = val;
            break;

        case (ePARAMETER.StartingSpeed):
            mainModule.startSpeed = val;
            break;

        case (ePARAMETER.StartingRotation):
            mainModule.startRotation = val;
            break;

        case (ePARAMETER.GravityMultiplier):
            mainModule.gravityModifier = val;
            break;

        case (ePARAMETER.None):
            break;

        default:
            break;
        }
    }
コード例 #3
0
    private void SetParameter(ePARAMETER parameter, Color val)
    {
        if (_particleSystem == null)
        {
            Debug.LogError("there is NO particle system!");
            return;
        }

        ParticleSystem.MainModule mainModule = _particleSystem.main;
        switch (parameter)
        {
        case (ePARAMETER.StartingColor):
            mainModule.startColor = val;
            break;

        default:
            break;
        }
    }