Ejemplo n.º 1
0
    public void LoadFromJson(string jsonString)
    {
        _settings = Instantiate(SourceSettings.DefaultSettings);
        _settings.CopyValuesFrom(jsonString);

        ApplyJsonValues();
    }
Ejemplo n.º 2
0
    public void SetNewDefault(PsyiaSettings newSettings)
    {
        DefaultSettings = newSettings;

        SetMaxParticleCount(DefaultSettings.System.MaxParticleCount, false);
        SetAntialiasing((int)DefaultSettings.System.Antialiasing, true);
        SetBloom(DefaultSettings.System.Bloom, true);

        SetParticleForm((int)DefaultSettings.Visual.ParticleForm, true);
        SetParticleColor((int)DefaultSettings.Visual.ParticleColor, true);
        SetParticleSize(DefaultSettings.Visual.ParticleSize, true);
        SetLineLength(DefaultSettings.Visual.LineLength, true);
        SetParticleShape((int)DefaultSettings.Visual.ParticleShape, true);

        SetParticleMass(DefaultSettings.Physics.ParticleMass, true);
        SetParticleDamping(DefaultSettings.Physics.ParticleDamping, true);
        SetFloorCollision(DefaultSettings.Physics.FloorCollision, true);

        SetVisualAudioreactivity(DefaultSettings.Audio.VisualsAudioreactivity, true);
        SetPhysicsAudioreactivity(DefaultSettings.Audio.PhysicsAudioreactivity, true);
        SetVolume(DefaultSettings.Audio.Volume, true);
        SetLoop(DefaultSettings.Audio.Loop, true);
        SetSlowWithTime(DefaultSettings.Audio.SlowWithTime, true);

        SetSymmetry((int)DefaultSettings.Controller.ControllerSymmetry, true);
        SetControllerModels(DefaultSettings.Controller.ControllerModels, true);
        SetControllerDistance(DefaultSettings.Controller.ControllerDistance, true);
        SetControllerHaptics(DefaultSettings.Controller.ControllerHaptics, true);

        SetLeftForceShape((int)DefaultSettings.ForceLeft.ForceShape, true);
        SetLeftForceAttenuationMode((int)DefaultSettings.ForceLeft.ForceAttenuation, true);
        SetLeftForceStrength(DefaultSettings.ForceLeft.ForceStrength, true);
        SetLeftForceAttenuationDistance(DefaultSettings.ForceLeft.AttenuationDistance, true);
        SetLeftForceAttenuationSofteningFactor(DefaultSettings.ForceLeft.SofteningFactor, true);
        SetLeftForceAttenuationWavelength(DefaultSettings.ForceLeft.Wavelength, true);

        SetRightForceShape((int)DefaultSettings.ForceRight.ForceShape, true);
        SetRightForceAttenuationMode((int)DefaultSettings.ForceRight.ForceAttenuation, true);
        SetRightForceStrength(DefaultSettings.ForceRight.ForceStrength, true);
        SetRightForceAttenuationDistance(DefaultSettings.ForceRight.AttenuationDistance, true);
        SetRightForceAttenuationSofteningFactor(DefaultSettings.ForceRight.SofteningFactor, true);
        SetRightForceAttenuationWavelength(DefaultSettings.ForceRight.Wavelength, true);

        SetLeftEmitterCount(DefaultSettings.EmitterLeft.EmitterCount, true);
        SetLeftEmitterRadius(DefaultSettings.EmitterLeft.EmitterRadius, true);
        SetLeftEmitterVelocity(DefaultSettings.EmitterLeft.EmitterVelocity, true);
        SetLeftEmitterVelocitySpread(DefaultSettings.EmitterLeft.VelocitySpread, true);
        SetLeftEmitterInheritVelocity(DefaultSettings.EmitterLeft.InheritVelocity, true);

        SetRightEmitterCount(DefaultSettings.EmitterRight.EmitterCount, true);
        SetRightEmitterRadius(DefaultSettings.EmitterRight.EmitterRadius, true);
        SetRightEmitterVelocity(DefaultSettings.EmitterRight.EmitterVelocity, true);
        SetRightEmitterVelocitySpread(DefaultSettings.EmitterRight.VelocitySpread, true);
        SetRightEmitterInheritVelocity(DefaultSettings.EmitterRight.InheritVelocity, true);
    }
Ejemplo n.º 3
0
 public void CopyValuesFrom(PsyiaSettings copyTarget)
 {
     System       = new PsyiasSystemSettings(copyTarget.System);
     Visual       = new PsyiaVisualSettings(copyTarget.Visual);
     Physics      = new PsyiaPhysicsSettings(copyTarget.Physics);
     Audio        = new PsyiaAudioSettings(copyTarget.Audio);
     Controller   = new PsyiaControllerSettings(copyTarget.Controller);
     ForceLeft    = new PsyiaForceSettings(copyTarget.ForceLeft);
     ForceRight   = new PsyiaForceSettings(copyTarget.ForceRight);
     EmitterLeft  = new PsyiaEmitterSettings(copyTarget.EmitterLeft);
     EmitterRight = new PsyiaEmitterSettings(copyTarget.EmitterRight);
 }
Ejemplo n.º 4
0
 public void Awake()
 {
     CurrentSettings = Instantiate(DefaultSettings);
     ApplyDefaultSettings();
 }