コード例 #1
0
        internal ParticleElementTemplate(ParticleElement element)
        {
            this.element  = element;
            this.partSys  = element.partSys;
            this.partRend = element.partRend;


            this.main = this.partSys.main;


            this.collision         = this.partSys.collision;
            this.collision.enabled = false;

            this.colorBySpeed         = this.partSys.colorBySpeed;
            this.colorBySpeed.enabled = false;

            this.colorOverLifetime         = this.partSys.colorOverLifetime;
            this.colorOverLifetime.enabled = false;

            this.customData         = this.partSys.customData;
            this.customData.enabled = false;

            this.emission         = this.partSys.emission;
            this.emission.enabled = false;

            this.externalForces         = this.partSys.externalForces;
            this.externalForces.enabled = false;

            this.forceOverLifetime         = this.partSys.forceOverLifetime;
            this.forceOverLifetime.enabled = false;

            this.inheritVelocity         = this.partSys.inheritVelocity;
            this.inheritVelocity.enabled = false;

            this.lights         = this.partSys.lights;
            this.lights.enabled = false;

            this.limitVelocityOverLifetime         = this.partSys.limitVelocityOverLifetime;
            this.limitVelocityOverLifetime.enabled = false;

            this.noise         = this.partSys.noise;
            this.noise.enabled = false;

            this.rotationBySpeed         = this.partSys.rotationBySpeed;
            this.rotationBySpeed.enabled = false;

            this.rotationOverLifetime         = this.partSys.rotationOverLifetime;
            this.rotationOverLifetime.enabled = false;

            this.shape         = this.partSys.shape;
            this.shape.enabled = false;

            this.sizeBySpeed         = this.partSys.sizeBySpeed;
            this.sizeBySpeed.enabled = false;

            this.sizeOverLifetime         = this.partSys.sizeOverLifetime;
            this.sizeOverLifetime.enabled = false;

            this.subEmitters         = this.partSys.subEmitters;
            this.subEmitters.enabled = false;

            this.textureSheetAnimation         = this.partSys.textureSheetAnimation;
            this.textureSheetAnimation.enabled = false;

            this.trails         = this.partSys.trails;
            this.trails.enabled = false;

            this.trigger         = this.partSys.trigger;
            this.trigger.enabled = false;

            this.velocityOverLifetime         = this.partSys.velocityOverLifetime;
            this.velocityOverLifetime.enabled = false;
        }
コード例 #2
0
ファイル: ParticleElement.cs プロジェクト: Reinms/RoR2Modding
 private ParticleElement(ParticleElement orig, GameObject newObj, EffectCategory newParent) : base(orig, newObj, newParent)
 {
     this.partSys  = newObj.GetComponent <ParticleSystem>();
     this.partRend = newObj.GetComponent <ParticleSystemRenderer>();
 }