Example #1
0
 void newDay()
 {
     curstudent = 0;
     curday++;
     if (curday >= totaldays)
     {
         TransitionHandler transhand = StaticChildren.CallTransition();
         StaticChildren.endscreen.GetComponent <Endgame>().EndTheGame();
         end = true;
     }
 }
Example #2
0
 void Start()
 {
     curday     = 0;
     curstudent = 0;
     end        = false;
     //we give this the number of students we want
     StaticChildren.GenStudents(totalstudents);
     StaticChildren.currentStudent = StaticChildren.students[curstudent];
     StaticChildren.OnStart();
     Debug.Log(StaticChildren.students.Count);
 }
    IEnumerator WaitForAnim(AnimationClip animclip, int child)
    {
        Transform anim = transform.GetChild(child);

        anim.gameObject.SetActive(true);
        float tempTime = animclip.length;

        yield return(new WaitForSeconds(tempTime));

        anim.gameObject.SetActive(false);
        StaticChildren.DisableTransitions();
    }
Example #4
0
    void newStudent()
    {
        TransitionHandler transhand = StaticChildren.CallTransition();

        transhand.playWalking();
        curstudent++;
        minigamesComplete = 0;
        if (curstudent >= totalstudents)
        {
            newDay();
        }
        StaticChildren.currentStudent = StaticChildren.students[curstudent];
    }
    public void OnPointerClick(PointerEventData eventData)
    {
        instantGame = Instantiate(minigame, transform.parent);
        instantGame.transform.position = new Vector3(0, 0, -5);
        TransitionHandler transhand = StaticChildren.CallTransition();

        switch (anim)
        {
        case animoption.Hammer:
        {
            transhand.playHammer();
            break;
        }

        case animoption.Paper_Grab:
        {
            transhand.playPaper();
            break;
        }
        }
    }