Ejemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     if (FireOrSmoke == 1)
     {
         if (GetComponent <ParticleSystem>().isPlaying)
         {
             Event_Script.jobDone((int)Job.Fireworks);
         }
         if (!boom && GetComponent <ParticleSystem>().isPlaying)
         {
             GetComponent <ParticleSystem>().Stop();
         }
     }
     else
     {
         if (smoke)
         {
             Event_Script.jobDone((int)Job.FogOn);
         }
         if (smoke && !GetComponent <ParticleSystem>().isPlaying)
         {
             GetComponent <ParticleSystem>().Play();
         }
         if (!smoke && GetComponent <ParticleSystem>().isPlaying)
         {
             GetComponent <ParticleSystem>().Stop();
         }
         if (!smoke)
         {
             Event_Script.jobDone((int)Job.FogOff);
         }
     }
 }
Ejemplo n.º 2
0
    // Update is called once per frame
    void Update()
    {
        //Redundant code to stop the generation of events that we're doing.
        switch (lightID)
        {
        case 1:
            switch (curState)
            {
            case 1:
                Event_Script.jobDone((int)Job.L1P1);
                break;

            case 2:
                Event_Script.jobDone((int)Job.L1P2);
                break;

            default:
                break;
            }
            break;

        case 2:
            switch (curState)
            {
            case 1:
                Event_Script.jobDone((int)Job.L2P1);
                break;

            case 2:
                Event_Script.jobDone((int)Job.L2P2);
                break;

            default:
                break;
            }
            break;

        default:
            break;
        }

        if (on)
        {
            switch (lightID)
            {
            case 1:
                Event_Script.jobDone((int)Job.L1On);
                break;

            case 2:
                Event_Script.jobDone((int)Job.L2On);
                break;
            }
        }
        else
        {
            switch (lightID)
            {
            case 1:
                Event_Script.jobDone((int)Job.L1Off);
                break;

            case 2:
                Event_Script.jobDone((int)Job.L2Off);
                break;
            }
        }
    }
Ejemplo n.º 3
0
 // Update is called once per frame
 void Update()
 {
     Event_Script.jobDone((int)Job.MainLightC + getState());
 }
Ejemplo n.º 4
0
 // Update is called once per frame
 void Update()
 {
     Event_Script.jobDone((int)Job.Proj1 + curState);
 }