Example #1
0
 public void CutLeg()
 {
     if (isCorrectPositionThird(Saw.transform.position.x))
     {
         TrueNumber++;
         SetLegAnimations(true);
         PlayLegAnimations();
         PlaySawAnimation();
         CloseThird.SetActive(false);
         ThirdOkay.SetActive(true);
         ThirdButton.SetActive(false);
         thirdCutted = true;
         CheckTrue();
     }
     else
     {
         WrongPlacePanel.SetActive(true);
     }
 }
Example #2
0
    IEnumerator AllTrue()
    {
        Saw.SetActive(false);

        yield return(new WaitForSeconds(1.6F));

        FirstOkay.SetActive(false);
        SecondOkay.SetActive(false);
        ThirdOkay.SetActive(false);

        yield return(new WaitForSeconds(1));

        BackPart.Play("MakeChairAnimationBack");
        yield return(new WaitForSeconds(0.5F));

        BodyPart.Play("MakeChairAnimationBody");
        BodyPart.enabled = true;
        yield return(new WaitForSeconds(0.5F));

        LegPart.Play("MakeChairAnimationLegPart");
        yield return(new WaitForSeconds(1));

        BackPartSecond.Play("MakeSecondChairBackPartAnimation");
        yield return(new WaitForSeconds(0.5F));

        BodyPartSecond.Play("MakeSecondChairBodyPartAnimation");
        BodyPartSecond.enabled = true;
        yield return(new WaitForSeconds(0.5F));

        LegPartSecond.Play("MakeSecondChairLegPartAnimation");
        yield return(new WaitForSeconds(2.0F));

        StartCoroutine(ShowSuccesPanel());

        yield return(null);
    }