Exemple #1
0
 public void CutBody()
 {
     if (isCorrectPositionSecond(Saw.transform.position.x))
     {
         TrueNumber++;
         SetBodyAnimations(true);
         PlayBodyAnimations();
         PlaySawAnimation();
         CloseSecond.SetActive(false);
         SecondOkay.SetActive(true);
         SecondButton.SetActive(false);
         secondCutted = true;
         CheckTrue();
     }
     else
     {
         WrongPlacePanel.SetActive(true);
     }
 }
Exemple #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);
    }