コード例 #1
0
ファイル: TimeMicro.cs プロジェクト: aliken9/MyZooPets
    protected override IEnumerator _Tutorial()
    {
        Setup();
        MicroMixFinger finger = MicroMixManager.Instance.finger;
        TimeItem       time   = GetComponentInChildren <TimeItem>();
        Vector3        offset = Vector3.up * .5f;

        finger.transform.position = time.transform.position + offset; //Set up the finger and the sky...

        while (angle > 255)                                           //Position ourselves in the first clock
        {
            yield return(0);
        }

        paused = true;
        finger.gameObject.SetActive(true);
        yield return(MicroMixManager.Instance.WaitSecondsPause(.3f));        //Position finger on button and wait

        time.ShrinkDown();
        yield return(finger.MoveTo(time.transform.position + offset, time.transform.position, delay: 0f, time: .15f));        //Now press it

        yield return(finger.MoveTo(time.transform.position, time.transform.position + offset, delay: 0f, time: .15f));

        paused = false;
        finger.gameObject.SetActive(false);
        time.clock1.SetActive(false); //Remove the clock and us

        while (angle > 106)           //Position ourselves in the first clock
        {
            yield return(0);
        }

        paused = true;
        finger.gameObject.SetActive(true);
        yield return(MicroMixManager.Instance.WaitSecondsPause(.3f));        //Give a visual cue we will press

        time.ShrinkDown();
        yield return(finger.MoveTo(time.transform.position + offset, time.transform.position, delay: 0f, time: .15f));        //Now press it again

        yield return(finger.MoveTo(time.transform.position, time.transform.position + offset, delay: 0f, time: .15f));

        paused = false;
        finger.gameObject.SetActive(false);         // Remove the clocks etc.
        time.clock2.SetActive(false);

        yield return(MicroMixManager.Instance.WaitSecondsPause(.4f));        //Let the sun go beyond horizon
    }