コード例 #1
0
 void newDay()
 {
     curstudent = 0;
     curday++;
     if (curday >= totaldays)
     {
         TransitionHandler transhand = StaticChildren.CallTransition();
         StaticChildren.endscreen.GetComponent <Endgame>().EndTheGame();
         end = true;
     }
 }
コード例 #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);
 }
コード例 #3
0
    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();
    }
コード例 #4
0
    void newStudent()
    {
        TransitionHandler transhand = StaticChildren.CallTransition();

        transhand.playWalking();
        curstudent++;
        minigamesComplete = 0;
        if (curstudent >= totalstudents)
        {
            newDay();
        }
        StaticChildren.currentStudent = StaticChildren.students[curstudent];
    }
コード例 #5
0
    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;
        }
        }
    }