Esempio n. 1
0
 private void InitializeFireworkLaunchers()
 {
     for (int i = 0; i < 8; ++i)
     {
         GameObject launcher_go = launchers[i];
         if (launcher_go.GetComponent(typeof(CustomizationSceneLauncher)))
         {
             CustomizationSceneLauncher launcher_script = ( CustomizationSceneLauncher )launcher_go.GetComponent(typeof(CustomizationSceneLauncher));
             curr_particle_index = launcher_particle_correspondences[i];
             launcher_script.SetParticleSystem(curr_particle_index);
             launcher_script.StopParticleSystem();
         }
     }
 }
Esempio n. 2
0
    private void SwapParticleSystems()
    {
        launcher_particle_correspondences[curr_launcher_index] = curr_particle_index;

        //Store the firework index for cross-scene access
        PlayerPrefs.SetInt(curr_launcher_index.ToString(), curr_particle_index);

        GameObject launcher_go = launchers[curr_launcher_index];

        if (launcher_go.GetComponent(typeof(CustomizationSceneLauncher)))
        {
            CustomizationSceneLauncher launcher_script = ( CustomizationSceneLauncher )launcher_go.GetComponent(typeof(CustomizationSceneLauncher));
            launcher_script.SetParticleSystem(curr_particle_index);
        }
    }