Exemplo n.º 1
0
    protected override IEnumerator _Tutorial()
    {
        finger = MicroMixManager.Instance.finger;
        finger.gameObject.SetActive(true);
        zOffset = new Vector3(0, 0, finger.transform.position.z - tutorialPositions[0].position.z);
        finger.transform.position = tutorialPositions[0].position + zOffset;
        waiting = false;
        mazes   = GetComponentsInChildren <CigMazeItem>(true);
        mazes[0].gameObject.SetActive(true);

        tutorialComplete = false;
        tutorialIndex    = 0;
        while (!tutorialComplete)
        {
            if (waiting)
            {
                yield return(MicroMixManager.Instance.WaitSecondsPause(.5f));

                waiting = false;
            }
            yield return(0);
        }

        finger.gameObject.SetActive(false);
    }
Exemplo n.º 2
0
    protected override IEnumerator _Tutorial()
    {
        canvasParent.sortingLayerName = "Default";
        MicroMixFinger finger = MicroMixManager.Instance.finger;

        finger.gameObject.SetActive(true);
        Vector3 offset = Vector3.left * 1.5f;

        for (int i = 0; i < buttons.Length; i++)
        {
            buttons[i].ToggleButtonInteractable(false);
        }

        for (int i = 0; i < buttons.Length; i++)
        {
            assemblyItem.Init(0, i);
            StartCoroutine(DelayParticlePlay(.4f, i));
            yield return(finger.ShakeToBack(buttons[i].transform.position + offset, buttons[i].transform.position, delay: .2f, time: .4f));

            assemblyItem.Activate(false);
            yield return(MicroMixManager.Instance.WaitSecondsPause(AssemblyLineItem.FADE_TIME * 2));
        }

        for (int i = 0; i < buttons.Length; i++)
        {
            buttons[i].ToggleButtonInteractable(true);
        }

        yield return(0);

        finger.gameObject.SetActive(false);
        canvasParent.sortingLayerName = "uGUI";
    }
Exemplo n.º 3
0
    protected override IEnumerator _Tutorial()
    {
        dashedLine.gameObject.SetActive(true);
        circle.gameObject.SetActive(true);
        cockroach.transform.position = CameraUtils.RandomWorldPointOnScreen(Camera.main, .4f, .4f, 0);
        MicroMixFinger finger = MicroMixManager.Instance.finger;

        trap.GetComponent <RoachTrapItem>().SetVisible(false);
        finger.gameObject.SetActive(true);
        dashedLine.GetComponentInChildren <SpriteRenderer>().enabled = true;

        float angle = Random.Range(0, 360);

        cockroach.GetComponent <Animator>().enabled = false;
        cockroach.transform.rotation  = Quaternion.Euler(0, 0, angle);
        dashedLine.transform.rotation = Quaternion.Euler(0, 0, angle);
        dashedLine.transform.position = cockroach.transform.position;

        Vector3 direction = new Vector3(Mathf.Cos((angle + 90) * Mathf.Deg2Rad), Mathf.Sin((angle + 90) * Mathf.Deg2Rad));

        circle.transform.position = cockroach.transform.position + direction * 4;
        yield return(finger.ShakeToBack(cockroach.transform.position + direction * 4 - Vector3.up * .2f, cockroach.transform.position + direction * 4 + Vector3.up * .2f, .3f, .4f));

        lastVelocity = direction;
        finger.gameObject.SetActive(false);
        circle.gameObject.SetActive(false);
        dashedLine.GetComponentInChildren <SpriteRenderer>().enabled = false;
    }
Exemplo n.º 4
0
    protected override IEnumerator _Tutorial()
    {
        canvasParent.sortingLayerName = "Default";
        Setup();
        MicroMixFinger finger = MicroMixManager.Instance.finger;

        finger.gameObject.SetActive(true);
        FireItem fireItem = GetComponentInChildren <FireItem>();

        fireItem.GetComponent <Animation>().Play();
        Vector3 button = fireItem.gameObject.transform.position;
        Vector3 offset = new Vector3(0, 1);

        yield return(finger.MoveTo(button + offset, button, delay: .3f, time: .3f));

        fireItem.Engage();
        yield return(MicroMixManager.Instance.WaitSecondsPause(.72f));

        fireItem.Disengage();

        yield return(finger.MoveTo(button, button + offset, delay: 0, time: .3f));

        finger.gameObject.SetActive(false);

        UpdateSize(minSize);
        canvasParent.sortingLayerName = "uGUI";
    }
Exemplo n.º 5
0
    protected override IEnumerator _Tutorial()
    {
        MicroMixFinger finger = MicroMixManager.Instance.finger;

        finger.gameObject.SetActive(true);
        yield return(finger.MoveTo(spacer.transform.position, inhaler.transform.position, delay: .5f, time: 1f));

        finger.gameObject.SetActive(false);
    }
Exemplo n.º 6
0
    protected override IEnumerator _Tutorial()
    {
        Setup();

        MicroMixFinger finger = MicroMixManager.Instance.finger;

        finger.gameObject.SetActive(true);
        yield return(finger.MoveTo(inhaler.transform.position + new Vector3(3f, .5f), inhaler.transform.position + new Vector3(.3f, -.3f), delay: .5f, time: 1f));

        finger.gameObject.SetActive(false);
    }
Exemplo n.º 7
0
    protected override IEnumerator _Tutorial()
    {
        MicroMixFinger finger = MicroMixManager.Instance.finger;

        finger.gameObject.SetActive(true);
        RemoveCapItem cap = inhaler.GetComponentInChildren <RemoveCapItem>();

        yield return(finger.MoveTo(cap.transform.position, cap.transform.position + cap.animDelta, delay: .5f, time: 1f));

        finger.gameObject.SetActive(false);
    }
Exemplo n.º 8
0
    protected override IEnumerator _Tutorial()
    {
        MicroMixFinger finger = MicroMixManager.Instance.finger;

        finger.gameObject.SetActive(true);

        Setup();

        yield return(finger.MoveTo(inhalerItem.transform.position, petInstance.GetComponent <MicroMixAnatomy>().mouth.transform.position, delay: .5f, time: 1f));

        finger.gameObject.SetActive(false);
    }
Exemplo n.º 9
0
    protected override IEnumerator _Tutorial()
    {
        Setup(true);
        MicroMixFinger finger = MicroMixManager.Instance.finger;

        finger.gameObject.SetActive(true);
        foreach (MoldItem mold in moldItems)
        {
            yield return(finger.MoveTo(mold.transform.position, trashItem.transform.position, .2f, .4f));
        }
        finger.gameObject.SetActive(false);
    }
Exemplo n.º 10
0
    protected override IEnumerator _Tutorial()
    {
        MicroMixFinger finger = MicroMixManager.Instance.finger;

        finger.gameObject.SetActive(true);
        yield return(finger.MoveTo(inhaler.transform.position, inhaler.transform.position + Vector3.down * 2, .3f, .15f));

        for (int i = 0; i < 2; i++)
        {
            yield return(finger.ShakeToBack(inhaler.transform.position + Vector3.down * 2, inhaler.transform.position + Vector3.up * 1, 0, .3f));
        }

        finger.gameObject.SetActive(false);
    }
Exemplo n.º 11
0
    protected override IEnumerator _Tutorial()
    {
        MicroMixFinger finger = MicroMixManager.Instance.finger;

        finger.gameObject.SetActive(true);

        Setup();
        PushButtonItem button = inhaler.GetComponentInChildren <PushButtonItem>();

        Vector3 offset = new Vector3(0, .5f);

        yield return(finger.ShakeToBack(button.transform.position + offset, button.transform.position + button.animDelta + offset, delay: .5f, time: 1f));

        finger.gameObject.SetActive(false);
    }
Exemplo n.º 12
0
    protected override IEnumerator _Tutorial()
    {
        petInstance = (GameObject)Instantiate(petPrefab, Vector3.zero, Quaternion.identity);
        petInstance.transform.SetParent(transform);

        MicroMixFinger finger = MicroMixManager.Instance.finger;

        finger.gameObject.SetActive(true);
        Vector3 mouthPos = petInstance.GetComponent <MicroMixAnatomy>().mouth.transform.position;

        yield return(finger.MoveTo(mouthPos, mouthPos + Vector3.right * 5, delay: .5f, time: 1f));

        finger.gameObject.SetActive(false);
        complete = false;
    }
Exemplo n.º 13
0
    private IEnumerator ShowFinger()
    {
        MicroMixFinger finger = MicroMixManager.Instance.finger;

        finger.gameObject.SetActive(true);
        Vector3 offset = new Vector3(0, .75f);

        inhalerButton.SetActive(true);
        yield return(finger.ShakeToBack(inhalerButton.transform.position, inhalerButton.transform.position + offset, delay: .5f, time: .5f));

        inhalerButton.SetActive(false);
        isPaused = false;
        finger.gameObject.SetActive(false);
        Destroy(petInstance);
    }
Exemplo n.º 14
0
    protected override IEnumerator _Tutorial()
    {
        Setup(true);
        MicroMixFinger finger = MicroMixManager.Instance.finger;

        finger.gameObject.SetActive(true);
        for (int i = 0; i < dustItems.Length; i++)
        {
            dustItems[i].Randomize();
        }
        for (int i = 0; i < dustItems.Length; i++)         //Now point them all towards the trash
        {
            yield return(finger.ShakeToBack(dustItems[i].transform.position + Vector3.down, dustItems[i].transform.position + Vector3.up, .1f, .3f));
        }
        finger.gameObject.SetActive(false);
    }
Exemplo n.º 15
0
    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
    }
Exemplo n.º 16
0
    protected override IEnumerator _Tutorial()
    {
        petInstance = (GameObject)Instantiate(petPrefab, Vector3.zero, Quaternion.identity);
        petInstance.transform.SetParent(transform);
        do
        {
            scarfItem.transform.position   = CameraUtils.RandomWorldPointOnScreen(Camera.main, .1f, .1f, 0);
            petInstance.transform.position = CameraUtils.RandomWorldPointOnScreen(Camera.main, .2f, .2f, 0);
        } while (Vector3.Distance(scarfItem.transform.position, petInstance.transform.position) < 4f);
        lastPos = petInstance.transform.position;
        MicroMixFinger finger = MicroMixManager.Instance.finger;

        finger.gameObject.SetActive(true);
        Vector3 neckPos = petInstance.GetComponent <MicroMixAnatomy>().neck.transform.position;

        yield return(finger.MoveTo(scarfItem.transform.position, neckPos, delay: .5f, time: 1f));

        Destroy(petInstance);
        MicroMixManager.Instance.finger.gameObject.SetActive(false);
    }