Пример #1
0
    public ModuleArtParticleEffectData(ModuleArtParticleEffectData cosmeticParticleEffectData)
    {
        id       = cosmeticParticleEffectData.id;
        parentId = cosmeticParticleEffectData.parentId;

        name     = cosmeticParticleEffectData.name;
        position = cosmeticParticleEffectData.position;
        rotation = cosmeticParticleEffectData.rotation;
        scale    = cosmeticParticleEffectData.scale;
        tags     = cosmeticParticleEffectData.tags;

        shapeScale          = cosmeticParticleEffectData.shapeScale;
        sizeMultiplier      = cosmeticParticleEffectData.sizeMultiplier;
        colorOverDuration   = new SerializableGradient(cosmeticParticleEffectData.colorOverDuration);
        effectTextureIndex  = cosmeticParticleEffectData.effectTextureIndex;
        simulationSpace     = cosmeticParticleEffectData.simulationSpace;
        duration            = cosmeticParticleEffectData.duration;
        particleLifetimeMin = cosmeticParticleEffectData.particleLifetimeMin;
        particleLifetimeMax = cosmeticParticleEffectData.particleLifetimeMax;
        loop         = cosmeticParticleEffectData.loop;
        gravity      = cosmeticParticleEffectData.gravity;
        speed        = cosmeticParticleEffectData.speed;
        maxParticles = cosmeticParticleEffectData.maxParticles;
        emissionRate = cosmeticParticleEffectData.emissionRate;
        shape        = cosmeticParticleEffectData.shape;

        rotationMin = cosmeticParticleEffectData.rotationMin;
        rotationMax = cosmeticParticleEffectData.rotationMax;

        if (cosmeticParticleEffectData.sizeOverLifetime == null)
        {
            sizeOverLifetime = new SerializableCurve(Vector2.zero, Vector2.one * 0.25f, Vector2.one * 0.75f, Vector2.one);
        }
        else
        {
            sizeOverLifetime = cosmeticParticleEffectData.sizeOverLifetime;
        }
    }
Пример #2
0
 internal override void PopulateData(ModuleData objectData)
 {
     _data = new ModuleArtParticleEffectData((ModuleArtParticleEffectData)objectData);
     ApplyData();
 }