using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class JumpParticleColor : MonoBehaviour {
private ParticleSystem theParticleSystem;
// Use this for initialization
void Start () {
theParticleSystem = GetComponent<ParticleSystem>();
PlayerPrefs.SetFloat("JumpParticleColor", 0);
}
// Update is called once per frame
void Update () {
if (PlayerPrefs.GetFloat("JumpParticleColor")==0)
{
theParticleSystem.main.startColor = Color.red;
}
}
}
CANT MODIFY PARTICLE SISTEM. MAIN BECAUSE IS NOT A VARIABLE