Example #1
0
    IEnumerator SetObjectiveComplete(GameObject objectiveGameObject)
    {
        ++objectivesComplete;
        fixing = true;
        anim.SetInteger("CharacterStage", 4);

        source.PlayOneShot(fixSound, 1F);
        isGrounded = false;
        normal     = false;

        AnimFixing animFixing = objectiveGameObject.GetComponent <AnimFixing>();

        if (animFixing != null)
        {
            StartCoroutine(animFixing.PlayAnimation());
        }

        yield return(new WaitForSeconds(2.5f));

        source.PlayOneShot(smokeSound, 1f);
        normal     = true;
        isGrounded = true;
        fixing     = false;

        FixPointsScript fixPointsScript = objectiveGameObject.GetComponent <FixPointsScript>();

        if (fixPointsScript != null)
        {
            fixPointsScript.SetFixed();
        }
    }
Example #2
0
 void Update()
 {
     if (Elec != null && fps != null && fps.IsFixed)
     {
         StopCoroutine(Test());
         fps = null;
     }
 }